* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== SMOOTH TRANSITIONS GLOBAL ===== */
*, *::before, *::after {
    transition-timing-function: ease;
}

/* ===== CUSTOM SCROLLBAR (Global) ===== */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}

/* Webkit browsers (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(255,255,255,0.25);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: #0a0e17;
    color: #f0f4f8;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== LOADING SCREEN STYLES ===== */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease-out;
    pointer-events: all;
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.loading-container {
    text-align: center;
}

.earth-loader {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.earth-sphere {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    position: relative;
    border: 1px solid rgba(255,255,255,0.15);
}

.earth-glow {
    display: none;
}

.loading-ring {
    position: absolute;
    width: 76px;
    height: 76px;
    border: 1px solid transparent;
    border-top-color: rgba(255,255,255,0.3);
    border-radius: 50%;
    top: -8px;
    left: -8px;
    animation: spin 2s linear infinite;
}

@keyframes earthPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#loadingScreen h2 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.loading-status {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    margin-bottom: 14px;
    font-weight: 400;
}

.progress-bar {
    width: 140px;
    height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin: 0 auto 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: rgba(255,255,255,0.3);
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

.loading-text {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 400;
}

#header {
    position: absolute;
    top: 50px;
    left: 300px;
    z-index: 1000;
    background: rgba(16,20,28,0.88);
    padding: 8px 14px;
    border-radius: 6px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s ease;
}

#header:hover {
    background: rgba(16,20,28,0.95);
}

#header h1 {
    font-size: 16px;
    margin-bottom: 2px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    letter-spacing: -0.3px;
}

#header p {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

#toolbar {
    display: none !important;
}

#bottomRightControls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1200;
    background: rgba(18, 22, 30, 0.92);
    padding: 6px 10px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: all;
}

#bottomLeftControls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: all;
}

#startTutorialBtn:hover {
    background: rgba(40, 80, 160, 0.9) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important;
}

#mapStyle {
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: #c0c8d4;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

#mapStyle:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
}

#mapStyle option {
    color: #1a1a2e;
    background: #f0f4f8;
}

#languageSelector {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
    margin-left: 6px;
    transition: border-color 0.15s ease;
}

#languageSelector:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
}

#languageSelector option {
    color: #1a1a2e;
    background: #f0f4f8;
}

#cesiumContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #000000 !important;
}

#infoPanel {
    position: absolute;
    bottom: 220px;
    left: 20px;
    width: 350px;
    background: rgba(16,20,28,0.92);
    border-radius: 6px;
    padding: 14px;
    z-index: 1000;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: none;
}

#infoPanel.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

#closeInfoPanel {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#closeInfoPanel:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

#locationTitle {
    color: rgba(255,255,255,0.85);
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

#locationDescription {
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    margin-bottom: 12px;
    font-size: 12px;
}

#locationDetails {
    color: white;
    font-size: 14px;
}

#energySidePanel {
    position: fixed;
    top: 28px;
    left: 12px;
    width: 220px;
    max-height: calc(100vh - 460px);
    background: rgba(16, 20, 28, 0.92);
    padding: 10px;
    z-index: 1000;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    transition: box-shadow 0.2s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Custom Scrollbar for Webkit browsers (Chrome, Safari, Edge) */
#energySidePanel::-webkit-scrollbar {
    width: 3px;
}

#energySidePanel::-webkit-scrollbar-track {
    background: transparent;
}

#energySidePanel::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

#energySidePanel::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

#energySidePanel::-webkit-scrollbar-thumb:active {
    background: rgba(255,255,255,0.25);
}

#energySidePanel:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#energySidePanel h3 {
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.3;
    text-transform: uppercase;
}

#countrySelector {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

#countrySelector label {
    color: rgba(255,255,255,0.4);
    font-size: 9px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

#energyCountry {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    color: #d0d8e4;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

#energyCountry:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}

#energyCountry:focus {
    outline: none;
    border-color: rgba(255,255,255,0.2);
    box-shadow: none;
}

#yearSelector {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

#yearSelector label {
    color: rgba(255,255,255,0.4);
    font-size: 9px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

#energyYear {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: #ffffff;
    color: #111111;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

#energyYear:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}

#energyYear:focus {
    outline: none;
    border-color: rgba(255,255,255,0.2);
    box-shadow: none;
}

/* Stats Grid - Compact 2-column */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 8px;
}

.stat-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 5px 7px;
    transition: background 0.15s ease;
}

.stat-card:hover {
    background: rgba(255,255,255,0.06);
}

.stat-label {
    color: rgba(255,255,255,0.4);
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.stat-value {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1px;
    letter-spacing: -0.3px;
}

.stat-unit {
    color: rgba(255,255,255,0.3);
    font-size: 9px;
    font-weight: 500;
}

#energyStats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.energy-stat {
    background: rgba(255,255,255,0.03);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.energy-stat-label {
    color: rgba(255,255,255,0.4);
    font-size: 9px;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.energy-stat-value {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
}

.energy-stat-unit {
    color: rgba(255,255,255,0.3);
    font-size: 9px;
    margin-left: 3px;
}

#quickLinks {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    max-width: 300px;
}

#quickLinks h4 {
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
}

.quick-link-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quick-link {
    padding: 6px 10px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.15s ease;
}

.quick-link:hover {
    background: rgba(255,255,255,0.08);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Tablets and Small Desktops (1024px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    #energySidePanel {
        position: fixed;
        top: 28px;
        left: 12px;
        width: 200px;
        max-height: calc(100vh - 460px);
        overflow-y: auto;
        padding: 8px;
    }
    
    #energySidePanel h3 {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    #energySidePanel label {
        font-size: 9px;
    }
    
    #layerControl {
        position: fixed;
        top: auto;
        left: 12px;
        bottom: 180px;
        width: 170px;
        max-height: 170px;
        overflow-y: auto;
        padding: 8px;
    }
    
    #layerControl h4 {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    #layerControl label {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    /* Heatmap Panel - Right side */
    #heatmapPanel {
        position: fixed;
        top: 20px;
        right: 15px;
        bottom: auto;
        left: auto;
        width: calc(100vw - 300px);
        max-width: 350px;
        max-height: calc(100vh - 240px);
        overflow-y: auto;
    }
    
    /* Info Panel */
    #infoPanel {
        max-height: calc(35vh - 30px);
        overflow-y: auto;
    }
    
    /* Data Table */
    #dataTable {
        max-height: calc(40vh - 40px);
        overflow-y: auto;
    }
    
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --marquee-height: 40px;
        --marquee-gap: 4px;
        --top-offset: calc(var(--marquee-height) + var(--marquee-gap));
    }
    #header {
        top: 10px;
        left: 10px;
        padding: 8px 14px;
    }
    
    #header h1 {
        font-size: 16px;
    }
    
    #header p {
        font-size: 10px;
    }
    
    #toolbar {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
    }
    
    #energySidePanel {
        position: fixed;
        top: 28px;
        left: 8px;
        width: 200px;
        max-height: calc(100vh - 460px);
        padding: 8px;
        overflow-y: auto;
    }
    
    #energySidePanel h3 {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    #energySidePanel label {
        font-size: 8px;
    }
    
    #layerControl {
        position: fixed;
        top: auto;
        left: 8px;
        bottom: 180px;
        width: 160px;
        max-height: 160px;
        overflow-y: auto;
        padding: 6px 8px;
    }
    
    #layerControl h4 {
        font-size: 9px;
        margin-bottom: 3px;
        margin-top: 0;
    }
    
    #layerControl label {
        font-size: 8px;
        margin-bottom: 2px;
    }
    
    /* Reduce spacing in layer control */
    #layerControl .slider-control {
        margin-top: 8px;
        padding-top: 8px;
    }
    
    #layerControl .slider-control h5 {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    /* Heatmap Panel - Right side */
    #heatmapPanel {
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        bottom: auto;
        width: calc(100vw - 280px);
        max-width: 400px;
        max-height: calc(100vh - 230px);
        overflow-y: auto;
    }
    
    /* Info Panel - Bottom, full width when visible */
    #infoPanel {
        position: fixed;
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 30vh;
        overflow-y: auto;
    }
    
    /* Data Table - Compact */
    #dataTable {
        max-height: 35vh;
        overflow-y: auto;
    }
    
}

/* Mobile Landscape & Small Tablets (600px - 768px) */
@media (max-width: 768px) {
    #header {
        position: fixed;
        top: 5px;
        left: 5px;
        right: auto;
        padding: 8px 15px;
        z-index: 1100;
        max-width: calc(100% - 120px);
    }
    
    #header h1 {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    #header p {
        font-size: 10px;
    }
    
    #toolbar {
        position: fixed;
        top: 5px;
        right: 5px;
        left: auto;
        padding: 5px 8px;
        min-width: auto;
        z-index: 1100;
    }
    
    #mapStyle, #languageSelector {
        padding: 5px 8px;
        font-size: 10px;
        min-width: 80px;
    }
    
    #languageSelector {
        margin-left: 5px;
    }
    
    /* Compact desktop-like layout for mobile */
    #energySidePanel {
        position: fixed;
        top: 42px;
        bottom: auto;
        left: 5px;
        width: 180px;
        max-height: 260px;
        padding: 5px;
        font-size: 9px;
        overflow-y: auto;
    }
    
    #energySidePanel h3 {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    #energySidePanel label {
        font-size: 7px;
        margin-bottom: 3px;
    }
    
    #energySidePanel select, #energySidePanel input {
        padding: 4px 6px;
        font-size: 9px;
    }
    
    #energySidePanel button {
        padding: 6px 8px;
        font-size: 9px;
    }
    
    .stat-value {
        font-size: 12px;
    }
    
    .stat-label {
        font-size: 7px;
    }
    
    .metric-card {
        padding: 4px;
        margin-bottom: 4px;
    }
    
    #layerControl {
        position: fixed;
        top: auto;
        bottom: 210px;
        left: 5px;
        width: 150px;
        max-height: 160px;
        padding: 6px;
        overflow-y: auto;
    }
    
    #layerControl h4 {
        font-size: 9px;
        margin-bottom: 3px;
        margin-top: 0;
    }
    
    #layerControl label {
        font-size: 8px;
        margin-bottom: 2px;
    }
    
    #layerControl .slider-control {
        margin-top: 4px;
        padding-top: 4px;
    }
    
    #layerControl .slider-control h5 {
        font-size: 8px;
        margin-bottom: 3px;
    }
    
    #layerControl input[type="range"] {
        height: 3px;
    }
    

    
    #quickLinks {
        display: none; /* Hide on mobile to save space */
    }
    
    #infoPanel {
        width: calc(100% - 20px);
        left: 10px;
        bottom: 10px;
        padding: 15px;
        max-height: 25vh;
        overflow-y: auto;
    }
    
    /* Heatmap panel adjustments */
    #heatmapPanel {
        position: fixed;
        top: 370px;
        bottom: auto;
        left: 5px;
        right: 5px;
        max-height: calc(100vh - 580px);
        overflow-y: auto;
    }
    
    #governorateValuesList {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    
    .governorate-item {
        padding: 4px 8px !important;
        font-size: 9px !important;
    }
    
    .governorate-name {
        font-size: 10px !important;
    }
    
    .governorate-value {
        font-size: 9px !important;
    }
    

    
    body {
        overflow: auto;
    }
    
    #cesiumContainer {
        height: 100vh;
        width: 100vw;
    }
}

/* Mobile Portrait (up to 600px) */
@media (max-width: 600px) {
    #header {
        padding: 6px 10px;
        max-width: calc(100% - 100px);
    }
    
    #header h1 {
        font-size: 14px;
    }
    
    #header p {
        display: none; /* Hide subtitle on very small screens */
    }
    
    #toolbar {
        padding: 4px 6px;
    }
    
    #mapStyle, #languageSelector {
        padding: 4px 6px;
        font-size: 9px;
        min-width: 60px;
    }
    
    #energySidePanel {
        position: fixed;
        top: 42px;
        left: 5px;
        width: calc(50% - 8px);
        max-height: calc(100vh - 460px);
        padding: 8px;
        padding-top: 8px;
        overflow-y: auto;
    }
    
    #energySidePanel h3 {
        font-size: 11px;
    }
    
    .stat-card {
        padding: 6px 8px 6px 10px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .stat-label {
        font-size: 7px;
    }
    
    .stat-unit {
        font-size: 9px;
    }
    
    #layerControl {
        top: auto;
        right: 4px;
        bottom: 210px;
        left: auto;
        width: calc(50% - 8px);
        max-height: 160px;
        padding: 6px;
        overflow-y: auto;
    }
    
    #layerControl h4 {
        font-size: 10px;
        margin-bottom: 3px;
        margin-top: 0;
    }
    
    #layerControl label {
        font-size: 9px;
        margin-bottom: 2px;
    }
    
    #infoPanel {
        width: calc(100% - 16px);
        left: 8px;
        bottom: 8px;
        padding: 12px;
    }
    
    #locationTitle {
        font-size: 16px;
    }
    
    #locationDescription {
        font-size: 12px;
    }
    
    #governorateValuesList {
        padding: 6px 8px !important;
        gap: 6px !important;
    }
    
    .governorate-item {
        padding: 3px 6px !important;
        font-size: 8px !important;
    }
    
    .governorate-name {
        font-size: 9px !important;
    }
    
    .governorate-value {
        font-size: 8px !important;
    }
    


/* When panels-hidden is set on body, hide non-critical overlay containers */
body.panels-hidden #energySidePanel,
body.panels-hidden #layerControl,
body.panels-hidden #heatmapPanel,
body.panels-hidden #governorateValuesList,
body.panels-hidden #governorateValuesList-top {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Don't force modals to open when panels are hidden */
body.panels-hidden #dataTableModal[style*="display: block"],
body.panels-hidden #methodologyModal[style*="display: block"],
body.panels-hidden #dataTableModal.open,
body.panels-hidden #methodologyModal.open {
    pointer-events: auto !important;
    z-index: 10050 !important;
}
    .indicator-row .indicator-label {
        font-size: 10px;
        min-width: 60px;
    }
    
    .indicator-row .indicator-value {
        font-size: 16px;
        min-width: 80px;
    }
}

/* Extra Small Devices (up to 400px) */
@media (max-width: 400px) {
    #header h1 {
        font-size: 12px;
    }
    
    #mapStyle, #languageSelector {
        font-size: 8px;
        min-width: 50px;
        padding: 3px 5px;
    }
    
    #energySidePanel {
        position: fixed;
        top: 42px;
        width: calc(50% - 6px);
        max-height: calc(100vh - 100px);
        padding: 6px;
        padding-top: 8px;
        overflow-y: auto;
    }
    
    #energySidePanel h3 {
        font-size: 11px;
    }
    
    .stat-value {
        font-size: 12px;
    }
    
    #layerControl {
        top: auto;
        right: 3px;
        bottom: 210px;
        width: calc(50% - 6px);
        max-height: 150px;
        padding: 5px;
        overflow-y: auto;
    }
    
    #layerControl h4 {
        font-size: 9px;
        margin-top: 0;
        margin-bottom: 2px;
    }
    
    #layerControl label {
        font-size: 8px;
        margin-bottom: 2px;
    }
}

/* Custom Cesium widget styling */
.cesium-viewer-toolbar {
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 5px !important;
}

.cesium-button {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cesium-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Feature 1: Time Controls */
#timeControls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0;
    padding: 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.04);
}

#playBtn, #pauseBtn {
    padding: 5px 8px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    transition: background 0.15s ease;
}

#playBtn:hover, #pauseBtn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

#playBtn:active, #pauseBtn:active {
    background: rgba(255,255,255,0.18);
}

#yearSlider {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(71, 85, 105, 0.5);
    outline: none;
    -webkit-appearance: none;
}

#yearSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#yearSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #60a5fa;
}

#yearSlider::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#sliderYear {
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    min-width: 36px;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.2px;
}

/* Feature 2: Layer Control */
#layerControl {
    display: none !important;
}

#layerControl:hover {
    display: none !important;
}

#layerControl h4 {
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
    margin-top: 0;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

#layerControl label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
    color: #d0dae8;
    font-weight: 500;
}

#layerControl label:hover {
    color: #ffffff;
}

#layerControl input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.slider-control {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.slider-control label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.slider-control input[type="range"] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5a9de8;
    cursor: pointer;
}

.slider-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5a9de8;
    cursor: pointer;
    border: none;
}

#opacityValue {
    color: #ffffff;
    font-size: 12px;
    margin-left: 6px;
    font-weight: 600;
}

#bookmarksPanel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(16,20,28,0.92);
    padding: 10px 12px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.06);
    min-width: 160px;
    max-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#bookmarksPanel:hover {
    background: rgba(16,20,28,0.95);
}

#bookmarksPanel h4 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#saveViewBtn {
    width: 100%;
    padding: 7px 10px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: background 0.15s ease;
    margin-bottom: 8px;
}

#saveViewBtn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

#bookmarksList {
    max-height: 200px;
    overflow-y: auto;
}

.bookmark-item {
    padding: 10px 12px;
    background: rgba(40, 55, 80, 0.6);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border: 1px solid rgba(100, 120, 150, 0.2);
}

.bookmark-item:hover {
    background: rgba(50, 70, 100, 0.8);
    transform: translateX(4px);
    border-color: rgba(130, 160, 200, 0.4);
}

.bookmark-name {
    flex: 1;
    color: #f0f4f8;
    font-weight: 500;
}

.bookmark-delete {
    padding: 2px 6px;
    background: rgba(255, 0, 0, 0.6);
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 10px;
}

.bookmark-delete:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* ===== HEATMAP PANEL ===== */
#heatmapPanel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
    width: 100%;
    max-width: 100%;
    background: transparent !important;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none !important;
    border: none;
    max-height: 100%;
    overflow: visible;
    box-shadow: none;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#heatmapPanel:hover {
    background: transparent !important;
    border: none;
    box-shadow: none;
    backdrop-filter: none !important;
}

/* Override inline styles on heatmap wrapper */
#heatmapPanel > div {
    background: rgba(16,20,28,0.92) !important;
    backdrop-filter: blur(8px) !important;
    transition: background 0.15s ease !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}

#heatmapPanel > div:hover {
    background: rgba(16,20,28,0.95) !important;
}

/* Horizontal Governorates Bar at Top */
#governorateValuesList {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 12px !important;
    padding: 14px 20px !important;
    background: rgba(16,20,28,0.95) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
    z-index: 500 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

#governorateListTitle {
    position: sticky !important;
    left: 0 !important;
    background: rgba(10, 15, 30, 0.6) !important;
    padding-right: 12px !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
}

#governorateListContent {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: fit-content !important;
}

#heatmapPanel h4 {
    color: rgba(255,255,255,0.7);
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.8px;
}

#countryMultiSelect {
    margin-bottom: 8px !important;
    padding: 6px !important;
    background: rgba(255,255,255,0.02) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    border-radius: 4px !important;
}

#countryMultiSelect label {
    color: #94a3b8;
}

/* Governorate Values List - Now Horizontal at Top */
/* CSS already defined above with position: fixed */

#governorateValuesList::-webkit-scrollbar {
    height: 6px;
}

#governorateValuesList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

#governorateValuesList::-webkit-scrollbar-thumb {
    background: rgba(90, 157, 232, 0.5);
    border-radius: 2px;
}

/* Governorate Item Styles */
.governorate-item {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 4px 8px !important;
    background: rgba(16,20,28,0.9) !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    color: #d0d8e4 !important;
    min-width: fit-content !important;
}

.governorate-item:hover {
    background: rgba(20,26,36,0.95) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

.governorate-name {
    color: #e2e8f0 !important;
    font-weight: 600 !important;
    font-size: 10px !important;
}

.governorate-value {
    color: rgba(255,255,255,0.5) !important;
    font-weight: 500 !important;
    font-size: 9px !important;
}

#metricSelector, #heatmapOpacity {
    margin-bottom: 12px;
}

#metricSelector label, #heatmapOpacity label {
    display: block;
    color: rgba(255,255,255,0.4);
    font-size: 9px;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#metricSelect, #heatmapOpacitySlider {
    width: 100%;
    padding: 6px 8px;
    background: rgba(255,255,255,0.03);
    color: #d0d8e4;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

#metricSelect:hover, #metricSelect:focus {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    outline: none;
}

#heatmapOpacitySlider {
    padding: 4px;
    margin-bottom: 6px;
}

#heatmapOpacityValue {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
}

#heatmapYearSelector {
    margin-bottom: 12px !important;
}

#heatmapYearSelector label {
    display: block;
    color: rgba(255,255,255,0.4);
    font-size: 9px;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#heatmapYear {
    width: 100%;
    padding: 6px 8px;
    background: rgba(255,255,255,0.03);
    color: #d0d8e4;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

#populationInfoPanel {
    margin: 12px 0 !important;
    padding: 10px !important;
    background: rgba(0, 150, 255, 0.05) !important;
    border: 1px solid rgba(0, 150, 255, 0.1) !important;
    border-radius: 6px !important;
}

#toggleHeatmapBtn {
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: background 0.15s ease;
    margin-top: 8px;
}

#toggleHeatmapBtn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

#toggleHeatmapBtn.active {
    background: rgba(59,130,180,0.25);
    color: #8bb8e0;
    border-color: rgba(59,130,180,0.3);
}

#heatmapLegend {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(12,16,24,0.97);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    color: #d0d8e4;
    z-index: 2220;
    transition: opacity 0.2s ease;
}

#heatmapComparisonStats {
    display: none !important;
    margin-top: 12px !important;
    padding: 10px !important;
    background: rgba(71, 85, 105, 0.15) !important;
    border: 1px solid rgba(71, 85, 105, 0.25) !important;
    border-radius: 6px !important;
    font-size: 11px;
    max-height: 200px;
    overflow-y: auto;
}

#heatmapComparisonStats::-webkit-scrollbar {
    width: 4px;
}

#heatmapComparisonStats::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

#heatmapComparisonStats::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.3);
}

/* Governorate Values List */
#governorateValuesList {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

#governorateListContent {
    animation: marqueeScroll 30s linear infinite;
    display: flex !important;
    width: fit-content;
}

#governorateValuesList::-webkit-scrollbar {
    width: 6px;
}

#governorateValuesList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#governorateValuesList::-webkit-scrollbar-thumb {
    background: rgba(90, 157, 232, 0.4);
    border-radius: 3px;
}

#governorateValuesList::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 157, 232, 0.6);
}

#governorateListContent > div {
    transition: all 0.2s ease;
    cursor: pointer;
}

#governorateListContent > div:hover {
    transform: translateX(4px);
    background: rgba(90, 157, 232, 0.2) !important;
}

/* Advanced Map Visualization Overlay */
.viz-toggle-btn {
    width: 100%;
    padding: 6px 10px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    margin: 0 0 8px 0;
    transition: background 0.15s ease;
    letter-spacing: 0.3px;
}

.viz-toggle-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.viz-toggle-btn:active {
    background: rgba(255,255,255,0.18);
}

/* Prediction info - clean, no animations */
#predictionInfo {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
}

#predictionInfo strong {
    display: inline-block;
}

/* Prediction year option styling */
#energyYear option[style*="color: rgb(90, 157, 232)"] {
    background: rgba(90, 157, 232, 0.1) !important;
}

/* ===== LARGE SCREENS (> 1280px) ===== */
@media (min-width: 1281px) {
    #energySidePanel {
        left: 16px;
        top: 28px;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        width: 220px;
    }
    
    #energySidePanel h3 {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    #energySidePanel label {
        font-size: 9px;
    }
    
    #layerControl {
        left: 16px;
        top: auto;
        bottom: 180px;
        max-height: 180px;
        overflow-y: auto;
        min-width: 160px;
        max-width: 180px;
        padding: 8px 10px;
    }
    
    #layerControl h4 {
        font-size: 9px;
        margin-bottom: 4px;
        margin-top: 0;
    }
    
    #layerControl label {
        font-size: 10px;
        margin-bottom: 3px;
    }
    
    #layerControl .slider-control {
        margin-top: 6px;
        padding-top: 6px;
    }
    
    #infoPanel {
        left: 20px;
        bottom: 180px;
        max-width: 350px;
        max-height: calc(40vh - 40px);
        overflow-y: auto;
    }
    
    #heatmapPanel {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-height: calc(100vh - 280px);
        overflow-y: auto;
    }
}

/* ===== Panel toggle (global) =====
   These styles intentionally live at the end of the stylesheet so they
   override any media-query or later rules that might re-show the panels.
*/
#togglePanelsBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    z-index: 2000;
}

#togglePanelsBtn.active {
    background: rgba(255,255,255,0.12);
}

/* When panels-hidden is set on body, hide non-critical overlay containers.
   Use !important and place this at the end of the file so it wins the cascade
   even if other rules (including media queries) set display for these items. */
body.panels-hidden #energySidePanel,
body.panels-hidden #layerControl,
body.panels-hidden #heatmapPanel,
body.panels-hidden #governorateValuesList,
body.panels-hidden #governorateValuesList-top {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Keep key modals interactive when panels are hidden */
body.panels-hidden #dataTableModal[style*="display: block"],
body.panels-hidden #methodologyModal[style*="display: block"],
body.panels-hidden #dataTableModal.open,
body.panels-hidden #methodologyModal.open {
    pointer-events: auto !important;
    z-index: 10050 !important;
}

/* Small/medium screens: ensure top controls (language selector, toggle button,
   and Cesium toolbar/satellite control) stay above the top marquee and governorate bar. */
@media (max-width: 1024px) {
    /* Raise header and toolbar above the marquee (marquee uses z-index:2000 inline).
       Use slightly higher values so controls remain clickable and visible. */
    /* Place header and toolbar below the marquee with a small gap */
    #header, #toolbar {
        z-index: 2100 !important;
        position: fixed !important; /* keep them pinned while scrolling */
        top: var(--top-offset) !important;
    }

    /* Make the toggle button and selects visually above everything */
    #togglePanelsBtn {
        z-index: 2110 !important;
        position: relative !important;
    }

    #mapStyle, #languageSelector {
        z-index: 2110 !important;
        position: relative !important;
        pointer-events: auto !important;
    }

    /* Cesium built-in toolbar (satellite/3D controls) */
    .cesium-viewer-toolbar {
        z-index: 2115 !important;
        position: relative !important;
        top: calc(var(--top-offset) + 2px) !important;
    }

    /* Also ensure any small floating satellite container or custom controls
       get placed above the marquee */
    .satellite-toggle, /* custom possible class */
    #satelliteContainer {
        z-index: 2115 !important;
        position: relative !important;
        top: calc(var(--top-offset) + 2px) !important;
    }

    /* If the marquee is still covering things, lower its stacking for small screens */
    #dataSourcesMarquee {
        z-index: 2000 !important; /* keep at 2000 but controls above it */
        pointer-events: none; /* let clicks fall through to controls beneath where appropriate */
    }

    /* Push the governorate horizontal bar below the marquee too so it doesn't
       collapse into the marquee on small screens */
    #governorateValuesList {
        top: calc(var(--top-offset) + 4px) !important;
        margin-top: 0 !important;
    }
}

/* ===== BOTTOM ANALYTICS BAR ===== */
#analyticsBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#analyticsBar.collapsed {
    transform: translateY(calc(100% - 42px));
}

#analyticsToggle {
    display: flex;
    justify-content: center;
    padding: 0;
}

#toggleAnalyticsBtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    background: rgba(16,20,28,0.94);
    border: 1px solid rgba(255,255,255,0.06);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    letter-spacing: 0.3px;
}

#toggleAnalyticsBtn:hover {
    background: rgba(20,26,36,0.98);
    color: rgba(255,255,255,0.8);
}

.analytics-icon {
    font-size: 14px;
}

.analytics-chevron {
    font-size: 9px;
    transition: transform 0.3s ease;
}

#analyticsBar.collapsed .analytics-chevron {
    transform: rotate(180deg);
}

#analyticsContent {
    background: rgba(8,10,18,0.97);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 14px 16px 16px;
    backdrop-filter: blur(12px);
    max-height: 56vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Analytics Tabs */
.analytics-tabs {
    display: flex;
    background: rgba(12, 16, 24, 0.98);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 24px;
    gap: 24px;
    justify-content: center;
}

.analytics-tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
    padding: 12px 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.analytics-tab:hover {
    color: rgba(255,255,255,0.8);
}

.analytics-tab.active {
    color: #4fc3f7;
    border-bottom-color: #4fc3f7;
    text-shadow: 0 0 10px rgba(79, 195, 247, 0.3);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

/* AI Stats Cards */
.ai-model-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.ai-stat-card {
    background: linear-gradient(145deg, rgba(20, 26, 36, 0.8) 0%, rgba(12, 16, 24, 0.9) 100%);
    border: 1px solid rgba(79, 195, 247, 0.15);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: inset 0 0 20px rgba(79, 195, 247, 0.03), 0 4px 12px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.ai-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(79, 195, 247, 0.6), transparent);
}

.ai-stat-label {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ai-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 0 0 15px rgba(79, 195, 247, 0.4);
}

/* ===== DASHBOARD INNER ===== */
.dash-inner { display: flex; flex-direction: column; gap: 10px; max-width: 1440px; margin: 0 auto; }

.dash-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 15px;
    padding: 5px;
}

.dash-chart-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 15px;
    height: 280px;
    position: relative;
    transition: border-color .2s;
}

.dash-chart-card:hover {
    border-color: rgba(255,255,255,0.1);
}

/* Responsive adjustments for charts */
@media (max-width: 900px) {
    .dash-charts-grid {
        grid-template-columns: 1fr;
    }
    .dash-chart-card {
        height: 240px;
    }
}

/* Site stats floating widget — horizontal bar top-center under marquee */
#siteStatsWidget {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: rgba(10,14,22,0.92);
    border: 1px solid rgba(255,255,255,0.07);
    border-top: none;
    border-radius: 0 0 14px 14px;
    backdrop-filter: blur(12px);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    font-family: inherit;
    pointer-events: all;
    max-width: 90vw;
}
#siteStatsWidget::-webkit-scrollbar { height: 4px; }
#siteStatsWidget::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
#siteStatsWidget::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 3px; }
#siteStatsWidget * { box-sizing: border-box; }

/* Prevent overlaps with the top-center stats widget on medium screens */
@media (max-width: 1530px) {
    /* Valeurs Totales Globales */
    #energySidePanel { top: 92px; }

    /* Visualisation des Données Régionales (inline top is overridden via !important) */
    #heatmapPanel > div { top: 92px !important; }
}

/* Header section */
.ssw-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 5px 12px 5px 12px;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.02);
    flex-shrink: 0;
    border-radius: 0;
}
.ssw-header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}
.ssw-details-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.ssw-details-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.ssw-details-btn.active {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
}
.ssw-details-btn svg {
    transition: transform 0.3s ease;
}
.ssw-details-btn.active svg {
    transform: rotate(180deg);
}

/* Submenu */
.ssw-submenu {
    position: fixed;
    top: 75px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 1040;
    background: rgba(10,14,22,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    padding: 15px;
    width: 90vw;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ssw-submenu.show {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}
.ssw-submenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.ssw-sub-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 12px;
}
.ssw-sub-card h4 {
    margin: 0 0 10px 0;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.ssw-sub-card p {
    margin: 6px 0;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ssw-sub-card p span {
    color: #fff;
    font-weight: 600;
}

.ssw-title {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    line-height: 1;
}
.ssw-live {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 600;
    color: #34d399;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}
.ssw-live-dot {
    width: 4px;
    height: 4px;
    background: #34d399;
    border-radius: 50%;
    animation: ssw-blink 1.8s ease infinite;
    flex-shrink: 0;
}
@keyframes ssw-blink { 0%,100%{opacity:1} 50%{opacity:.2} }
.ssw-collapse-btn {
    display: none;
}

/* Body: horizontal row of sections */
.ssw-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}
.ssw-body.ssw-hidden { display: none; }

/* Flatten the 2-col visitor/views row into the main flex */
.ssw-row { display: contents; }

/* Each card = a horizontal section */
.ssw-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 10px;
    border-right: 1px solid rgba(255,255,255,0.05);
    background: transparent;
    border-radius: 0;
    transition: background 0.2s;
    min-width: 0;
}
.ssw-card:last-child { border-right: none; }
.ssw-card:hover { background: rgba(255,255,255,0.02); }

.ssw-tag {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,0.34);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 2px;
    line-height: 1;
}
.ssw-big {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    letter-spacing: -0.5px;
    line-height: 1;
    margin-bottom: 2px;
    font-variant-numeric: tabular-nums;
}
.ssw-delta {
    font-size: 9px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 4px;
    border-radius: 3px;
}
.ssw-up { color: #34d399; background: rgba(52,211,153,0.09); }
.ssw-dn { color: #fb7185; background: rgba(251,113,133,0.09); }

/* Hide sparks — no vertical space in horizontal mode */
.ssw-spark { display: none; }

/* Rating — compact inline */
.ssw-rating-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
    flex-wrap: nowrap;
}
.ssw-rleft { display: contents; }
.ssw-rat-big {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.88);
    letter-spacing: -0.5px;
    line-height: 1;
}
.ssw-star-disp {
    display: flex;
    gap: 1px;
}
.ssw-star-disp svg { width: 7px; height: 7px; fill: #fbbf24; }
.ssw-star-disp svg.off { fill: rgba(255,255,255,0.1); }
.ssw-rat-cnt {
    font-size: 9px;
    color: rgba(255,255,255,0.32);
    white-space: nowrap;
}

/* Hide the bar chart in horizontal mode */
.ssw-bars { display: none; }
.ssw-bar-row { display: none; }
.ssw-bar-num, .ssw-bar-track, .ssw-bar-fill, .ssw-bar-pct { display: none; }

/* Rate input — flat inline row */
.ssw-rate-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.ssw-mini-input,
.ssw-comment-input {
    height: 22px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.92);
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    outline: none;
}
.ssw-mini-input { width: 74px; }
.ssw-comment-input { width: 160px; }
.ssw-mini-input::placeholder,
.ssw-comment-input::placeholder { color: rgba(255,255,255,0.28); }
.ssw-mini-input:focus,
.ssw-comment-input:focus { border-color: rgba(100,130,255,0.45); }
.ssw-rate-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    padding-top: 0;
    border-top: none;
    border-left: none;
    padding-left: 0;
    margin-top: 0;
    flex-wrap: nowrap;
}
.ssw-rate-label {
    font-size: 7px;
    color: rgba(255,255,255,0.22);
    white-space: nowrap;
}
.ssw-input-stars { display: flex; gap: 2px; }
.ssw-input-stars svg {
    width: 12px;
    height: 12px;
    fill: rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.15s ease;
}
.ssw-input-stars svg.on { fill: #fbbf24; filter: drop-shadow(0 0 2px rgba(251,191,36,0.3)); }
.ssw-input-stars svg:hover { transform: scale(1.2) rotate(-5deg); }
.ssw-input-stars svg:active { transform: scale(0.9); }
.ssw-submit-btn {
    padding: 3px 7px;
    background: rgba(80,110,220,0.6);
    color: rgba(255,255,255,0.85);
    border: none;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ssw-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.ssw-submit-btn:hover { background: rgba(100,130,255,0.75); }
.ssw-submit-btn:active { transform: scale(0.96); }
.ssw-submit-btn.done { background: rgba(52,211,153,0.5); pointer-events: none; }
.ssw-feedback {
    font-size: 9px;
    color: rgba(255,255,255,0.34);
    white-space: nowrap;
}
.ssw-feedback.hot { color: #fbbf24; }
.ssw-feedback.err { color: #fb7185; }

/* Feed — horizontal strip */
.ssw-feed-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 360px;
    padding-bottom: 2px;
}
.ssw-feed-list::-webkit-scrollbar { height: 3px; }
.ssw-feed-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.ssw-feed-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.ssw-f-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.04);
    flex: 0 0 auto;
}
.ssw-f-av {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
    object-fit: cover;
}
.ssw-f-name {
    font-weight: 700;
    white-space: nowrap;
    color: rgba(255,255,255,0.75);
    font-size: 10px;
}
.ssw-f-stars { display: flex; }
.ssw-f-stars svg { width: 8px; height: 8px; fill: #fbbf24; }
.ssw-f-comment {
    font-size: 10px;
    color: rgba(255,255,255,0.48);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ssw-f-time { font-size: 9px; color: rgba(255,255,255,0.28); flex-shrink: 0; }

/* See more button */
.ssw-see-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.5);
    font-size: 10px;
    font-family: inherit;
    padding: 2px 8px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ssw-see-more-btn:hover {
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.85);
}

/* All Comments Modal */
.ssw-comments-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: rgba(0,0,0,0.72);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.ssw-comments-modal-overlay.open {
    display: flex;
}
.ssw-comments-modal-box {
    background: #0f1117;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 480px;
    max-width: 95vw;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
    animation: tutTipIn 0.25s cubic-bezier(0.16,1,0.3,1);
}
.ssw-comments-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    flex-shrink: 0;
}
.ssw-comments-modal-close {
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.5);
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.ssw-comments-modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.ssw-comments-modal-list {
    overflow-y: auto;
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ssw-comments-modal-list::-webkit-scrollbar { width: 4px; }
.ssw-comments-modal-list::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.ssw-comments-modal-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.ssw-cm-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    flex-wrap: wrap;
}
.ssw-cm-item .ssw-f-av {
    width: 28px;
    height: 28px;
    font-size: 13px;
    flex-shrink: 0;
}
.ssw-cm-item .ssw-f-name {
    font-size: 12px;
    font-weight: 700;
}
.ssw-cm-item .ssw-f-stars svg { width: 10px; height: 10px; }
.ssw-cm-comment {
    flex-basis: 100%;
    margin: 4px 0 0 38px;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    word-break: break-word;
}

/* Analytics responsive */
@media (max-width: 1400px) {
    .analytics-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .analytics-grid { grid-template-columns: repeat(2, 1fr); }
    .ssw-f-item:nth-child(n+5) { display: none; }
}
@media (max-width: 600px) {
    .analytics-grid { grid-template-columns: 1fr; gap: 8px; }
    #analyticsContent { padding: 8px 10px 12px; }
    #siteStatsWidget { display: none; }
}


/* ===== HIDE BOOKMARKS EVERYWHERE ===== */
#bookmarksPanel {
    display: none !important;
}

/* ===== Cloudflare badge + verification overlay ===== */
.ssw-cf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    flex-shrink: 0;
    background: #ffffff;
    padding: 4px 6px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ssw-cf-badge:hover {
    opacity: 1;
}

.ssw-cf-badge img {
    height: 12px;
    width: auto;
    display: block;
    object-fit: contain;
}

.ssw-cf-badge-standalone {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.85;
    margin-left: 12px;
    margin-right: 12px;
    transition: opacity 0.2s;
}

.ssw-cf-badge-standalone:hover {
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ssw-cf-badge-standalone img {
    height: 20px;
    width: auto;
    display: block;
    object-fit: contain;
}

.cf-verify-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    z-index: 30000;
}

.cf-verify-card {
    width: 340px;
    max-width: calc(100% - 40px);
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 16px 16px 14px;
    color: #d0d8e4;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.cf-verify-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.cf-verify-sub {
    font-size: 12px;
    color: rgba(208, 216, 228, 0.75);
    margin-bottom: 12px;
}

.cf-verify-hint {
    font-size: 11px;
    color: rgba(208, 216, 228, 0.55);
    margin-top: 10px;
    min-height: 14px;
}

.ssw-feed-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px 2px;
}

/* Move button up if it overlaps with the Cesium timeline/controls */
.contact-floating-btn {
    position: fixed;
    bottom: 80px; /* Moved up to avoid satellite button */
    right: 24px;
    background: rgba(15, 20, 28, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}
@media (max-width: 768px) {
    .contact-floating-btn {
        bottom: 80px; /* Move above mobile controls */
    }
}

/* Ensure it doesn't overlap with the satellite layout button */
.cesium-viewer-bottom {
    padding-bottom: 60px !important; /* Give space for our button */
}

.contact-floating-btn:hover {
    background: rgba(25, 32, 45, 0.95);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

.contact-floating-btn svg {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.contact-floating-btn:hover svg {
    opacity: 1;
}

.contact-modal {
    display: none;
    position: fixed;
    z-index: 20000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 8, 12, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal.show {
    opacity: 1;
}

.contact-modal-content {
    background: linear-gradient(145deg, rgba(22, 28, 36, 0.95) 0%, rgba(15, 20, 28, 0.98) 100%);
    margin: 8vh auto;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-modal.show .contact-modal-content {
    transform: translateY(0) scale(1);
}

.close-contact-modal {
    color: rgba(255, 255, 255, 0.4);
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0);
}

.close-contact-modal:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.contact-modal-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.contact-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.3px;
}

.contact-modal-subtitle {
    margin: 6px 0 0 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.contact-form-group {
    margin-bottom: 20px;
}

.contact-form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.contact-form-group input, 
.contact-form-group select, 
.contact-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 22, 0.6);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.contact-form-group input::placeholder,
.contact-form-group textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.contact-form-group input:focus, 
.contact-form-group select:focus, 
.contact-form-group textarea:focus {
    outline: none;
    border-color: rgba(79, 195, 247, 0.6);
    background: rgba(10, 14, 22, 0.9);
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.15), inset 0 2px 4px rgba(0,0,0,0.2);
}

.contact-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.contact-submit-btn {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.contact-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #366f94 0%, #5f528f 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.contact-submit-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.contact-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
    box-shadow: none;
}

.contact-status-message {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    min-height: 20px;
    border-radius: 6px;
    padding: 8px;
    display: none;
    font-weight: 500;
}

.contact-status-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.contact-status-success { 
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80; 
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.contact-status-error { 
    background: rgba(248, 113, 113, 0.1);
    color: #f87171; 
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* ===== ONBOARDING TUTORIAL SYSTEM ===== */

/* Language selection overlay */
.tut-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(2, 4, 10, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: tutFadeIn 0.4s ease;
}
@keyframes tutFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tut-lang-card {
    background: rgba(16, 20, 30, 0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px 36px 30px;
    width: 380px;
    max-width: 92vw;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
    animation: tutCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes tutCardIn {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tut-lang-icon {
    margin: 0 auto 18px;
    color: rgba(100, 160, 255, 0.7);
}

.tut-lang-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.tut-lang-sub {
    margin: 0 0 24px;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
}

.tut-lang-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.tut-lang-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tut-lang-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.tut-lang-btn:active {
    transform: scale(0.98);
}
.tut-lang-btn img {
    width: 28px;
    height: 19px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.tut-skip-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    margin-top: 4px;
}
.tut-skip-label input {
    accent-color: #3b82f6;
    cursor: pointer;
}

/* Spotlight overlay */
.tut-spotlight {
    position: fixed;
    inset: 0;
    z-index: 99998;
    pointer-events: none;
}
.tut-spotlight::before {
    content: '';
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: all;
}

.tut-spot-ring {
    position: fixed;
    border-radius: 0px;
    box-shadow: 0 0 0 9999px rgba(2, 4, 10, 1);
    border: 2px solid #ffffff;
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 99999;
}
.tut-spot-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 0px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: tutPulse 2s ease-in-out infinite;
}
@keyframes tutPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(1.05); }
}

/* Tooltip */
.tut-tooltip {
    position: fixed;
    z-index: 100000;
    width: 340px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    pointer-events: all;
    animation: tutTipIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    color: #111111;
}
@keyframes tutTipIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tut-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.tut-step-badge {
    background: #000000;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.tut-close-btn {
    background: transparent;
    border: none;
    color: #666666;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.tut-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
}

.tut-tooltip-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: #000000;
    letter-spacing: -0.3px;
}
.tut-tooltip-desc {
    margin: 0 0 20px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #444444;
}

.tut-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.tut-dots {
    display: flex;
    gap: 6px;
}
.tut-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cccccc;
    transition: all 0.25s;
}
.tut-dots .dot.active {
    background: #000000;
    width: 18px;
    border-radius: 3px;
}

.tut-nav-btns {
    display: flex;
    gap: 8px;
}
.tut-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.tut-btn-back {
    background: #f0f0f0;
    color: #333333;
}
.tut-btn-back:hover {
    background: #e0e0e0;
    color: #000000;
}
.tut-btn-next {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.tut-btn-next:hover {
    background: #222222;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.tut-btn-next:active {
    transform: scale(0.97);
}
