:root {
    /* Light Mode Variables (Default) */
    --bg-body: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4b5563;
    /* User requested to REVERT to previous light green style for day mode */
    --bg-header: rgba(62, 142, 0, 0.9);
    /* Bright Green Translucent */
    --border-header: rgba(255, 255, 255, 0.2);
    --bg-card: #f9fafb;
    --border-card: #e5e7eb;
}

/* Dark Mode Variables */
body.dark-theme {
    /* Rich Deep Green/Slate Black - Improved from pure black */
    --bg-body: #051a0d;
    /* Very deep green-black/slate */
    --text-primary: #f3f4f6;
    /* Bright white-gray */
    --text-secondary: #d1d5db;
    /* Lighter gray for better reading */

    /* Header stays Dark Green (User liked this for night) */
    --bg-header: #2e5c0e;
    --border-header: rgba(255, 255, 255, 0.1);
    --bg-card: rgba(255, 255, 255, 0.05);
    /* Slightly more visible card bg */
    --border-card: rgba(255, 255, 255, 0.1);
}

/* Base Styles using Variables */
body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Night Mode Texture Overlay */
body.dark-theme::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Technical Grid Pattern for Premium Look */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    opacity: 1;
}

/* Header Styles Override */
/* Header Styles Override */
.glass-nav {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.1s ease-out, background-color 0.2s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Header Text Colors - Dark for White Header */
header .text-dark,
header nav a {
    color: #1a1a1a !important;
}

header nav a:hover {
    color: #4a8e00 !important;
    /* Brand Green */
}

header i {
    color: #4a8e00;
    /* Brand Green for consistency on white */
}

header .border-brand {
    border-color: #4a8e00 !important;
    color: #1a1a1a !important;
}

header .hover\:text-brand:hover {
    color: #4a8e00 !important;
    text-shadow: none;
}

/* Button overrides */
header .hover\:bg-brand:hover {
    background-color: #4a8e00 !important;
    color: white !important;
}

/* Theme Toggle Button Styles - Light Mode */
#theme-toggle {
    background: transparent;
    border: 1px solid #d1d5db;
    /* Gray-300 */
    border-radius: 9999px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
    /* Gray-600 */
}

#theme-toggle:hover {
    background-color: #f3f4f6;
    /* Gray-100 */
    color: #1f2937;
    /* Gray-800 */
    border-color: #9ca3af;
    /* Gray-400 */
}

/* Dark Mode Specific Overrides */
body.dark-theme .bg-white {
    background-color: var(--bg-body) !important;
}

body.dark-theme .bg-gray-50 {
    background-color: #0f1f13 !important;
    /* Slightly lighter deep green */
}

body.dark-theme .bg-gray-100 {
    background-color: #1a2a1e !important;
}

body.dark-theme .text-dark {
    color: #ffffff !important;
}

body.dark-theme .text-gray-600 {
    color: #d1d5db !important;
    /* Better contrast */
}

body.dark-theme .border-gray-200,
body.dark-theme .border-black\/10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .bg-black\/5 {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme iframe {
    filter: grayscale(100%) invert(92%) contrast(83%);
}

/* Dynamic Logo Toggling */
/* Since header is always dark/green, we prefer the WHITE/NIGHT logo always visible */
/* Dynamic Logo Toggling - Forced Day/Dark Logo for White Header */
.logo-day {
    display: block !important;
}

.logo-night {
    display: none !important;
}

/* --- TECH / TOPOGRAPHIC BACKGROUND --- */
#tech-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Above Earth (0), Behind Content */
    pointer-events: none;
    overflow: hidden;
}

/* Topographic Pattern - Concentric Rings around Planet */
/* Topographic Pattern - Organic Isoline / Terrain Map Style */
/* Topographic Pattern - High Fidelity Isoline Map */
/* Topographic Pattern - High Fidelity Isoline Map (NEW ANIMATED) */
/* Topographic Pattern - High Fidelity Isoline Map (NEW ANIMATED) */
.topographic-pattern {
    position: absolute;
    inset: 0;
    opacity: 1;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    /* Using final uploaded topographic image - force fit */
    background-image: url('../img/topographic-final.png');
}

/* Adjust position to align "center" of rings with the 3D Earth */
/* Media query override removed to keep 100% 100% fit on all screens */


body.dark-theme .topographic-pattern {
    opacity: 0.08;
    filter: invert(1);
}

/* Technical Overlay (CAD Style) */
.tech-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    font-family: 'Courier New', monospace;
}

.tech-marker {
    position: absolute;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 600;
}

body.dark-theme .tech-marker {
    color: rgba(255, 255, 255, 0.4);
}

/* Crosshair Symbol (+ box) */
.tech-crosshair {
    width: 20px;
    height: 20px;
    border: 1px solid currentColor;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-crosshair::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    background-color: currentColor;
}

.tech-crosshair::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: currentColor;
}

/* Floating Markers Positioning - EXACT REPLICA */
/* 1. AAC Marker (Top Center-Left of Planet) - "AAC: 2500 msnm" */
.marker-float-1 {
    top: 18%;
    left: 55%;
    /* Positioned above-left of the planet center */
    display: flex;
    align-items: center;
}

.tech-dot {
    width: 6px;
    height: 6px;
    background-color: currentColor;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

body.dark-theme .tech-dot {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Line extending from dot to text */
.marker-float-1 .tech-dot::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 1px;
    background-color: currentColor;
    bottom: 50%;
    left: 100%;
    opacity: 0.5;
}

.marker-float-1 .flex {
    margin-left: 50px;
    /* Space for line */
    text-align: left;
}


/* 2. AGO Marker (Top Right of Planet) - "AGO: 2500 msnm" */
.marker-float-2 {
    top: 32%;
    right: 18%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.marker-float-2 .tech-dot {
    margin-bottom: 5px;
}

/* Vertical line dropping down from dot */
.marker-float-2 .tech-dot::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 30px;
    background-color: currentColor;
    top: 100%;
    left: 50%;
    opacity: 0.5;
}

.marker-float-2 .flex {
    margin-top: 35px;
    /* Space for vertical line */
}


/* 3. Floating Plus (Top Left - Big) */
.marker-float-3 {
    top: 12%;
    left: 5%;
    opacity: 0.6;
}

.marker-float-3 .tech-plus {
    font-size: 32px;
    font-weight: 200;
}

/* 4. Floating Plus (Mid Right - Big) */
.marker-float-4 {
    top: 50%;
    right: 5%;
    opacity: 0.6;
}

.marker-float-4 .tech-plus {
    font-size: 32px;
    font-weight: 200;
}

/* Bottom Text Blocks - Exact Data */
.marker-bl-text {
    bottom: 6%;
    left: 6%;
    text-align: left;
    opacity: 0.6;
    line-height: 1.5;
    font-size: 9px;
    color: #888;
}

.marker-br-text {
    bottom: 6%;
    right: 6%;
    text-align: right;
    display: none;
    opacity: 0.6;
    line-height: 1.5;
    font-size: 9px;
    color: #888;
}

@media (min-width: 768px) {
    .marker-br-text {
        display: block;
    }
}

/* Bottom Text Blocks */
.marker-bl-text {
    bottom: 5%;
    left: 5%;
    text-align: left;
    opacity: 0.7;
    line-height: 1.4;
    font-size: 9px;
}

.marker-br-text {
    bottom: 5%;
    right: 5%;
    text-align: right;
    display: none;
    /* Hide on mobile */
    opacity: 0.7;
    line-height: 1.4;
    font-size: 9px;
}

@media (min-width: 768px) {
    .marker-br-text {
        display: block;
    }

    /* Desktop adjustments for floaters */
    .marker-float-1 {
        top: 20%;
        right: 30%;
    }

    .marker-float-2 {
        top: 40%;
        right: 10%;
    }
}

/* Axis Lines */
.tech-axis {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.08);
}

body.dark-theme .tech-axis {
    background-color: rgba(255, 255, 255, 0.05);
}

.axis-v {
    top: 10%;
    bottom: 10%;
    right: 28%;
    width: 1px;
    opacity: 0.3;
}

/* Vertical line through planet center approx */
.axis-h {
    left: 5%;
    right: 5%;
    top: 50%;
    height: 1px;
    opacity: 0.2;
}

/* --- Nuevas adiciones para Refinamiento Visual --- */

/* Fondo Patrón Topográfico Suave */
/* Fondo Patrón Topográfico Denso y Concéntrico */
.bg-topography {
    background-color: #ffffff;
    /* Background handled by .topographic-pattern to strictly fit container */
    background-image: none;
}

/* Empty media query removed */


@keyframes breatheMap {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.03);
    }
}

/* Efecto de Desenfoque de Movimiento para Hélices */
/* Efecto de Desenfoque de Movimiento para Hélices - REMOVED */

@keyframes prop-spin {
    0% {
        transform: rotate(0deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1.1);
    }
}

/* Earth Container is now solid (no mask effect) */

/* Corner Crosshair Markers */
.corner-cross {
    position: absolute;
    font-size: 24px;
    font-weight: 200;
    color: rgba(0, 0, 0, 0.4);
    font-family: 'Arial', sans-serif;
    z-index: 5;
}

.corner-cross.top-left {
    top: 8%;
    left: 5%;
}

.corner-cross.top-right {
    top: 8%;
    right: 5%;
}

.corner-cross.bottom-left {
    bottom: 8%;
    left: 5%;
}

.corner-cross.bottom-right {
    bottom: 8%;
    right: 5%;
}

body.dark-theme .corner-cross {
    color: rgba(255, 255, 255, 0.3);
}

/* Altitude Labels with Lines */
.altitude-label {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
    z-index: 5;
}

.altitude-label .label-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.altitude-label .dot {
    width: 5px;
    height: 5px;
    background-color: currentColor;
    border-radius: 50%;
    display: inline-block;
}

body.dark-theme .altitude-label {
    color: rgba(255, 255, 255, 0.5);
}

/* Corner Technical Data Blocks */
.tech-data-block {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 0.3px;
    line-height: 1.6;
    z-index: 5;
}

.tech-data-block.bottom-left {
    bottom: 5%;
    left: 5%;
    text-align: left;
}

.tech-data-block.bottom-right {
    bottom: 5%;
    right: 5%;
    text-align: right;
}

body.dark-theme .tech-data-block {
    color: rgba(255, 255, 255, 0.4);
}