:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #10b981;
    --secondary-hover: #059669;
    --secondary-glow: rgba(16, 185, 129, 0.1);
    
    --bg-dark: #090d16;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-border: rgba(255, 255, 255, 0.07);
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    
    --glass: rgba(17, 24, 39, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-sans: 'Outfit', -apple-system, sans-serif;
    --font-code: 'Fira Code', monospace;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background glows */
.background-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.45;
}

.glow-1 {
    width: 500px;
    height: 500px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.glow-2 {
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-area {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px var(--primary));
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 20%, var(--secondary) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    padding: 6px;
    border-radius: var(--radius-lg);
    max-width: 550px;
    margin: 0 auto 40px;
    box-shadow: var(--glass-shadow);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Tab pane behavior */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Bar Section */
.search-section {
    max-width: 900px;
    margin: 0 auto 35px;
}

.search-bar-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    padding: 8px;
    border-radius: var(--radius-lg);
    display: flex;
    gap: 12px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.search-bar-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 1.05rem;
    outline: none;
    font-weight: 400;
}

#search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0 16px;
    cursor: pointer;
    outline: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.sort-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

#search-btn, #inspect-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

#search-btn:hover, #inspect-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Suggestions */
.suggestions-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    padding: 0 10px;
    flex-wrap: wrap;
}

.suggestions-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.suggestions-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.suggestion-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.suggestion-tag:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary);
}

/* Search Results Layout */
.search-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.results-column {
    flex: 3;
}

.diagnostics-column {
    flex: 2;
    position: sticky;
    top: 30px;
}

@media (max-width: 950px) {
    .search-layout {
        flex-direction: column;
    }
    .diagnostics-column {
        position: static;
        width: 100%;
    }
    .search-bar-container {
        flex-direction: column;
        padding: 12px;
    }
    .sort-select {
        height: 48px;
    }
}

/* Card design base */
.diagnostics-card, .analytics-card, .inspector-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.diagnostics-card h3, .analytics-card h3, .inspector-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

/* Stepper NLP Visualizer */
.stepper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    padding-left: 10px;
    margin-bottom: 25px;
}

.stepper::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 15px;
    bottom: 15px;
    width: 2px;
    background: rgba(255, 255, 255, 0.08);
}

.step {
    display: flex;
    gap: 16px;
    position: relative;
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 1;
    transition: var(--transition-smooth);
}

.step.active .step-num {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.step-content {
    flex: 1;
    padding-top: 2px;
}

.step-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.code-equation {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--secondary);
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    word-break: break-all;
}

.diagnostics-footer {
    display: flex;
    gap: 12px;
}

.secondary-btn {
    flex: 1;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Code block styles */
.code-block-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 350px;
    overflow-y: auto;
}

.code-block-container h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block-container pre {
    font-family: var(--font-code);
    font-size: 0.82rem;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-all;
}

#logs-output {
    color: #a7f3d0; /* Soft green */
}

/* Results section */
.results-info {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 24px;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    animation: slideUp 0.4s ease-out backwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card:hover {
    transform: translateY(-4px) scale(1.008);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    background: rgba(17, 24, 39, 0.85);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.result-id {
    color: var(--secondary);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

.result-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.35;
    color: #fff;
    transition: color 0.2s;
}

.result-card:hover .result-title {
    color: var(--primary);
}

.result-snippet {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    line-height: 1.6;
    font-style: italic;
}

.result-snippet strong, .result-title strong {
    color: var(--secondary);
    background: rgba(16, 185, 129, 0.08);
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 700;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.tag.tag-score {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-weight: 600;
}

/* Loader styling */
.loader {
    display: none;
    text-align: center;
    padding: 60px 40px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-card-border);
}

.loader p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 15px;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.06);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    margin: 0 auto;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.3));
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* TAB 2: CORPUS ANALYTICS STYLING */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 26px 30px;
}

.stat-icon {
    font-size: 2.2rem;
    background: rgba(255, 255, 255, 0.03);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.analytics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 25px;
}

@media (max-width: 600px) {
    .analytics-charts {
        grid-template-columns: 1fr;
    }
}

.chart-container h3 {
    margin-bottom: 25px;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

/* Horizontal custom progress bars */
.chart-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-bar-label .percentage {
    color: var(--secondary);
}

.chart-bar-track {
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 5px;
    width: 0; /* Animated dynamically in JS */
    transition: width 1.2s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* TAB 3: INDEX INSPECTOR STYLING */
.inspector-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.inspector-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input, .inspector-select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.input-group input:focus, .inspector-select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.inspector-results-area {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 30px;
    animation: fadeIn 0.4s ease-out;
}

.inspector-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.inspector-meta strong {
    color: var(--primary);
}

.postings-wrapper h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.postings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.posting-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
    transition: var(--transition-smooth);
}

.posting-card:hover {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.25);
    transform: scale(1.03);
}

.posting-doc {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.posting-card:hover .posting-doc {
    color: var(--primary);
}

.posting-freq {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

/* Explicit option styles for dark theme select elements */
.sort-select option,
.inspector-select option {
    background-color: #0d111b;
    color: var(--text-primary);
}

/* Engine Performance Benchmarking Styles */
.benchmark-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--glass-shadow);
    animation: fadeIn 0.4s ease-out;
}

.benchmark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 25px;
}

.benchmark-header h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f43f5e 20%, var(--primary) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.benchmark-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 700px;
    line-height: 1.5;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.primary-btn:active {
    transform: translateY(0);
}

.pulse-btn {
    position: relative;
    overflow: hidden;
}

.pulse-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.pulse-btn:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
    transition: 0s;
}

.benchmark-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.benchmark-results-container {
    margin-top: 20px;
}

.benchmark-results-container h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.benchmark-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
}

.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.benchmark-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.benchmark-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.benchmark-table tr:last-child td {
    border-bottom: none;
}

.benchmark-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.table-loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 30px !important;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-info {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.latency-highlight {
    font-family: var(--font-code);
    font-weight: 600;
    color: var(--secondary);
}

.live-latency-highlight {
    font-family: var(--font-code);
    font-weight: 700;
    color: #f43f5e;
}

/* Controls Panel (Theme & Language Selector) */
.controls-panel {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.control-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    box-shadow: var(--glass-shadow);
    outline: none;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.lang-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0 12px;
    height: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
}

.lang-icon {
    font-size: 1rem;
}

.lang-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    padding-right: 5px;
}

.lang-select option {
    background-color: #0d111b;
    color: var(--text-primary);
}

/* Light Theme Variable Overrides */
body.light-theme {
    --bg-dark: #f1f5f9; /* slate-100 */
    --text-primary: #0f172a; /* slate-900 */
    --text-muted: #475569; /* slate-600 */
    
    --glass: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
    
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-border: rgba(15, 23, 42, 0.06);
}

body.light-theme .glow {
    opacity: 0.18;
}

body.light-theme .sort-select option,
body.light-theme .inspector-select option,
body.light-theme .lang-select option {
    background-color: #ffffff;
    color: #0f172a;
}

body.light-theme .code-block-container {
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .benchmark-table-wrapper {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .benchmark-table th {
    background: rgba(15, 23, 42, 0.03);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .benchmark-table td {
    border-bottom-color: rgba(15, 23, 42, 0.04);
}

body.light-theme .postings-wrapper {
    background: rgba(15, 23, 42, 0.02);
}

body.light-theme .posting-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .posting-freq {
    color: #0f172a;
}

body.light-theme pre, body.light-theme code {
    color: #0f172a;
}

body.light-theme .diagnostics-card h3,
body.light-theme .analytics-card h3,
body.light-theme .inspector-card h3 {
    color: #0f172a;
}

body.light-theme .stat-value {
    color: #0f172a;
}

body.light-theme .result-card h3,
body.light-theme .result-card h3 a,
body.light-theme .result-title {
    color: #0f172a;
}

body.light-theme .latency-highlight {
    color: #047857;
}

body.light-theme .live-latency-highlight {
    color: #be123c;
}

body.light-theme .code-equation {
    color: #047857;
}

body.light-theme .chart-bar-label .percentage {
    color: #047857;
}

body.light-theme .badge-success {
    color: #047857;
    background: rgba(4, 120, 87, 0.1);
}

body.light-theme .badge-info {
    color: #4338ca;
    background: rgba(67, 56, 202, 0.1);
}

body.light-theme .chart-bar-track {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.08);
}

.database-notice {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-left: 2px solid var(--secondary);
    padding-left: 10px;
    font-style: italic;
    opacity: 0.85;
}

/* Initialization Overlay */
.init-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.init-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.init-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.init-logo {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 20%, var(--secondary) 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

#init-status-msg {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

/* Error state styling for the initialization card */
.init-card.error-state {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 20px 50px rgba(239, 68, 68, 0.15);
    max-width: 600px; /* Give more space for the stack trace */
    text-align: center;
}

.init-card.error-state #init-status-msg {
    color: var(--text-primary);
    width: 100%;
}





