/* 
 * LEOS: Mission Ready - Brand UI Styles
 * Aligned with brand_ui.md specifications
 * Theme: Space exploration, futuristic UI
 * Highlight Color: Neon blue (#00cfff)
 */

/* =========================================== */
/* IMPORTS AND VARIABLES                       */
/* =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Segoe+UI:wght@300;400;500;600&display=swap');

:root {
    /* Brand Colors */
    --neon-blue: #00cfff;
    --neon-blue-dark: #0099cc;
    --neon-blue-light: #66d9ff;
    --neon-blue-glow: rgba(0, 207, 255, 0.3);
    
    /* Core Palette */
    --background-black: #000000;
    --background-dark: #0a0a0a;
    --background-panel: rgba(0, 0, 0, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    
    /* UI Elements */
    --border-glow: rgba(0, 207, 255, 0.5);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --button-bg: rgba(0, 207, 255, 0.2);
    --button-hover: rgba(0, 207, 255, 0.4);
    
    /* Fonts */
    --font-primary: 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* =========================================== */
/* BASE STYLES                                 */
/* =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-black);
    color: var(--text-primary);
    overflow: hidden;
    font-weight: 400;
}

body.hide-time #time-display {
    display: none !important;
}

#renderCanvas-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* Ensure render canvas doesn't block login screen */
body.mission-ready-mode:not(.authenticated) #renderCanvas-container {
    z-index: 1;
}

#renderCanvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}

/* =========================================== */
/* LOADING SCREEN                              */
/* =========================================== */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000; /* Solid black background for aurora canvas */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* center content vertically */
    z-index: 10000; /* Increase z-index to ensure it's on top */
    overflow: hidden;
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: 100vh;
    /* Debug - ensure it takes full screen */
    width: 100% !important;
    height: 100% !important;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* start from top */
    height: 100vh; /* full viewport */
    gap: 0;
    position: relative;
    z-index: 1002; /* Above aurora canvas */
    padding-top: 10vh; /* start content from top */
}

.leos-logo {
    font-size: 4.2rem; /* slightly smaller but still prominent */
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 0 20px var(--neon-blue-glow);
    margin-top: 15vh; /* significant space from CyberRTS logo */
    margin-bottom: 4rem; /* good space before motto */
    letter-spacing: 0.2em;
}

.leos-logo .highlight {
    color: var(--neon-blue);
}

.loading-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--neon-blue); /* Changed to neon blue */
    letter-spacing: 0.1em;
    margin-top: 0; /* no extra space above */
    margin-bottom: 3rem; /* more space before facts box */
    text-shadow: 0 0 8px var(--neon-blue-glow);
    display: flex;
    gap: 0.5em;
    justify-content: center;
}

.subtitle-word {
    opacity: 0;
    transform: translateY(10px); /* Simpler transform instead of blur */
    animation: subtitleFadeIn 1.2s forwards;
    will-change: opacity, transform; /* Performance hint */
    backface-visibility: hidden;
}
.subtitle-word:nth-child(1) {
    animation-delay: 0.5s;
}
.subtitle-word:nth-child(2) {
    animation-delay: 2.0s;
}
.subtitle-word:nth-child(3) {
    animation-delay: 3.5s;
}

@keyframes subtitleFadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px); /* Simpler transform instead of blur */
    }
    40% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* =========================================== */
/* LOADING WAVE ANIMATION                     */
/* =========================================== */

.loading-wave {
    font-size: 48px;
    font-family: var(--font-primary);
    font-weight: 300;
    perspective: 80px;
    transform-style: preserve-3d;
    text-align: center;
    letter-spacing: -0.02em;
    margin: 2rem auto 1rem auto; /* more space above for facts box */
}

.loading-wave span {
    position: relative;
    transition: all .3s ease;
    display: inline-block;
    animation: loadingWave 2.4s ease infinite;
    letter-spacing: -0.02em;
    transform-origin: 100% 50%;
    transform-style: preserve-3d;
    will-change: transform, color;
}

.loading-wave span:nth-child(1) { animation-delay: 0s; }
.loading-wave span:nth-child(2) { animation-delay: 0.05s; }
.loading-wave span:nth-child(3) { animation-delay: 0.1s; }
.loading-wave span:nth-child(4) { animation-delay: 0.15s; }
.loading-wave span:nth-child(5) { animation-delay: 0.2s; }
.loading-wave span:nth-child(6) { animation-delay: 0.25s; }
.loading-wave span:nth-child(7) { animation-delay: 0.3s; }
.loading-wave span:nth-child(8) { animation-delay: 0.35s; }
.loading-wave span:nth-child(9) { animation-delay: 0.4s; }
.loading-wave span:nth-child(10) { animation-delay: 0.45s; }

@keyframes loadingWave {
    0% {
        transform: translate3D(0,0,0) scale(1) rotateY(0);
        color: var(--neon-blue);
        text-shadow: 0 0 10px var(--neon-blue-glow);
    }
    12% {
        transform: translate3D(2px,-1px,2px) scale(1.18) rotateY(6deg);
        color: var(--neon-blue-light);
        text-shadow: 0 0 20px rgba(102, 217, 255, 0.8), 0 0 40px rgba(102, 217, 255, 0.4);
    }
    24% {
        transform: translate3D(0,0,0) scale(1) rotateY(0);
        color: #ffffff;
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.7), 0 0 40px var(--neon-blue-glow);
        opacity: 1;
    }
    36% {
        color: var(--neon-blue-light);
        text-shadow: 0 0 15px rgba(102, 217, 255, 0.6), 0 0 30px rgba(102, 217, 255, 0.2);
    }
    48% {
        color: var(--neon-blue);
        text-shadow: 0 0 12px var(--neon-blue-glow), 0 0 25px rgba(0, 207, 255, 0.2);
    }
    60% {
        color: #4080ff;
        text-shadow: 0 0 10px rgba(64, 128, 255, 0.4), 0 0 20px rgba(64, 128, 255, 0.2);
    }
    72% {
        color: var(--neon-blue-dark);
        text-shadow: 0 0 8px rgba(0, 153, 204, 0.3), 0 0 15px rgba(0, 153, 204, 0.15);
    }
    84% {
        color: var(--neon-blue);
        text-shadow: 0 0 6px var(--neon-blue-glow), 0 0 12px rgba(0, 207, 255, 0.1);
    }
    100% {
        transform: scale(1);
        color: var(--neon-blue);
        text-shadow: 0 0 5px var(--neon-blue-glow);
        opacity: 0.8;
    }
}

@media (max-width: 768px) {
    .loading-wave {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .loading-wave {
        font-size: 24px;
    }
}

.loader {
    position: relative;
    width: 80px; /* smaller spinner */
    height: 80px;
    margin: var(--spacing-md) auto;
}

.loader-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: center center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: none;
    background: conic-gradient(from 0deg, var(--neon-blue), transparent 70%);
    box-shadow: 0 0 20px var(--neon-blue-glow);
    animation: spin 4s linear infinite;
    /* Performance optimizations */
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
}

.loader-ring:nth-child(1) {
    transform: scale(1) translateZ(0);
    animation-duration: 6s; /* Slower for less CPU usage */
}

.loader-ring:nth-child(2) {
    transform: scale(0.85) translateZ(0);
    animation: spinReverse 7s linear infinite; /* Slower for less CPU usage */
}

.loader-ring:nth-child(3) {
    transform: scale(0.7) translateZ(0);
    animation-duration: 8s; /* Slower for less CPU usage */
}

/* new reverse spin animation for alternate rings */
@keyframes spinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.space-fact {
    margin-top: 4rem; /* significant space from loading wave */
    padding: var(--spacing-lg) var(--spacing-xl);
    background: rgba(0, 207, 255, 0.1);
    border: 2px solid var(--neon-blue-glow);
    border-radius: 8px;
    max-width: 80%; /* larger box */
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--neon-blue-glow);
    min-height: 3.5em; /* ensures consistent height, prevents shifting */
    overflow: hidden; /* clamp extra lines so box height fixed */
    display: flex;
    align-items: center;
    justify-content: center;
}

.space-fact p {
    margin: 0; /* remove default paragraph margins */
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
    font-size: 1.1rem;
    text-align: center; /* center multiline facts */
}

/* =========================================== */
/* WELCOME MODAL (TUTORIAL)                   */
/* =========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15000; /* Higher than SDA panels (10000) to ensure modals appear on top */
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--background-panel);
    border: 2px solid var(--border-glow);
    border-radius: 12px;
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 30px var(--neon-blue-glow);
    animation: modalSlideIn 0.5s ease-out;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--neon-blue);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

.tutorial-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--spacing-sm);
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.control-item:last-child {
    border-bottom: none;
}

.control-key {
    font-weight: 500;
    color: var(--neon-blue);
    font-family: var(--font-mono);
    background: rgba(0, 207, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.control-desc {
    color: var(--text-secondary);
    flex: 1;
    text-align: right;
}


/* =========================================== */
/* BUTTONS                                     */
/* =========================================== */

.primary-button {
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-blue-dark) 100%);
    color: var(--text-primary);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 6px;
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px var(--neon-blue-glow);
    width: 100%;
    margin-top: var(--spacing-lg);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px var(--neon-blue-glow);
}

.secondary-button {
    background: var(--button-bg);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 6px;
    font-family: var(--font-primary);
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.secondary-button:hover {
    background: var(--button-hover);
    box-shadow: 0 0 10px var(--neon-blue-glow);
}

/* =========================================== */
/* PANEL TOGGLE BUTTON                        */
/* =========================================== */

.panel-toggle {
    position: fixed;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    width: 50px;
    height: 50px;
    background: var(--background-panel);
    border: 2px solid var(--border-glow);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px var(--neon-blue-glow);
}

.panel-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--neon-blue-glow);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--neon-blue);
    margin: 2px 0;
    transition: 0.3s;
    border-radius: 1px;
}

.panel-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.panel-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.panel-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* =========================================== */
/* FLOATING DISPLAYS                           */
/* =========================================== */

.floating-display {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-panel);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    z-index: 100;
    box-shadow: 0 0 15px var(--neon-blue-glow);
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 260px;
    text-align: center;
}

.floating-display:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 5px 25px var(--neon-blue-glow);
}

#current-time {
    font-size: 1.18em;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #66d9ff; /* softer blue for numbers */
    background: rgba(0,18,32,0.98);
    border-radius: 7px;
    padding: 0.45em 1.1em;
    box-shadow: 0 0 16px 2px #00eaff, 0 2px 10px #00cfff22; /* neon glow only on edges */
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: box-shadow 0.2s, background 0.2s;
    pointer-events: auto;
    outline: none;
    text-shadow: none; /* remove neon from numbers */
}

#current-time:hover {
    box-shadow: 0 0 24px 4px #00eaff, 0 4px 18px #00cfff44;
    background: rgba(0,23,40,1);
}

#time-display {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    min-width: 0;
    text-align: center;
    pointer-events: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

#time-controls {
    margin-top: 8px;
    display: flex;
    flex-direction: row;
    gap: 1.2em;
    justify-content: center;
    align-items: center;
    background: rgba(0, 23, 40, 0.92);
    border-radius: 8px;
    box-shadow: 0 2px 10px #00cfff11;
    padding: 0.5em 1.2em;
    transition: opacity 0.2s;
    opacity: 1;
    z-index: 1201;
    position: relative;
    left: 0;
    transform: none;
    min-width: 220px;
    border: none;
}

#time-controls.hidden {
    display: none;
    opacity: 0;
}

.time-btn {
    background: none;
    color: #66d9ff;
    border: none;
    border-radius: 5px;
    padding: 0.3em 0.9em;
    font-size: 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: none;
    min-width: 48px;
    outline: none;
}

.time-btn.speed-btn {
    font-size: 0.95rem;
    padding: 0.3em 0.7em;
    margin: 0 0.1em;
}

.time-btn.active {
    background: #223344;
    color: #00cfff;
    font-weight: bold;
    border-radius: 5px;
}

#time-info-note {
    display: none;
    position: absolute;
    left: 50%;
    top: 260%; /* drop it much further down so never cut off */
    transform: translateX(-50%);
    min-width: 380px;
    max-width: 520px;
    background: rgba(10,18,32,0.98);
    color: #66d9ff;
    font-size: 1em;
    border-radius: 16px;
    box-shadow: 0 8px 36px #00cfff22;
    padding: 1.3em 2.2em 1.3em 1.7em;
    z-index: 3500;
    text-align: left;
    border: none;
    line-height: 1.7;
    pointer-events: auto;
    outline: none;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    align-items: flex-start;
    font-weight: 400;
    opacity: 0.97;
}

#time-info-note b {
    color: #00eaff;
    font-size: 1.08em;
    margin-bottom: 0.2em;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-shadow: 0 0 8px #00eaff22;
}

/* =========================================== */
/* TELEMETRY DASHBOARD                         */
/* =========================================== */

.telemetry-dashboard {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-panel);
    backdrop-filter: blur(15px);
    border: 2px solid var(--border-glow);
    border-radius: 12px;
    padding: var(--spacing-lg);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 800;
    box-shadow: 0 0 30px var(--neon-blue-glow);
    display: none;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-glow);
}

.dashboard-header h3 {
    color: var(--neon-blue);
    font-size: 1.4rem;
    font-weight: 500;
}

.close-dashboard {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: color 0.3s ease;
}

.close-dashboard:hover {
    color: var(--neon-blue);
}

.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.telemetry-card {
    background: rgba(0, 20, 40, 0.9);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: var(--spacing-md);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.telemetry-card:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue-glow);
    transform: translateY(-2px);
}

.telemetry-card h4 {
    color: var(--neon-blue);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--spacing-sm);
}

.telemetry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.telemetry-item:last-child {
    border-bottom: none;
}

.telemetry-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
}

.telemetry-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-weight: 500;
    margin-right: var(--spacing-sm);
}

/* =========================================== */
/* NASA-STYLE ENHANCED TELEMETRY DASHBOARD     */
/* =========================================== */

.mission-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(0, 50, 100, 0.3);
    border: 1px solid var(--neon-blue);
    border-radius: 8px;
}

.mission-status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff4444;
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background: #44ff44;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--neon-blue);
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
}

.mission-clock {
    text-align: right;
}

.clock-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.clock-value {
    color: var(--neon-blue);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.data-quality {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.quality-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
}

.quality-indicator.good {
    background: #44ff44;
}

.coordinate-system, .reference-frame, .mission-classification {
    font-size: 0.8rem;
    color: var(--neon-blue);
    background: rgba(0, 207, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.telemetry-grid .telemetry-item {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: var(--spacing-sm);
    align-items: center;
}

.telemetry-unit {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    min-width: 40px;
    text-align: right;
}

.altitude-highlight .telemetry-value,
.speed-highlight .telemetry-value {
    color: var(--neon-blue);
    font-weight: 600;
}

.status-operational {
    color: #44ff44 !important;
}

.comm-active {
    color: var(--neon-blue) !important;
}

/* Enhanced telemetry cards */
.orbital-card {
    border-left: 4px solid #ff6b35;
}

.position-card {
    border-left: 4px solid var(--neon-blue);
}

.velocity-card {
    border-left: 4px solid #44ff44;
}

.mission-card {
    border-left: 4px solid #ff44ff;
}

.graph-card {
    border-left: 4px solid #ffff44;
    grid-column: 1 / -1; /* Span full width */
}

.graph-controls {
    display: flex;
    gap: var(--spacing-xs);
}

.graph-btn {
    background: rgba(0, 207, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.graph-btn.active {
    background: var(--neon-blue);
    color: var(--background-black);
}

.telemetry-graph {
    margin-top: var(--spacing-md);
    height: 150px;
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
}

.graph-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-style: italic;
}

/* =========================================== */
/* STATUS MESSAGES                             */
/* =========================================== */

.status-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-panel);
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px var(--neon-blue-glow);
}

.status-message.visible {
    opacity: 1;
}

/* =========================================== */
/* MISSION DASHBOARD OVERLAY                   */
/* =========================================== */

.mission-dashboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1200;
    pointer-events: none;
    background: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}
.mission-dashboard-overlay.visible {
    pointer-events: none;
    opacity: 1;
}
.mission-dashboard-tile {
    position: absolute;
    background: rgba(0, 20, 40, 0.82); /* More opac, see-through */
    border-radius: 16px;
    box-shadow: 0 0 30px var(--neon-blue-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(20px);
    transition: box-shadow 0.3s, opacity 0.5s ease-in-out, transform 0.5s ease-out;
    pointer-events: auto; /* allow interactions within the tile */
}

.mission-dashboard-overlay.visible .mission-dashboard-tile {
    opacity: 0.98;
    transform: translateY(0);
}
.mission-dashboard-tile.left-tile {
    left: 32px;
    top: 18vh;
    width: 500px;
    height: 600px;
    border-left: 4px solid var(--neon-blue);
    justify-content: flex-start;
    transition-delay: 0s; /* Appear first */
    transform: translateY(20px);
}
.mission-dashboard-tile.model-tile {
    right: 32px;
    top: 50%;
    transform: translateY(-50%) translateX(20px); /* Initial position offset */
    width: 420px;
    height: 420px;
    border-right: 4px solid #ff6b35;
    transition-delay: 0.15s; /* Appear slightly later for staggered effect */
    justify-content: flex-end;
}
.mission-dashboard-overlay.visible .mission-dashboard-tile.left-tile {
    transform: translateY(0);
}
.mission-dashboard-overlay.visible .mission-dashboard-tile.model-tile {
    transform: translateY(-50%) translateX(0); /* Final position */
}
.mission-dashboard-tile.crts-panel {
    border-left: 4px solid #ff6b35 !important;
    border-right: 4px solid #ff6b35 !important;
    box-shadow: 0 0 30px #ff6b35cc;
}
.mission-dashboard-tile.bulldog-panel {
    border-left: 4px solid var(--neon-blue) !important;
    border-right: 4px solid var(--neon-blue) !important;
    box-shadow: 0 0 30px var(--neon-blue-glow);
}
.tile-header {
    position: relative; /* Allow absolute positioning of children */
    font-size: 1.2rem;
    font-weight: 600;
    padding: 18px 24px;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px var(--neon-blue-glow);
}
.tile-header.crts-header {
    background: linear-gradient(90deg, #ff6b35 0%, #ffb347 100%) !important;
}
.tile-header.bulldog-header {
    background: linear-gradient(90deg, var(--neon-blue) 0%, var(--neon-blue-dark) 100%) !important;
}
.tile-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    color: var(--text-primary);
    background: transparent;
    position: relative; /* This ensures the canvas can be positioned properly */
}
/* Special handling for model content to properly display the canvas */
#mission-model-content {
    padding: 0; /* Remove padding for canvas to fill entire space */
    overflow: hidden; /* No scrollbars needed for 3D view */
    position: relative; /* For proper canvas positioning */
}
.telemetry-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin-top: 40px;
}
/* Model placeholder is now hidden since we're using a proper 3D model viewer */
.model-placeholder {
    display: none;
}
.close-mission-dashboard {
    pointer-events: auto;
    position: absolute;
    top: 32px;
    right: 48px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 1300;
    opacity: 0;
    transform: scale(0.8);
    transition: color 0.2s, opacity 0.4s ease-in-out, transform 0.4s ease-out;
    text-shadow: 0 0 10px var(--neon-blue-glow);
    transition-delay: 0.3s; /* Appear last after tiles are visible */
}
.mission-dashboard-overlay.visible .close-mission-dashboard {
    opacity: 1;
    transform: scale(1);
}
.close-mission-dashboard:hover {
    color: var(--neon-blue);
    transform: scale(1.1);
}
.mission-dashboard-overlay.visible ~ .panel-toggle {
    display: none !important;
}
@media (max-width: 900px) {
    .mission-dashboard-tile.left-tile,
    .mission-dashboard-tile.model-tile {
        left: 4vw !important;
        right: 4vw !important;
        width: 90vw !important;
        min-width: unset;
        max-width: unset;
        height: 220px !important;
    }
    .mission-dashboard-tile.model-tile {
        bottom: 16px;
    }
}

/* =========================================== */
/* GROUND STATION DASHBOARD OVERLAY           */
/* =========================================== */
#ground-dashboard {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 850;
}
#ground-dashboard.visible {
    display: flex;
}
#ground-dashboard .telemetry-card {
    max-width: 400px;
    width: 90%;
}

/* GROUND STATION TILE OVERRIDE */
#ground-dashboard.telemetry-dashboard {
    /* Position at bottom center with proper buffer */
    top: auto !important;
    bottom: 80px !important;    /* More buffer from bottom to ensure full visibility */
    left: 50% !important;
    transform: translateX(-50%) !important;
    /* Wider size */
    width: 400px !important;
    max-width: 400px !important;
    height: auto !important;
    max-height: 60vh !important; /* Limit height to 60% of viewport */
    overflow-y: auto !important; /* Enable scrolling if content is too tall */
    background: rgba(0, 0, 0, 0.98) !important; /* Almost fully opaque for excellent readability */
    backdrop-filter: blur(25px) !important; /* Maximum blur for background separation */
    /* Green border and glow */
    border: 2px solid #00ff00 !important;
    box-shadow: 0 0 15px rgba(0,255,0,0.6) !important;
    /* Ensure visible above earth manipulations */
    z-index: 900 !important;
    position: fixed !important; /* Ensure fixed positioning relative to viewport */
}

/* Style close button in ground station tile */
#ground-dashboard.telemetry-dashboard .close-dashboard {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 14px !important;
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

#ground-dashboard.telemetry-dashboard .close-dashboard:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ff4444 !important;
    transform: scale(1.2) !important;
}

/* =========================================== */
/* ANIMATIONS                                  */
/* =========================================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================== */
/* RESPONSIVE DESIGN                           */
/* =========================================== */

@media (max-width: 768px) {
    .info-panel {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        padding: var(--spacing-lg);
    }
    
    .control-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .control-desc {
        text-align: left;
    }
    
    .floating-display {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        font-size: 0.8rem;
    }
    
    .panel-toggle {
        top: var(--spacing-md);
        left: var(--spacing-md);
        width: 45px;
        height: 45px;
    }
}

/* =========================================== */
/* SIMULATION SETTINGS MODAL                  */
/* =========================================== */

.modal-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

.setting-section {
    margin-bottom: var(--spacing-lg);
}

.setting-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--spacing-sm);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.setting-item input[type="range"] {
    flex: 1;
    margin: 0 var(--spacing-md);
    accent-color: var(--neon-blue);
}

.setting-item input[type="checkbox"] {
    accent-color: var(--neon-blue);
    width: 16px;
    height: 16px;
}

.setting-item select {
    background: var(--background-panel);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-family: var(--font-primary);
}

.setting-item select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 5px var(--neon-blue-glow);
}

#time-multiplier-value {
    color: var(--neon-blue);
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

@media (max-width: 600px) {
    .loader {
        width: 250px;
        height: 250px;
    }
    .loader-ring {
        border: 8px solid transparent;
        border-top: 8px solid var(--neon-blue);
    }
    .space-fact {
        max-width: 90%;
        font-size: 0.9rem;
    }
}

@media (max-width: 900px) {
    .mission-dashboard-tile {
        min-width: 90vw;
        max-width: 98vw;
        margin: 0 4vw;
        height: 60vh;
    }
    .mission-dashboard-overlay {
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
    }
}

/* =========================================== */
/* UTILITY CLASSES                             */
/* =========================================== */

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.glow {
    box-shadow: 0 0 20px var(--neon-blue-glow);
}

.text-glow {
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue-light);
}

.time-controls-panel {
    display: flex;
    flex-direction: row;
    gap: 1.2em;
    margin-top: 0.7em;
    justify-content: center;
    align-items: center;
    background: rgba(0, 207, 255, 0.08);
    border: none;
    border-radius: 8px;
    box-shadow: none;
    padding: 0.5em 1.2em;
    transition: opacity 0.2s;
    opacity: 1;
    z-index: 1201;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 320px;
}
.time-controls-panel.hidden {
    display: none;
    opacity: 0;
}
.time-btn {
    background: none;
    color: var(--neon-blue);
    border: none;
    border-radius: 5px;
    padding: 0.3em 0.9em;
    font-size: 1rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: none;
    min-width: 48px;
    outline: none;
}
.time-btn.speed-btn {
    font-size: 0.95rem;
    padding: 0.3em 0.7em;
    margin: 0 0.1em;
}
.time-btn.pause-btn {
    background: none;
    color: var(--neon-blue);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border: 2px solid transparent;
    margin: 0 0.5em;
    padding: 0;
    box-shadow: none;
}
.time-btn.active {
    background: var(--neon-blue);
    color: var(--background-black);
    font-weight: bold;
    border-radius: 5px;
}
#pause-icon {
    display: inline-block;
    font-size: 1.2em;
    line-height: 1;
}

/* Button Pulsing Animations */
#help-sphere-btn {
    animation: pulseBlue 2s ease-in-out infinite !important;
}

#help-sphere-btn:hover {
    background: rgba(102,217,255,0.9) !important;
    box-shadow: 0 0 20px rgba(0,207,255,0.5), 0 0 40px rgba(0,207,255,0.3) !important;
    transform: scale(1.1);
}

@keyframes pulseBlue {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0,207,255,0.6), 0 0 30px rgba(0,207,255,0.3) !important;
    }
    50% {
        box-shadow: 0 0 25px rgba(0,207,255,0.8), 0 0 45px rgba(0,207,255,0.5) !important;
    }
}

/* Learning Button Styles */
#learning-btn {
    animation: pulseOrange 2s ease-in-out infinite !important;
}

#learning-btn:hover {
    background: rgba(255,140,0,0.9) !important;
    box-shadow: 0 0 20px rgba(255,140,0,0.5), 0 0 40px rgba(255,140,0,0.3) !important;
    transform: scale(1.1);
}

@keyframes pulseOrange {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255,140,0,0.6), 0 0 30px rgba(255,140,0,0.3) !important;
    }
    50% {
        box-shadow: 0 0 25px rgba(255,140,0,0.8), 0 0 45px rgba(255,140,0,0.5) !important;
    }
}

/* SDA Button Purple Styles */
#sda-toggle-btn {
    animation: pulsePurple 2s ease-in-out infinite !important;
}

#sda-toggle-btn:hover {
    background: rgba(138,43,226,0.9) !important;
    box-shadow: 0 0 20px rgba(138,43,226,0.5), 0 0 40px rgba(138,43,226,0.3) !important;
    transform: scale(1.1);
}

@keyframes pulsePurple {
    0%, 100% {
        box-shadow: 0 0 15px rgba(138,43,226,0.6), 0 0 30px rgba(138,43,226,0.3) !important;
    }
    50% {
        box-shadow: 0 0 25px rgba(138,43,226,0.8), 0 0 45px rgba(138,43,226,0.5) !important;
    }
}

/* Support Button Green Styles */
#support-btn {
    animation: pulseGreen 2s ease-in-out infinite !important;
}

#support-btn:hover {
    background: rgba(34,197,94,0.9) !important;
    box-shadow: 0 0 20px rgba(34,197,94,0.5), 0 0 40px rgba(34,197,94,0.3) !important;
    transform: scale(1.1);
}

@keyframes pulseGreen {
    0%, 100% {
        box-shadow: 0 0 15px rgba(34,197,94,0.6), 0 0 30px rgba(34,197,94,0.3) !important;
    }
    50% {
        box-shadow: 0 0 25px rgba(34,197,94,0.8), 0 0 45px rgba(34,197,94,0.5) !important;
    }
}

/* Settings Button Blue Styles */
#simulation-settings-btn {
    animation: pulseBlue 2s ease-in-out infinite !important;
}

#simulation-settings-btn:hover {
    background: rgba(102,217,255,0.9) !important;
    box-shadow: 0 0 20px rgba(0,207,255,0.5), 0 0 40px rgba(0,207,255,0.3) !important;
    transform: scale(1.1);
}

/* Learning Modal Styles */
.learning-modal-content {
    background: linear-gradient(135deg, rgba(20,28,45,0.98) 0%, rgba(15,22,36,0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid #ff8c00;
    box-shadow: 0 0 40px rgba(255,140,0,0.3), inset 0 0 60px rgba(255,140,0,0.05);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.learning-modal-content .modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 2em;
}

.learning-modal-content h2 {
    color: #ff8c00;
    text-shadow: 0 0 20px rgba(255,140,0,0.5);
}

.learning-modal-content h3 {
    color: #ffa500;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.learning-modal-content .subtitle {
    color: #ffb84d;
    font-size: 1.1em;
    margin-bottom: 1.5em;
}

.learning-modal-content ul {
    list-style: none;
    padding-left: 1.5em;
}

.learning-modal-content ul li:before {
    content: "▸ ";
    color: #ff8c00;
    font-weight: bold;
    margin-left: -1.5em;
    margin-right: 0.5em;
}

.learning-modal-content .coming-soon-note {
    background: rgba(255,140,0,0.1);
    border: 1px solid rgba(255,140,0,0.3);
    border-radius: 8px;
    padding: 1em;
    margin: 1.5em 0;
    text-align: center;
    color: #ffb84d;
    font-style: italic;
}

/* Support Modal Styles */
.support-modal-content {
    background: linear-gradient(135deg, rgba(20,28,45,0.98) 0%, rgba(15,22,36,0.98) 100%);
    backdrop-filter: blur(20px);
    border: 2px solid #22c55e;
    box-shadow: 0 0 40px rgba(34,197,94,0.3), inset 0 0 60px rgba(34,197,94,0.05);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.support-modal-content .modal-body {
    overflow-y: auto;
    flex: 1;
}

.support-modal-content h2 {
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34,197,94,0.5);
}

.support-modal-content h3 {
    color: #34d399;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.support-modal-content .subtitle {
    color: #6ee7b7;
    font-size: 1.1em;
    margin-bottom: 1.5em;
}

.support-modal-content .contact-info {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 8px;
    padding: 1em;
    margin: 1.5em 0;
    text-align: center;
}

.support-modal-content .contact-info p {
    margin: 0.5em 0;
    color: #6ee7b7;
}

.support-modal-content .contact-info strong {
    color: #22c55e;
}

.support-modal-content .form-group {
    margin-bottom: 0;
}

.support-modal-content label {
    display: block;
    color: #34d399;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.support-modal-content input,
.support-modal-content textarea,
.support-modal-content select {
    width: 100%;
    padding: 0.8em;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95em;
    box-sizing: border-box;
}

.support-modal-content input:focus,
.support-modal-content textarea:focus,
.support-modal-content select:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 10px rgba(34,197,94,0.3);
}

.support-modal-content textarea {
    min-height: 120px;
    resize: vertical;
}

.support-modal-content .checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 1em;
}

.support-modal-content .checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5em;
    transform: scale(1.2);
}

.support-modal-content .form-submit {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 1.1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}

.support-modal-content .form-submit:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34,197,94,0.4);
}

/* Support Modal Animations */
@keyframes rocket-bounce {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes support-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(34,197,94,0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(34,197,94,0.5);
    }
}

.support-modal-content input,
.support-modal-content textarea,
.support-modal-content select {
    transition: all 0.3s ease;
}

.support-modal-content input:hover,
.support-modal-content textarea:hover,
.support-modal-content select:hover {
    border-color: rgba(34,197,94,0.5);
    background: rgba(0,0,0,0.3);
}

.support-modal-content .form-group {
    position: relative;
}

.support-modal-content .form-group:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #22c55e 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.support-modal-content .form-group:hover:before {
    opacity: 0.3;
}

.support-modal-content .form-submit {
    position: relative;
    overflow: hidden;
}

.support-modal-content .form-submit:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.support-modal-content .form-submit:hover:before {
    left: 100%;
}

/* Control Dock Animations */
.control-button {
    transition: all 0.3s ease;
}

.control-button:hover {
    transform: scale(1.1);
}

.dock-enter {
    animation: dockEnter 0.4s ease-out forwards;
}

.dock-minimize {
    animation: dockMinimize 0.3s ease-in forwards;
}

.minimized-enter {
    animation: minimizedEnter 0.3s ease-out forwards;
}

@keyframes dockEnter {
    from { 
        transform: translateX(-100%) scale(0.8); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0) scale(1); 
        opacity: 1; 
    }
}

@keyframes dockMinimize {
    from { 
        transform: translateX(0) scale(1); 
        opacity: 1; 
    }
    to { 
        transform: translateX(-100%) scale(0.8); 
        opacity: 0; 
    }
}

@keyframes minimizedEnter {
    from { 
        transform: scale(0.5); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

#dock-minimize-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

#minimized-dock:hover {
    transform: scale(1.1);
}

#minimized-dock:hover > div {
    background: rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.5);
}

/* =========================================== */
/* PANEL MINIMIZE FUNCTIONALITY               */
/* =========================================== */

/* Minimize button styling */
.tile-minimize-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.8;
}

/* Create a clean minimize line icon */
.tile-minimize-btn::before {
    content: '';
    width: 10px;
    height: 1px;
    background: #ffffff;
    display: block;
}

.tile-minimize-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

/* Panel minimized state */
.mission-dashboard-tile.minimized {
    display: none !important;
}

/* Minimized tabs styling - match control dock buttons */
.minimized-tab {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.3s ease;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.minimized-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Satellite-specific colors are now set dynamically in JavaScript */

/* When panels are minimized, maintain original sizes to prevent 3D model distortion */
.mission-dashboard-tile.minimized {
    display: none !important;
}

/* Keep original panel sizes when others are minimized to prevent distortion */
.mission-dashboard-tile:not(.minimized) {
    /* Maintain original dimensions - don't expand when other panels are hidden */
}

/* =========================================== */
/* CAPCOM KELLY BUTTON                         */
/* =========================================== */

.capcom-button:hover {
    background: rgba(102, 217, 255, 0.9);
    border-color: #66d9ff;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(0, 207, 255, 0.4);
}

/* Pulsing animation for Kelly button */
@keyframes kelly-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(0, 207, 255, 0.7);
        transform: scale(1);
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(0, 207, 255, 0);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(0, 207, 255, 0);
        transform: scale(1);
    }
}

/* Shimmer animation for coming soon section */
@keyframes shimmer {
    0% { 
        transform: translateX(-100%);
    }
    100% { 
        transform: translateX(100%);
    }
}
