:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --section-bg: #1e1e1e;
    --hover-color: #333;
    --header-color: #bb86fc;
    --accent-color: #03dac6;
    --border-color: #444;

/* JSON Editor colors to match our theme */
    --json-empty-color: #808080;
    --json-property-color: #7cdcfe;
    --json-string-color: #ce9178; 
    --json-number-color: #b5cea8; 
    --json-boolean-color: #569cd6; 
    --json-null-color: #569cd6; 
    --json-comment-color: #6a9955; 
    --json-keyword-color: #569cd6; 
    --json-function-color: #dcdcaa; 
    --json-operator-color: #d4d4d4; 
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5px;
}

.header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 5px 0;
    border-bottom: 1px solid var(--hover-color);
    margin-bottom: 5px;
}

.header h1 {
    font-size: 1em;
    color: var(--header-color);
    margin: 0;
}

.header span {
    font-size: 2em;
    color: var(--header-color);
    font-weight: bold;
}

.header-left {
    text-align: left;
}

.header-right {
    text-align: right;
}

.code-examples {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .code-examples {
        grid-template-columns: 1fr;
    }

    .github-link {
        padding: 6px 10px;
    }
    
    .header {
        padding: 20px 20px 30px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .code-container {
        flex-direction: column; /* Ensure it stacks properly */
    }

    .header {
        grid-template-columns: 1fr;
    }
    .header-left {
        text-align: center;
    }
    .header-right {
        text-align: center;
    }
}

.example-block {
    background-color: transparent;
    border: none;
    border-radius: 5px;
    padding: 0px;
}

.example-block h3 {
    color: var(--header-color);
    margin: 0 0 10px 0;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-block pre {
    margin: 0;
    padding: 15px;
    background-color: #1e1e1e !important;
    max-height: 400px;
    overflow-y: auto;
}

.section {
    background-color: var(--section-bg);
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.section h2 {
    color: var(--header-color);
    margin: 0;
}

.code-container {
    position: relative;
    background-color: #2e2e2e;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 5px;
    margin-top: 20px;
    overflow-x: auto;
}

.github-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    text-decoration: none;
    border:none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 0.8em;
}

.github-link:hover {
    background-color: transparent;
    border: 1px solid var(--accent-color);
}

.copy-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    color: var(--bg-color);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 100;
}

.copy-button:hover {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    opacity: 0.8;
}

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
    animation: fadeInOut 2s ease-in-out;
    z-index: 100;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}


/* override jsoneditor colors */
.jsoneditor-value.jsoneditor-empty {  color: var(--json-empty-color) !important;}
.jsoneditor-value.jsoneditor-string {  color: var(--json-string-color) !important;}
.jsoneditor-value.jsoneditor-number {  color: var(--json-number-color) !important;}
.jsoneditor-value.jsoneditor-boolean {  color: var(--json-boolean-color) !important;}
.jsoneditor-value.jsoneditor-null {  color: var(--json-null-color) !important;}
.jsoneditor-value.jsoneditor-color-value {  color: var(--json-keyword-color) !important;}
.jsoneditor-value.jsoneditor-invalid {  color: var(--json-function-color) !important;}
.jsoneditor-value.jsoneditor-field {  color: var(--text-color) !important;}

/* Custom styles for jsoneditor to match the current theme */
.jsoneditor {
    background-color: var(--section-bg);
    color: var(--text-color) !important;
    border: thin solid var(--border-color);
    font-size: 10pt;
    line-height: 100%;
}

.jsoneditor-tree {
    background-color: var(--section-bg);
    color: var(--text-color) !important;
}

.jsoneditor-tree .jsoneditor-field {
    color: var(--text-color) !important;
}

.section-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.section-header h2 {
    margin: 0;
}

.toggle-icon {
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.section-content {
    transition: all 0.3s ease;
    overflow: hidden;
    opacity: 1;
    position: relative;
}

.section-content span {
    color: var(--text-color);
    padding: 10px;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.section-header.collapsed .toggle-icon {
    transform: rotate(180deg);
}

#full-json {
    overflow-y: auto;
    max-height: 345px;
}

/* Custom scrollbar styles for the entire page */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #1e1e1e; /* Track color */
}

*::-webkit-scrollbar-thumb {
    background: #333; /* Thumb color */
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #444; /* Thumb color on hover */
}

* {
    scrollbar-width: thin;
    scrollbar-color: #333 #1e1e1e; /* Thumb and track color for Firefox */
}

