/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Press+Start+2P&family=VT323&display=swap');

:root {
    /* Diário do Astronauta - Pixel Space Theme */
    --bg-space: #0B0B14;
    --text-primary: #E0E0E0;
    --text-highlight: #FFD700;
    
    /* Pixel Theme Colors */
    --neon-purple: #D042FF;
    --neon-cyan: #00FFFF;
    --input-bg: #E6E6E6;
    --input-text: #222;
    
    /* Panels */
    --panel-bg: rgba(15, 15, 30, 0.92);
    --panel-border: 4px solid #FFF; /* Pixel border style */
    --glass-blur: blur(8px);
    --shadow-hard: 4px 4px 0px #000; /* Pixel shadow */
    
    /* Fonts */
    --font-title: 'Press Start 2P', cursive;
    --font-body: 'VT323', monospace;
    --font-main: 'Fredoka', sans-serif;
}

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

body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: var(--font-body);
    font-size: 22px; /* VT323 is small, so bump up size */
    font-weight: 400;
    background: var(--bg-space);
    color: var(--text-primary);
    image-rendering: pixelated; /* Attempt to make images crisp */
}

/* --- Main Menu Styles --- */
#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    z-index: 5000; /* Above everything */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto; /* Allow scrolling if needed */
    overflow-x: hidden;
    color: white;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

#main-menu.hidden-menu {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.menu-content {
    width: 100%;
    min-height: 100vh; /* Full screen height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding-top: 0;
    margin-bottom: 0;
    animation: fadeInDown 1s ease-out;
    flex-shrink: 0; /* Prevent shrinking to force overflow */
    background:
        radial-gradient(ellipse at 50% 15%, rgba(208, 66, 255, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 20% 80%, rgba(0, 255, 255, 0.08) 0%, transparent 45%),
        radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    overflow: hidden;
}

.menu-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 80% 20%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 40% 50%, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 200px;
    animation: twinkleStars 8s ease-in-out infinite alternate;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes twinkleStars {
    from { opacity: 0.35; transform: translateY(0); }
    to { opacity: 0.75; transform: translateY(-8px); }
}

#solar-system-3d-container {
    width: 100%;
    height: 100vh; /* Full screen height */
    position: relative;
    overflow: hidden;
    background: #000;
    flex-shrink: 0; /* Prevent shrinking to force overflow */
}

#solar-system-3d-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(208, 66, 255, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(0, 255, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.solar-system-hint {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(10, 10, 30, 0.65);
    border: 1px solid rgba(0, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.92);
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 24px rgba(208, 66, 255, 0.2);
    pointer-events: none;
    animation: fadeInDown 1.2s ease-out 0.5s both;
}

#menu-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

#planet-labels-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas, buttons will re-enable pointer-events */
}

.planet-info-btn {
    position: absolute;
    transform: translate(-50%, -50%);
    background: rgba(10, 10, 40, 0.55);
    border: 1px solid rgba(0, 255, 255, 0.45);
    color: #00ffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto; /* Enable clicks */
    transition: all 0.3s ease;
    font-family: 'Fredoka', sans-serif;
    font-weight: bold;
    z-index: 100;
    backdrop-filter: blur(6px);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.15);
}

.planet-info-btn:hover {
    background: rgba(208, 66, 255, 0.85);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 0 20px rgba(208, 66, 255, 0.55);
}

.planet-label-name {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    text-shadow: 0 0 4px black;
}

.planet-info-btn:hover .planet-label-name {
    opacity: 1;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Main Menu Typography */
.menu-title {
    font-family: var(--font-title);
    font-size: 48px; /* Adjusted for pixel font width */
    font-weight: 400;
    color: var(--neon-purple); /* Purple from image */
    text-shadow: 4px 4px 0px #000, 0 0 20px var(--neon-purple);
    margin-bottom: 10px;
    letter-spacing: 4px;
    text-align: center;
    line-height: 1.4;
}

.menu-subtitle {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--neon-cyan); /* Cyan from image */
    font-weight: 400;
    opacity: 1;
    margin-bottom: 40px;
    text-shadow: 2px 2px 0px #000;
    letter-spacing: 2px;
}

.rocket-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.rocket-ship {
    font-size: 80px;
    animation: floatRocket 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
    cursor: pointer;
    transition: transform 0.3s;
}

.rocket-ship:hover {
    transform: scale(1.1) rotate(-10deg);
}

@keyframes floatRocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.scroll-hint {
    font-size: 18px;
    color: #87CEEB;
    margin-top: 20px;
    font-weight: 500;
    opacity: 0.9;
}

.scroll-arrow {
    font-size: 24px;
    margin-top: 10px;
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

/* Intro Video Overlay */
#intro-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 6000; /* Above Main Menu */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none; /* Allow clicks through when transparent */
}

#intro-video-overlay:not(.hidden) {
    pointer-events: auto;
}

#intro-video-overlay.is-loading {
    opacity: 0.15;
}

#intro-video-overlay.is-ready {
    opacity: 1;
}

#intro-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

#intro-video-overlay.is-ready #intro-video-poster {
    opacity: 0;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

#intro-video-overlay.is-ready #intro-video {
    opacity: 1;
}

#intro-asset-loader {
    position: absolute;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    width: min(420px, 80vw);
    z-index: 2;
    text-align: center;
    opacity: 1;
    transition: opacity 0.4s ease;
}

#intro-video-overlay.is-ready #intro-asset-loader {
    opacity: 0;
    pointer-events: none;
}

.intro-loader-label {
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.intro-loader-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.35);
}

.intro-loader-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00ffff, #d042ff);
    transition: width 0.2s ease-out;
}

#skip-message {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--font-title);
    font-size: 16px;
    text-shadow: 2px 2px 0 #000;
    text-transform: uppercase;
    z-index: 6001;
}

.pixel-blink {
    animation: pixelBlink 1s steps(2, start) infinite;
}

@keyframes pixelBlink {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .menu-title { font-size: 48px; }
    .menu-subtitle { font-size: 24px; }
}

/* --- Existing Styles Below --- */

#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute; /* Ensure it stays behind UI */
    top: 0;
    left: 0;
    z-index: 0;
}

/* UI Controls Panel */
#controls-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 8px; /* Slightly rounded */
    box-shadow: var(--shadow-hard);
    min-width: 320px;
    max-width: 360px;
    z-index: 1000;
    backdrop-filter: var(--glass-blur);
    border: var(--panel-border);
    /* Starry texture optional */
}

#controls-panel h1 {
    font-family: var(--font-title);
    font-size: 16px; /* Pixel fonts are wide */
    color: var(--neon-cyan);
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
    text-shadow: 3px 3px 0px #000;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-family: var(--font-title);
    font-size: 10px; /* Small pixel label */
    color: var(--neon-purple);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group input[type="date"],
.control-group input[type="time"] {
    width: 100%;
    padding: 12px;
    font-size: 20px;
    background: var(--input-bg);
    border: 3px solid #000;
    border-radius: 15px; /* Rounded inputs like images */
    margin-bottom: 5px;
    font-family: var(--font-body);
    color: var(--input-text);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
}

.control-group input[type="range"] {
    width: 100%;
    height: 20px; /* Thicker track */
    border-radius: 0; /* Square edges */
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid #fff;
    box-shadow: 2px 2px 0px #000;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 30px; /* Rectangular thumb */
    border-radius: 0;
    background: var(--neon-cyan);
    cursor: pointer;
    box-shadow: none;
    border: 2px solid #fff;
    transform: translateY(-5px); /* Center it */
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 30px;
    border-radius: 0;
    background: var(--neon-cyan);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: none;
}

.control-group span {
    display: inline-block;
    margin-left: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #FF8C00;
    min-width: 50px;
}

.tooltip {
    display: inline-block;
    margin-left: 5px;
    font-size: 14px;
    color: #4CAF50;
    cursor: help;
    position: relative;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10000;
    margin-bottom: 5px;
    pointer-events: none;
    font-family: 'Fredoka', sans-serif;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    margin-bottom: -5px;
    pointer-events: none;
}

#info-display {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}

#info-display p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

#sun-info {
    font-weight: 600;
    color: #333;
}

/* Educational Info Panel */
#info-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-hard);
    max-width: 350px;
    z-index: 1000;
    backdrop-filter: var(--glass-blur);
    max-height: 80vh;
    overflow-y: auto;
    border: var(--panel-border);
}

#info-panel h2 {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-purple);
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: center;
    border-bottom: 2px solid var(--neon-cyan);
    padding-bottom: 10px;
}

#info-panel p {
    font-size: 20px; 
    color: #DDD;
    line-height: 1.4;
    margin-bottom: 15px;
}

#info-panel ul {
    margin-left: 10px;
    margin-bottom: 15px;
}

#info-panel li {
    font-size: 20px;
    color: #CCC;
    line-height: 1.4;
    margin-bottom: 12px;
    list-style: none;
    padding-left: 20px;
    position: relative;
}

#info-panel li::before {
    content: '>';
    color: var(--neon-cyan);
    position: absolute;
    left: 0;
    font-family: var(--font-title);
    font-size: 10px;
    top: 5px;
}

#info-panel strong {
    color: var(--neon-cyan);
    font-weight: normal;
    font-family: var(--font-title);
    font-size: 12px;
}

#toggle-info-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ddd;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1001;
}

#toggle-info-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #4CAF50;
    color: #4CAF50;
    transform: scale(1.1);
}

#toggle-info-btn:active {
    transform: scale(0.95);
}

#show-info-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #4CAF50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#show-info-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

#show-info-btn:active {
    transform: scale(0.95);
}

/* Debug Controls Panel */
#debug-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 350px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    max-height: 80vh;
    overflow-y: auto;
}

#debug-panel h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

#debug-panel button:hover {
    background: #45a049 !important;
}

#debug-panel button:active {
    background: #3d8b40 !important;
}

.hidden {
    display: none !important;
}

/* Temporal Controls Panel (Bottom) */
#temporal-controls-panel {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    padding: 5px 15px; /* Reduced vertical padding */
    border-radius: 8px;
    box-shadow: var(--shadow-hard);
    width: calc(100% - 40px);
    max-width: 1400px;
    z-index: 999;
    backdrop-filter: var(--glass-blur);
    border: var(--panel-border);
}

.temporal-controls-content {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
}

.solar-system-container {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%; /* Planets are round, so keep this */
    overflow: hidden;
    border: 4px solid var(--text-highlight); /* Gold border */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

#solar-system-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.temporal-controls-middle {
    flex: 1;
    min-height: 200px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.earth-globe-container {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--neon-cyan);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

#earth-globe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.temporal-row {
    display: grid;
    gap: 15px;
}

.temporal-row-full {
    grid-column: 1 / -1;
}

.temporal-row-four {
    grid-template-columns: repeat(4, 1fr);
}

.temporal-row-two {
    grid-template-columns: repeat(2, 1fr);
}

#temporal-controls-panel .slider-container {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Reduced gap */
}

#temporal-controls-panel .slider-container label {
    font-family: var(--font-title);
    font-size: 8px; /* Smaller font */
    color: var(--neon-purple);
    text-transform: uppercase;
    margin-bottom: 0;
}

#temporal-controls-panel .slider-container input[type="range"] {
    width: 100%;
    height: 8px; /* Thinner track */
    border: 1px solid #fff;
}

#temporal-controls-panel .slider-container input[type="range"]::-webkit-slider-thumb {
    width: 12px; /* Smaller square thumb */
    height: 12px;
    margin-top: -3px; /* Center it */
    border: 1px solid #fff;
    background: var(--neon-cyan);
    box-shadow: none;
}

#temporal-controls-panel .slider-container input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 1px solid #fff;
    background: var(--neon-cyan);
    box-shadow: none;
}

#temporal-controls-panel .slider-container span {
    font-family: var(--font-body);
    font-size: 16px; /* Smaller font */
    color: var(--text-highlight);
    text-align: center;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    padding: 0 4px;
}

/* Seasonal Gradient for Master Date Slider */
#master-date-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px !important; /* Slightly taller than others for emphasis */
    border-radius: 5px;
    outline: none;
    background: linear-gradient(to right, 
        #FF4500 0%,   /* Summer Start (Jan) */
        #FF8C00 20%,  /* Autumn Start (Mar) */
        #87CEEB 50%,  /* Winter (Jun/Jul) */
        #32CD32 75%,  /* Spring (Sep/Oct) */
        #FF4500 100%  /* Summer End (Dec) */
    );
    border: 2px solid #fff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#master-date-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px !important;
    height: 15px !important;
    border-radius: 0;
    background: #fff;
    border: 2px solid #FF8C00;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    margin-top: -4px !important;
}

#master-date-slider::-moz-range-thumb {
    width: 15px !important;
    height: 15px !important;
    border-radius: 0;
    background: #fff;
    border: 2px solid #FF8C00;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .temporal-controls-content {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .solar-system-container, .earth-globe-container {
        width: 150px;
        height: 150px;
    }
    
    .temporal-controls-middle {
        width: 100%;
        order: 0;
    }
}

@media (max-width: 768px) {
    .temporal-row-four {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .temporal-row-two {
        grid-template-columns: 1fr;
    }
    
    #controls-panel {
        display: none;
    }
}

@media (max-width: 480px) {
    .temporal-row-four {
        grid-template-columns: 1fr;
    }
    
    .solar-system-container, .earth-globe-container {
        display: none;
    }
}

/* Learning Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000; /* Increased z-index to be above everything */
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--panel-bg);
    padding: 20px; /* Reduced padding */
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh; /* Slightly reduced max height to ensure margins */
    overflow-y: auto;
    box-shadow: var(--shadow-hard);
    border: var(--panel-border);
    position: relative;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy pixel animation */
    display: flex;
    flex-direction: column;
}

/* Ensure buttons stick to bottom if content is long, or just ensure visibility */
#next-phase-btn {
    margin-top: auto; /* Push to bottom if flex container has height */
    margin-bottom: 10px;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #FF4500;
    color: white;
    border: 2px solid white;
    border-radius: 0; /* Pixel square */
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    z-index: 10;
    font-family: var(--font-title);
    box-shadow: 2px 2px 0px #000;
}

.modal-close-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #000;
}

.learning-section {
    margin-bottom: 25px;
}

.learning-section h3 {
    color: var(--text-highlight);
    font-size: 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-title);
    text-transform: uppercase;
}

.learning-section p {
    color: #DDD;
    line-height: 1.5;
    font-size: 22px;
}

.learning-btn {
    position: fixed;
    top: 20px;
    left: 80px;
    background: #FFD700;
    border: 3px solid white;
    border-radius: 50%; /* Keep round for icons, or make square for pixel art? Round sticker looks okay */
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    transition: all 0.2s;
}

.learning-btn:hover {
    transform: translate(-2px, -2px);
    background: #FFE44D;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.5);
}

.game-btn {
    position: fixed;
    top: 20px;
    left: 140px;
    background: #FFC107; /* Yellow to match sliders */
    border: 3px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    transition: all 0.2s;
}

.game-btn:hover {
    transform: translate(-2px, -2px);
    background: #FFD700; /* Brighter yellow on hover */
    box-shadow: 6px 6px 0px rgba(0,0,0,0.5);
}

/* Game Overlay */
#game-overlay {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 3px solid #FF4500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 300px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.game-score { color: #4CAF50; }
.game-timer { color: #FF4500; }
.game-phase { color: #2196F3; }

.game-progress-container {
    width: 100%;
}

.game-progress-label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #555;
    font-weight: 600;
}

.game-progress-bar {
    width: 100%;
    height: 15px;
    background: #ddd;
    border-radius: 10px;
    overflow: visible; /* Changed to visible so threshold line can extend */
    border: 1px solid #ccc;
    position: relative;
}

#game-progress-fill {
    height: 100%;
    background: linear-gradient(to right, #FF4500, #FFD700, #4CAF50);
    transition: width 0.3s ease;
    position: relative;
    z-index: 1;
}

.game-progress-threshold {
    position: absolute;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: transparent;
    border-left: 2px dashed #ff0000;
    z-index: 2;
    pointer-events: none;
}

/* Time Bar */
.time-bar-container {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

#time-bar-fill {
    height: 100%;
    background: #FF4500;
    width: 100%;
    transition: width 1s linear, background-color 0.3s ease;
}

.quit-game-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    align-self: center;
    margin-top: 5px;
    font-family: 'Fredoka', sans-serif;
}

.quit-game-btn:hover {
    background: #ff5252;
}

#start-game-action-btn {
    background: linear-gradient(135deg, #eadbff, #d8c7ff);
    color: #111;
    border: 2px solid #000;
    padding: 15px 30px;
    font-size: 20px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    transition: all 0.2s ease-in-out;
    font-family: 'Fredoka', sans-serif;
}

#start-game-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Game Side Panel */
#game-side-panel {
    position: fixed;
    top: 100px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 999;
    backdrop-filter: blur(10px);
    border: 3px solid #FF4500;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

#game-side-panel h3 {
    color: #FF4500;
    font-size: 18px;
    margin: 0;
    text-align: center;
}

.top-view-container {
    width: 200px;
    height: 200px;
    background: #f0f0f0;
    border-radius: 10px;
    border: 2px solid #ddd;
    overflow: hidden;
    position: relative;
}

#top-view-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.instruction-hint {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* Result Globe Canvas */
#result-globe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.globe-labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.globe-label {
    position: absolute;
    transform: translate(-50%, -100%);
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.globe-label--user {
    color: #2196F3;
}

.globe-label--target {
    color: #4CAF50;
}

.globe-label--distance {
    color: #ff1744;
    font-size: 11px;
    transform: translate(-50%, -50%);
}

#result-target-meta p {
    margin: 4px 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

#result-target-address {
    font-size: 14px;
    color: #333333;
    font-weight: bold;
}

#result-target-datetime {
    font-size: 13px;
    color: #555555;
}

/* Point Deduction Animation (Task 40) */
.point-deduction-animation {
    animation: pointDeductionFade 1s ease-out forwards;
}

@keyframes pointDeductionFade {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* Leaderboard Styles */
.leaderboard-container {
    width: 100%;
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #eee;
    border-radius: 10px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.leaderboard-table th {
    background-color: #f9f9f9;
    color: #666;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.leaderboard-row-highlight {
    background-color: #e3f2fd;
    font-weight: bold;
}

.leaderboard-input-group {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-input {
    padding: 10px;
    border: 2px solid #FFD700;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Fredoka', sans-serif;
}

.save-score-btn {
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
}

.save-score-btn:hover {
    background: #45a049;
}

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: fall linear forwards;
    z-index: 9999;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Pixel Helper Classes */
.pixel-title {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px #000;
    line-height: 1.4;
}

.pixel-btn-action {
    width: 100%;
    padding: 15px;
    background: var(--neon-purple);
    color: white;
    border: 4px solid white;
    font-family: var(--font-title);
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 6px 6px 0px #000;
    text-transform: uppercase;
    transition: all 0.1s;
}

.pixel-btn-action:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0px #000;
    background: #E052FF;
}

.planet-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: #E6E6E6; /* Beige/Grey from inputs */
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #000;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.2);
}

.stat-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-box strong {
    color: #555;
    display: block;
    font-family: var(--font-title);
    font-size: 8px; /* Tiny pixel text */
    margin-bottom: 5px;
    text-transform: uppercase;
}

.stat-box p {
    color: #000; /* Dark text on light bg */
    font-weight: bold;
    font-family: var(--font-body);
    font-size: 20px;
    margin: 0;
}

/* Earth Hint Arrow (Task 25) */
.earth-hint-arrow {
    position: absolute;
    bottom: 40px; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    color: #FFD700; /* Gold */
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    white-space: nowrap;
    text-shadow: 2px 2px 0px #000;
    animation: bounceHint 1.5s infinite;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

@keyframes bounceHint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ============================================ */
/* === DIARY MODULE STYLES === */
/* ============================================ */

/* Diary Gallery Container */
#diary-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0B0B14 0%, #1a1a2e 50%, #16213e 100%);
    z-index: 9000;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
}

#diary-gallery.hidden {
    display: none !important;
}

/* Diary Header */
.diary-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    position: relative;
}

.diary-back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 10px 20px;
    font-family: var(--font-title);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.diary-back-btn:hover {
    background: var(--neon-cyan);
    color: #0B0B14;
    box-shadow: 0 0 20px var(--neon-cyan);
}

.diary-title {
    font-family: var(--font-title);
    font-size: 24px;
    color: var(--text-highlight);
    text-shadow: 0 0 10px var(--text-highlight);
    margin-bottom: 10px;
}

.diary-subtitle {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--text-primary);
    opacity: 0.8;
}

/* Diary Grid */
.diary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Diary Card */
.diary-card {
    background: rgba(15, 15, 30, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.diary-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--neon-purple);
    box-shadow: 0 8px 30px rgba(208, 66, 255, 0.4);
}

.diary-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.diary-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.diary-card:hover .diary-card-image img {
    transform: scale(1.1);
}

.diary-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(208, 66, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.diary-card:hover .diary-card-overlay {
    opacity: 1;
}

.diary-card-view {
    font-family: var(--font-title);
    font-size: 14px;
    color: white;
    text-shadow: 2px 2px 0 #000;
}

.diary-card-info {
    padding: 15px;
    text-align: center;
}

.diary-card-student {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-highlight);
    margin-bottom: 5px;
}

.diary-card-date {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.7;
}

/* Diary Viewer Modal */
.diary-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.diary-viewer-modal.hidden {
    display: none !important;
}

.diary-viewer-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 4px solid var(--neon-purple);
    border-radius: 15px;
    max-width: 1200px;
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(208, 66, 255, 0.5);
    position: relative;
}

.diary-viewer-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.diary-viewer-close:hover {
    background: #ff0000;
    transform: scale(1.1);
}

.diary-viewer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

.diary-viewer-nav {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.diary-viewer-nav:hover:not(:disabled) {
    background: var(--neon-cyan);
    color: #0B0B14;
    box-shadow: 0 0 20px var(--neon-cyan);
}

.diary-viewer-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.diary-viewer-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    position: relative;
}

#diary-viewer-image {
    max-width: 100%;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.diary-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-cyan);
    animation: pulse 1s infinite;
}

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

.diary-viewer-details {
    padding: 25px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    max-height: 35vh;
    overflow-y: auto;
}

.diary-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.diary-viewer-student {
    font-family: var(--font-title);
    font-size: 16px;
    color: var(--text-highlight);
}

.diary-viewer-counter {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

.diary-viewer-section {
    margin-bottom: 20px;
}

.diary-viewer-section h3 {
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-purple);
    margin-bottom: 10px;
}

.diary-viewer-section p {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--text-primary);
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--neon-purple);
}

.diary-viewer-note p {
    border-left-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

/* Diary Card Enhanced Styles */
.diary-card-page-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(208, 66, 255, 0.9);
    color: white;
    font-family: var(--font-title);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
    z-index: 2;
}

.diary-card-cover .diary-card-page-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
}

.diary-card-back .diary-card-page-badge {
    background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
}

.diary-card-title {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-highlight);
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.diary-card-emoji {
    font-size: 16px;
    flex-shrink: 0;
}

/* Diary Header Enhanced */
.diary-header-content {
    max-width: 600px;
    margin: 0 auto;
}

.diary-hint {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.6;
    margin-top: 8px;
}

.diary-stats {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.diary-stat {
    background: rgba(208, 66, 255, 0.2);
    color: var(--neon-purple);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-title);
    font-size: 11px;
}

/* Diary Viewer Toolbar */
.diary-viewer-toolbar {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    padding-right: 70px; /* Space for close button */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    flex-wrap: wrap;
}

.diary-mode-btn,
.diary-topic-btn,
.diary-share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.diary-mode-btn:hover,
.diary-topic-btn:hover,
.diary-share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--neon-cyan);
}

.diary-mode-btn.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.diary-topic-btn.active {
    background: rgba(208, 66, 255, 0.2);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

.diary-topic-btn.hidden {
    display: none;
}

.mode-icon {
    font-size: 16px;
}

/* Diary Viewer Title */
.diary-viewer-title {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--text-highlight);
    flex: 1;
}

/* Topic Side Panel */
.diary-topic-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    max-width: 90%;
    height: 100%;
    background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
    border-left: 3px solid var(--neon-purple);
    z-index: 20;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.3s ease;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.diary-topic-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
}

.topic-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(208, 66, 255, 0.1);
}

.topic-panel-header h3 {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-purple);
    margin: 0;
}

.topic-panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-panel-close:hover {
    background: rgba(255, 0, 0, 0.5);
    color: white;
}

.topic-panel-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.topic-panel-content > p {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.topic-panel-answer {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.topic-panel-answer.hidden {
    display: none;
}

.topic-panel-answer h4 {
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-cyan);
    margin-bottom: 10px;
}

.topic-panel-answer p {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-highlight);
    line-height: 1.5;
}

.topic-panel-links h4 {
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-purple);
    margin-bottom: 12px;
}

.topic-link-btn {
    display: inline-block;
    background: rgba(208, 66, 255, 0.2);
    border: 2px solid var(--neon-purple);
    color: var(--neon-purple);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 11px;
    text-decoration: none;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.topic-link-btn:hover {
    background: var(--neon-purple);
    color: white;
    box-shadow: 0 0 15px rgba(208, 66, 255, 0.5);
}

/* Toast Notification */
.diary-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 255, 0, 0.9);
    color: #000;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 12px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.4);
}

.diary-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.diary-toast.hidden {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .diary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }
    
    .diary-title {
        font-size: 16px;
    }
    
    .diary-back-btn {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        margin-bottom: 15px;
    }
    
    .diary-stats {
        position: relative;
        right: 0;
        top: 0;
        transform: none;
        margin-top: 10px;
    }
    
    .diary-viewer-main {
        flex-direction: column;
        padding: 10px;
    }
    
    .diary-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    #diary-viewer-image {
        max-height: 40vh;
    }
    
    .diary-viewer-toolbar {
        padding: 10px 15px;
        padding-right: 50px;
        gap: 8px;
    }
    
    .diary-mode-btn,
    .diary-topic-btn,
    .diary-share-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .mode-label,
    .topic-btn-label,
    .share-btn-label {
        display: none;
    }
    
    .diary-topic-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .diary-card-title {
        font-size: 12px;
    }
    
    .diary-card-emoji {
        font-size: 14px;
    }
}

/* ============================================ */
/* === AGE CALCULATOR STYLES === */
/* ============================================ */

.age-calculator-section {
    background: rgba(0, 255, 255, 0.05);
    border: 2px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.age-calculator-section h3 {
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-cyan);
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

.age-calculator-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.age-calculator-input label {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-primary);
}

.age-calculator-input input {
    width: 80px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 20px;
    text-align: center;
    background: var(--input-bg);
    color: var(--input-text);
    border: 2px solid var(--neon-cyan);
    border-radius: 5px;
}

.age-calculator-input input:focus {
    outline: none;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.pixel-btn-small {
    padding: 8px 15px;
    font-family: var(--font-title);
    font-size: 10px;
    background: var(--neon-cyan);
    color: #0B0B14;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pixel-btn-small:hover {
    background: #00DDDD;
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.age-result {
    margin-top: 20px;
    padding: 15px;
    background: rgba(208, 66, 255, 0.1);
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

.age-result.hidden {
    display: none;
}

.age-result-main {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--text-highlight);
    margin-bottom: 10px;
}

#planet-age-value {
    display: block;
    font-size: 18px;
    color: var(--neon-purple);
    text-shadow: 0 0 10px var(--neon-purple);
    margin-top: 5px;
}

.age-result-message {
    font-family: var(--font-body);
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.age-result-birthdays {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--neon-cyan);
    opacity: 0.9;
}

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

/* ============================================ */
/* === FLOATING DIARY BUTTON === */
/* ============================================ */

.diary-float-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(15, 15, 30, 0.95);
    border: 3px solid var(--neon-cyan);
    border-radius: 15px;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: all 0.3s ease;
    pointer-events: auto;
    
    /* Glow effect */
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.4),
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    
    animation: diaryFloat 3s ease-in-out infinite, diaryGlow 2s ease-in-out infinite alternate;
}

.diary-float-btn:hover {
    transform: scale(1.1) translateY(-5px);
    border-color: var(--neon-purple);
    box-shadow: 
        0 0 25px rgba(208, 66, 255, 0.6),
        0 0 50px rgba(208, 66, 255, 0.3),
        0 0 75px rgba(208, 66, 255, 0.1),
        inset 0 0 30px rgba(208, 66, 255, 0.2);
}

.diary-float-btn:hover .diary-icon {
    filter: drop-shadow(0 0 10px var(--neon-purple));
}

.diary-float-btn:hover .diary-label {
    color: var(--neon-purple);
    text-shadow: 0 0 15px var(--neon-purple);
}

.diary-icon {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 8px var(--neon-cyan));
    transition: filter 0.3s ease;
}

.diary-label {
    font-family: var(--font-title);
    font-size: 8px;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* Floating animation */
@keyframes diaryFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Glow pulse animation */
@keyframes diaryGlow {
    0% {
        box-shadow: 
            0 0 15px rgba(0, 255, 255, 0.4),
            0 0 30px rgba(0, 255, 255, 0.2),
            inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(0, 255, 255, 0.6),
            0 0 40px rgba(0, 255, 255, 0.3),
            0 0 60px rgba(0, 255, 255, 0.1),
            inset 0 0 25px rgba(0, 255, 255, 0.15);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .diary-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px;
    }
    
    .diary-icon {
        width: 40px;
        height: 40px;
    }
    
    .diary-label {
        font-size: 6px;
    }
}

/* Seasons Floating Button */
.seasons-float-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(65, 105, 225, 0.3) 0%, rgba(255, 69, 0, 0.3) 100%);
    border: 3px solid #FFD700;
    border-radius: 16px;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    animation: seasonsGlow 2s ease-in-out infinite alternate;
}

.seasons-float-btn:hover {
    transform: scale(1.1);
    border-color: #FF4500;
    box-shadow: 
        0 0 25px rgba(255, 215, 0, 0.6),
        0 0 50px rgba(255, 69, 0, 0.3);
}

.seasons-icon {
    width: 50px;
    height: 50px;
}

.seasons-label {
    font-family: var(--font-title);
    font-size: 8px;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes seasonsGlow {
    0% {
        box-shadow: 
            0 0 15px rgba(255, 215, 0, 0.4),
            0 0 30px rgba(255, 69, 0, 0.2);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(65, 105, 225, 0.3);
    }
}

@media (max-width: 768px) {
    .seasons-float-btn {
        bottom: 20px;
        left: 20px;
        padding: 10px 15px;
    }
    
    .seasons-icon {
        width: 40px;
        height: 40px;
    }
    
    .seasons-label {
        font-size: 6px;
    }
}

/* ========================================
   Tutorial Mode Styles (Phase 8)
   ======================================== */

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    pointer-events: none; /* Allow clicks to pass through to highlighted elements */
    background: rgba(0, 0, 0, 0.6);
}

.tutorial-tooltip {
    position: fixed;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 300px;
    max-width: 90vw;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    z-index: 9010; /* Above overlay and highlighted elements */
    border: 3px solid var(--neon-purple);
    animation: floatTooltip 3s ease-in-out infinite;
}

.tutorial-tooltip.hidden {
    display: none;
}

@keyframes floatTooltip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.tutorial-tooltip h3 {
    margin-top: 0;
    color: var(--neon-purple);
    font-family: var(--font-title);
}

.tutorial-tooltip p {
    color: #333;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
}

.tut-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.tut-btn-primary {
    background: var(--neon-cyan);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-title);
    font-size: 12px;
}

.tut-btn-secondary {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 12px;
}

.tut-progress {
    text-align: center;
    font-size: 10px;
    color: #999;
    margin-top: 10px;
}

/* Highlight active element */
.tut-highlight-active {
    z-index: 9001 !important;
    box-shadow: 0 0 0 4px var(--neon-cyan), 0 0 50px rgba(0, 255, 255, 0.5) !important;
    pointer-events: auto !important;
}

/* Don't change position for elements that already have position set */
#canvas-container.tut-highlight-active,
#controls-panel.tut-highlight-active,
#temporal-controls-panel.tut-highlight-active {
    /* These already have position set, don't override */
}

/* For elements without explicit position, make them relative */
.slider-container.tut-highlight-active,
button.tut-highlight-active {
    position: relative;
}

/* Start Tutorial Button (in Learning Modal) */
.start-tutorial-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: var(--font-title);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 0 #b86b00;
    transition: transform 0.1s;
}

.start-tutorial-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* ======================================
   BOTTOM NAVIGATION BAR
   All feature buttons in a horizontal bar
   ====================================== */

.bottom-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    background: linear-gradient(to bottom, rgba(10, 10, 26, 0.98) 0%, rgba(10, 10, 26, 0.85) 100%);
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}

.bottom-nav-bar.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(30, 30, 60, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.nav-btn:hover {
    transform: translateY(-3px);
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

.nav-btn .nav-icon {
    width: 32px;
    height: 32px;
}

.nav-btn .nav-label {
    font-family: var(--font-title);
    font-size: 8px;
    color: #CCC;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-btn:hover .nav-label {
    color: var(--neon-cyan);
}

/* Individual button colors */
.nav-btn.shadow-btn {
    border-color: rgba(0, 255, 127, 0.4);
}
.nav-btn.shadow-btn:hover {
    border-color: #00FF7F;
    box-shadow: 0 5px 20px rgba(0, 255, 127, 0.4);
}

.nav-btn.seasons-btn {
    border-color: rgba(79, 172, 254, 0.4);
}
.nav-btn.seasons-btn:hover {
    border-color: #4facfe;
    box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.nav-btn.moon-btn {
    border-color: rgba(245, 245, 220, 0.4);
}
.nav-btn.moon-btn:hover {
    border-color: #F5F5DC;
    box-shadow: 0 5px 20px rgba(245, 245, 220, 0.4);
}

.nav-btn.gravity-btn {
    border-color: rgba(255, 215, 0, 0.4);
}
.nav-btn.gravity-btn:hover {
    border-color: #FFD700;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.nav-btn.phenomena-btn {
    border-color: rgba(255, 100, 50, 0.4);
}
.nav-btn.phenomena-btn:hover {
    border-color: #FF6432;
    box-shadow: 0 5px 20px rgba(255, 100, 50, 0.4);
}

.nav-btn.diary-btn {
    border-color: rgba(208, 66, 255, 0.4);
}
.nav-btn.diary-btn:hover {
    border-color: var(--neon-purple);
    box-shadow: 0 5px 20px rgba(208, 66, 255, 0.4);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .bottom-nav-bar {
        gap: 8px;
        padding: 10px 10px;
    }
    
    .nav-btn {
        padding: 8px 10px;
        min-width: 55px;
    }
    
    .nav-btn .nav-icon {
        width: 24px;
        height: 24px;
    }
    
    .nav-btn .nav-label {
        font-size: 6px;
    }
}

@media (max-width: 480px) {
    .bottom-nav-bar {
        gap: 5px;
        padding: 8px 5px;
    }
    
    .nav-btn {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .nav-btn .nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .nav-btn .nav-label {
        font-size: 5px;
    }
}

/* Hide old individual floating buttons */
.seasons-float-btn,
.moon-float-btn,
.gravity-float-btn,
.phenomena-float-btn,
.diary-float-btn {
    display: none !important;
}

/* Add padding to pages when nav bar is visible */
.page-container {
    padding-top: 70px;
}

/* ========================================
   Planet Modal Enhanced Styles (Phase 5)
   ======================================== */

.modal-content-planet {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Planet Header with 3D Preview */
.planet-modal-header {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.planet-preview-container {
    width: 150px;
    height: 150px;
    min-width: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1a1a3e 0%, #0a0a1a 100%);
    border: 3px solid var(--neon-cyan);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.planet-preview-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.planet-header-info {
    flex: 1;
}

.planet-header-info .pixel-title {
    margin-bottom: 10px;
    font-size: 24px;
}

.planet-description-text {
    color: #BBB;
    font-size: 16px;
    line-height: 1.5;
    font-family: var(--font-body);
}

/* Enhanced Stats Grid (6 items) */
.modal-content-planet .planet-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.modal-content-planet .stat-box {
    padding: 10px;
}

.modal-content-planet .stat-box strong {
    font-size: 11px;
}

.modal-content-planet .stat-box p {
    font-size: 14px;
}

/* Fun Fact Section */
.fun-fact-section {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.1) 0%, rgba(255, 100, 0, 0.1) 100%);
    border: 2px solid rgba(255, 200, 0, 0.3);
    border-radius: 12px;
    padding: 15px !important;
}

.fun-fact-text {
    font-size: 18px !important;
    color: #FFE066 !important;
    min-height: 50px;
    transition: opacity 0.15s ease;
}

.pixel-btn-tiny {
    font-family: var(--font-title);
    font-size: 10px;
    padding: 5px 10px;
    background: rgba(255, 200, 0, 0.2);
    border: 2px solid #FFD700;
    color: #FFD700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.pixel-btn-tiny:hover {
    background: rgba(255, 200, 0, 0.4);
    transform: scale(1.05);
}

/* Coming Soon Text */
.coming-soon-text {
    text-align: center;
    color: var(--neon-purple);
    font-family: var(--font-title);
    font-size: 12px;
    padding: 15px;
    background: rgba(208, 66, 255, 0.1);
    border: 2px dashed var(--neon-purple);
    border-radius: 8px;
    margin-top: 15px;
}

/* Scrollbar styling for planet modal */
.modal-content-planet::-webkit-scrollbar {
    width: 8px;
}

.modal-content-planet::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.modal-content-planet::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 4px;
}

.modal-content-planet::-webkit-scrollbar-thumb:hover {
    background: var(--neon-purple);
}

/* Mobile responsive for planet modal */
@media (max-width: 600px) {
    .planet-modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .planet-preview-container {
        width: 120px;
        height: 120px;
        min-width: 120px;
    }
    
    .modal-content-planet .planet-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .planet-header-info .pixel-title {
        font-size: 20px;
    }
    
    .planet-description-text {
        font-size: 14px;
    }
}

/* ========================================
   Seasons Page Styles (Phase 6)
   ======================================== */

.page-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a1a 100%);
    z-index: 100;
    overflow-y: auto;
}

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 12px;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--neon-cyan);
    color: #000;
    transform: scale(1.05);
}

.seasons-content {
    padding: 80px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.seasons-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-title {
    font-family: var(--font-title);
    font-size: 28px;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
}

.page-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    color: #AAA;
}

.seasons-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 40px;
}

/* 3D Visualization Area */
.seasons-3d-area {
    background: radial-gradient(circle at center, #1a1a3e 0%, #0a0a1a 100%);
    border: 3px solid var(--neon-purple);
    border-radius: 16px;
    min-height: 500px;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(208, 66, 255, 0.3),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.seasons-3d-area canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Info Panel */
.seasons-info-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-season-display {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.15) 0%, rgba(255, 100, 0, 0.15) 100%);
    border: 2px solid rgba(255, 200, 0, 0.4);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.current-season-display h2 {
    font-family: var(--font-title);
    font-size: 18px;
    color: #FFD700;
    margin-bottom: 10px;
}

.hemisphere-info {
    font-family: var(--font-body);
    font-size: 16px;
    color: #FFF;
}

.season-explanation {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.season-explanation h3 {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-cyan);
    margin-bottom: 10px;
}

.season-explanation p {
    font-family: var(--font-body);
    font-size: 16px;
    color: #DDD;
    line-height: 1.6;
}

/* Controls */
.seasons-controls {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.control-row {
    margin-bottom: 20px;
}

.control-row label {
    display: block;
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-cyan);
    margin-bottom: 8px;
}

.control-row input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.control-row span {
    font-family: var(--font-body);
    font-size: 14px;
    color: #FFF;
}

.season-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.season-btn {
    background: rgba(var(--season-color), 0.2);
    border: 2px solid var(--season-color, #FFF);
    color: #FFF;
    padding: 12px;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.season-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.season-btn.active {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.animate-btn {
    width: 100%;
    font-size: 14px;
}

.animate-btn.animating {
    background: var(--neon-purple);
    animation: pulse 1s infinite;
}

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

/* Legend */
.seasons-legend {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
}

.seasons-legend h3 {
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-cyan);
    margin-bottom: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    color: #CCC;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Educational Footer */
.seasons-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.fact-card {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(208, 66, 255, 0.1) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.fact-emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.fact-card p {
    font-family: var(--font-body);
    font-size: 14px;
    color: #DDD;
    line-height: 1.5;
}

.fact-card strong {
    color: var(--neon-cyan);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .seasons-layout {
        grid-template-columns: 1fr;
    }
    
    .seasons-3d-area {
        min-height: 350px;
    }
    
    .seasons-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .page-title {
        font-size: 20px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .season-buttons {
        grid-template-columns: 1fr;
    }
    
    .back-btn {
        padding: 8px 15px;
        font-size: 10px;
    }
}

/* ========================================
   Moon Phases Page Styles (Phase 7)
   ======================================== */

.moon-content {
    padding: 80px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.moon-header {
    text-align: center;
    margin-bottom: 30px;
}

.moon-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    margin-bottom: 40px;
}

/* 3D Visualization Area */
.moon-3d-area {
    background: radial-gradient(circle at center, #0a0a2a 0%, #050510 100%);
    border: 3px solid #FFD700;
    border-radius: 16px;
    min-height: 500px;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.2),
        inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.moon-3d-area canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Info Panel */
.moon-info-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Current Phase Display */
.current-phase-display {
    background: linear-gradient(135deg, rgba(100, 100, 150, 0.2) 0%, rgba(50, 50, 100, 0.2) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.phase-emoji {
    font-size: 64px;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 200, 0.5));
}

.current-phase-display h2 {
    font-family: var(--font-title);
    font-size: 20px;
    color: #FFD700;
    margin-bottom: 10px;
}

.phase-desc {
    font-family: var(--font-body);
    font-size: 14px;
    color: #CCC;
    margin-bottom: 15px;
}

.illumination-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #AAA;
}

.illumination-bar label {
    font-family: var(--font-title);
    font-size: 10px;
}

.bar-container {
    flex: 1;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #444;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFF);
    transition: width 0.3s ease;
}

/* View Mode Toggle */
.view-mode-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #AAA;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.view-btn.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* Moon Controls */
.moon-controls {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.phase-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.phase-btn {
    padding: 12px 8px;
    background: rgba(100, 100, 150, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.3);
    color: #DDD;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 9px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phase-btn:hover {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
}

.phase-btn.active {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

/* Quiz Section */
.quiz-section {
    background: linear-gradient(135deg, rgba(208, 66, 255, 0.15) 0%, rgba(0, 255, 255, 0.1) 100%);
    border: 2px solid var(--neon-purple);
    border-radius: 12px;
    padding: 20px;
}

.quiz-score {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-cyan);
    text-align: center;
    margin-bottom: 15px;
}

.quiz-question {
    font-family: var(--font-body);
    font-size: 18px;
    color: #FFF;
    text-align: center;
    margin-bottom: 15px;
}

.quiz-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.quiz-answer-btn {
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #DDD;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-answer-btn:hover:not(:disabled) {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.quiz-answer-btn.correct {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.quiz-answer-btn.incorrect {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.quiz-answer-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-feedback {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 14px;
}

.quiz-feedback.correct {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4CAF50;
    color: #4CAF50;
}

.quiz-feedback.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border: 2px solid #f44336;
    color: #f44336;
}

.quiz-btn {
    background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-cyan) 100%);
    border: none;
    margin-top: 10px;
}

.quiz-btn.quiz-active {
    background: #f44336;
}

/* Moon Footer */
.moon-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .moon-layout {
        grid-template-columns: 1fr;
    }
    
    .moon-3d-area {
        min-height: 350px;
    }
    
    .moon-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .phase-buttons {
        grid-template-columns: 1fr;
    }
    
    .quiz-answers {
        grid-template-columns: 1fr;
    }
    
    .phase-emoji {
        font-size: 48px;
    }
}

/* ========================================
   Phenomena Gallery Styles (Phase 9)
   ======================================== */

/* Phenomena Floating Button */
.phenomena-float-btn {
    position: fixed;
    bottom: 330px;
    left: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.3) 0%, rgba(100, 0, 150, 0.3) 100%);
    border: 3px solid #FF4500;
    border-radius: 16px;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    animation: phenomenaGlow 2.5s ease-in-out infinite alternate;
}

.phenomena-float-btn:hover {
    transform: scale(1.1);
    border-color: #FFD700;
    box-shadow: 
        0 0 25px rgba(255, 69, 0, 0.6),
        0 0 50px rgba(255, 215, 0, 0.3);
}

.phenomena-icon {
    width: 50px;
    height: 50px;
}

.phenomena-label {
    font-family: var(--font-title);
    font-size: 8px;
    color: #FF4500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes phenomenaGlow {
    0% {
        box-shadow: 
            0 0 15px rgba(255, 69, 0, 0.3),
            0 0 30px rgba(100, 0, 150, 0.2);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(255, 69, 0, 0.5),
            0 0 40px rgba(255, 215, 0, 0.3);
    }
}

@media (max-width: 768px) {
    .phenomena-float-btn {
        bottom: 260px;
        left: 20px;
        padding: 10px 15px;
    }
    
    .phenomena-icon {
        width: 40px;
        height: 40px;
    }
    
    .phenomena-label {
        font-size: 6px;
    }
}

/* Phenomena Page Content */
.phenomena-content {
    padding: 80px 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.phenomena-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Category Filters */
.phenomena-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #CCC;
    border-radius: 25px;
    font-family: var(--font-title);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.filter-btn.active {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    background: rgba(208, 66, 255, 0.2);
    box-shadow: 0 0 15px rgba(208, 66, 255, 0.3);
}

/* Phenomena Grid */
.phenomena-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Phenomenon Card */
.phenomenon-card {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9) 0%, rgba(30, 30, 60, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out both;
}

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

.phenomenon-card:hover {
    transform: translateY(-8px);
    border-color: var(--neon-cyan);
    box-shadow: 
        0 10px 40px rgba(0, 255, 255, 0.2),
        0 0 20px rgba(0, 255, 255, 0.1);
}

.phenomenon-card-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a3e 0%, #0a0a1a 100%);
    position: relative;
}

.phenomenon-emoji {
    font-size: 64px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.phenomenon-warning,
.phenomenon-interactive {
    position: absolute;
    top: 10px;
    font-size: 20px;
}

.phenomenon-warning {
    right: 10px;
}

.phenomenon-interactive {
    left: 10px;
}

.phenomenon-card-content {
    padding: 20px;
}

.phenomenon-category-tag {
    font-family: var(--font-title);
    font-size: 8px;
    color: var(--neon-cyan);
    text-transform: uppercase;
    opacity: 0.8;
}

.phenomenon-name {
    font-family: var(--font-title);
    font-size: 14px;
    color: #FFF;
    margin: 10px 0;
}

.phenomenon-short-desc {
    font-family: var(--font-body);
    font-size: 16px;
    color: #CCC;
    line-height: 1.4;
}

.phenomenon-card-footer {
    padding: 0 20px 20px;
}

.learn-more-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(208, 66, 255, 0.2) 100%);
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.learn-more-btn:hover {
    background: var(--neon-cyan);
    color: #000;
}

/* Phenomenon Modal */
.phenomenon-modal-content {
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.phenomenon-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.phenomenon-modal-emoji {
    font-size: 64px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.phenomenon-modal-title-area {
    flex: 1;
}

.phenomenon-modal-category {
    font-family: var(--font-title);
    font-size: 10px;
    color: var(--neon-cyan);
    text-transform: uppercase;
}

.phenomenon-modal-title {
    font-family: var(--font-title);
    font-size: 20px;
    color: #FFF;
    margin-top: 5px;
}

.phenomenon-warning-box {
    background: rgba(255, 0, 0, 0.2);
    border: 2px solid #FF4500;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    font-family: var(--font-title);
    font-size: 12px;
    color: #FF4500;
}

.phenomenon-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.phenomenon-description p {
    font-family: var(--font-body);
    font-size: 18px;
    color: #DDD;
    line-height: 1.6;
    margin-bottom: 15px;
}

.phenomenon-fun-facts {
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.1) 0%, rgba(255, 100, 0, 0.1) 100%);
    border: 2px solid rgba(255, 200, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.phenomenon-fun-facts h3 {
    font-family: var(--font-title);
    font-size: 14px;
    color: #FFD700;
    margin-bottom: 15px;
}

.phenomenon-fun-facts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.phenomenon-fun-facts li {
    font-family: var(--font-body);
    font-size: 16px;
    color: #EEE;
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    border-bottom: 1px solid rgba(255, 200, 0, 0.1);
}

.phenomenon-fun-facts li:last-child {
    border-bottom: none;
}

.phenomenon-fun-facts li::before {
    content: '⭐';
    position: absolute;
    left: 0;
    font-size: 12px;
}

.phenomenon-interactive-section {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(208, 66, 255, 0.1) 100%);
    border: 2px solid var(--neon-cyan);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.phenomenon-interactive-section h3 {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-cyan);
    margin-bottom: 10px;
}

.phenomenon-interactive-section p {
    font-family: var(--font-body);
    font-size: 16px;
    color: #DDD;
    margin-bottom: 15px;
}

.try-demo-btn {
    padding: 12px 25px;
    background: var(--neon-cyan);
    border: none;
    color: #000;
    border-radius: 8px;
    font-family: var(--font-title);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-demo-btn:hover {
    background: var(--neon-purple);
    color: #FFF;
    transform: scale(1.05);
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .phenomena-grid {
        grid-template-columns: 1fr;
    }
    
    .phenomenon-modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .phenomenon-modal-title {
        font-size: 16px;
    }
}

/* ======================================
   GRAVITY & SKY PAGE (PHASE 10)
   ====================================== */

/* Gravity Floating Button */
.gravity-float-btn {
    position: fixed;
    bottom: 230px;
    left: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(255, 215, 0, 0.1) 100%);
    border: 3px solid #4facfe;
    border-radius: 16px;
    cursor: pointer;
    z-index: 50;
    transition: all 0.3s ease;
    animation: gravityPulse 3s ease-in-out infinite alternate;
}

@keyframes gravityPulse {
    from {
        box-shadow: 0 0 10px rgba(79, 172, 254, 0.3);
    }
    to {
        box-shadow: 0 0 25px rgba(79, 172, 254, 0.6), 0 0 40px rgba(255, 215, 0, 0.3);
    }
}

.gravity-float-btn:hover {
    transform: scale(1.1);
    border-color: #FFD700;
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.5),
        0 0 50px rgba(79, 172, 254, 0.3);
}

.gravity-icon {
    width: 48px;
    height: 48px;
}

.gravity-label {
    font-family: var(--font-title);
    font-size: 10px;
    color: #4facfe;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .gravity-float-btn {
        bottom: 180px;
        left: 20px;
        padding: 10px 15px;
    }
    
    .gravity-icon {
        width: 36px;
        height: 36px;
    }
    
    .gravity-label {
        font-size: 8px;
    }
}

/* Gravity Page Container */
#gravity-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3e 50%, #0a0a2a 100%);
    overflow-y: auto;
    z-index: 1000;
}

.gravity-content {
    padding: 60px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.gravity-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Gravity Tabs */
.gravity-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.gravity-tab-btn {
    padding: 12px 25px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #CCC;
    border-radius: 30px;
    font-family: var(--font-title);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gravity-tab-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.gravity-tab-btn.active {
    border-color: #FFD700;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Gravity Tab Content */
.gravity-tab-content {
    animation: fadeIn 0.3s ease;
}

.gravity-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .gravity-layout {
        grid-template-columns: 1fr;
    }
}

/* Weight Calculator Section */
.weight-calculator-section {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9) 0%, rgba(30, 30, 60, 0.9) 100%);
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 20px;
    padding: 25px;
}

.weight-calculator-section h2 {
    font-family: var(--font-title);
    font-size: 18px;
    color: #4facfe;
    margin-bottom: 20px;
    text-align: center;
}

.weight-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 25px;
}

.weight-input-group label {
    font-family: var(--font-body);
    font-size: 16px;
    color: #DDD;
}

#earth-weight-input {
    width: 100px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--neon-cyan);
    border-radius: 8px;
    color: #FFF;
    font-family: var(--font-body);
    font-size: 18px;
    text-align: center;
}

#earth-weight-input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.pixel-btn-small {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    border: none;
    border-radius: 8px;
    color: #000;
    font-family: var(--font-title);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pixel-btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Weight Results Grid */
.weight-results-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.weight-result-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s ease;
}

.weight-result-card:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

.weight-result-card.earth-highlight {
    border-color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.weight-planet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.weight-planet-emoji {
    font-size: 24px;
}

.weight-planet-name {
    font-family: var(--font-title);
    font-size: 12px;
    color: #FFF;
}

.weight-value {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.weight-value strong {
    font-family: var(--font-title);
    font-size: 20px;
    color: #FFD700;
}

.weight-comparison {
    font-family: var(--font-body);
    font-size: 14px;
    color: #AAA;
}

.gravity-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.gravity-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.jump-height {
    font-family: var(--font-body);
    font-size: 14px;
    color: #CCC;
}

.jump-height strong {
    color: var(--neon-cyan);
}

.gravity-fun-fact {
    font-family: var(--font-body);
    font-size: 16px;
    color: #FFD700;
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Jump Animation Section */
.jump-animation-section {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9) 0%, rgba(30, 30, 60, 0.9) 100%);
    border: 2px solid rgba(208, 66, 255, 0.3);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.jump-animation-section h2 {
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--neon-purple);
    margin-bottom: 10px;
}

.jump-intro {
    font-family: var(--font-body);
    font-size: 14px;
    color: #AAA;
    text-align: center;
    margin-bottom: 15px;
}

.jump-animation-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jump-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, #4a3a2a 0%, #3a2a1a 100%);
    border-top: 3px solid #6a5a4a;
}

.jumping-astronaut {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    transition: transform 0.5s ease-out;
    --jump-height: -50px;
    cursor: pointer;
}

.jumping-astronaut:hover {
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

.jumping-astronaut.jumping {
    animation: jumpBounce 1.5s ease-in-out;
}

@keyframes jumpBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(var(--jump-height)); }
}

.jump-planet-label {
    font-family: var(--font-title);
    font-size: 18px;
    color: #FFD700;
    margin-bottom: 5px;
}

.jump-height-label {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--neon-cyan);
}

.jump-explanation {
    font-family: var(--font-body);
    font-size: 16px;
    color: #CCC;
}

/* Interactive Jump Animation */
.jump-planet-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.jump-planet-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jump-planet-btn:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.1);
}

.jump-planet-btn.active {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.jump-stage {
    position: relative;
    height: 160px;
    background: linear-gradient(to bottom, #0a0a2a 0%, #1a1a4a 100%);
    border-radius: 12px;
    overflow: hidden;
}

.jump-height-marker {
    position: absolute;
    bottom: 35px;
    left: calc(50% + 40px);
    width: 3px;
    height: 0;
    background: linear-gradient(to top, var(--neon-cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.jump-height-marker span {
    position: absolute;
    top: -25px;
    left: 10px;
    font-family: var(--font-title);
    font-size: 12px;
    color: var(--neon-cyan);
    white-space: nowrap;
}

.jump-info {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.jump-controls {
    text-align: center;
    padding: 5px 0;
}

.auto-cycle-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: #CCC;
    font-family: var(--font-title);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auto-cycle-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.auto-cycle-btn.active {
    border-color: #FFD700;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
}

/* Sun Size Tab */
.sun-size-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.planet-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.planet-select-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.planet-select-btn:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.planet-select-btn.active {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.planet-select-btn span {
    font-family: var(--font-title);
    font-size: 9px;
    color: #CCC;
}

.planet-select-btn.active span {
    color: #FFD700;
}

/* Sun Size Visualization */
.sun-size-visualization {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9) 0%, rgba(30, 30, 60, 0.9) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    overflow: hidden;
}

.sun-view-scene {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease;
    overflow: hidden;
}

/* Reference Objects at Horizon */
.reference-horizon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
}

.reference-objects {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 0 20px;
}

.reference-objects span {
    filter: brightness(0.3);
    cursor: help;
}

.ref-tree { font-size: 32px; }
.ref-elephant { font-size: 24px; }
.ref-car { font-size: 20px; }
.ref-person { font-size: 22px; }
.ref-house { font-size: 28px; }

.horizon-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 15px;
    background: linear-gradient(to bottom, #2a2a2a 0%, #1a1a1a 100%);
    border-top: 2px solid #444;
}

.sun-comparison-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun-visual {
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FFF 0%, #FFD700 30%, #FF8C00 70%, #FF4500 100%);
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.8),
        0 0 100px rgba(255, 140, 0, 0.5);
    transition: all 0.5s ease;
}

.sun-glow {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: sunPulse 2s ease-in-out infinite;
}

@keyframes sunPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.sun-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    text-align: center;
}

.sun-info-overlay h3 {
    font-family: var(--font-title);
    font-size: 16px;
    color: #FFF;
    margin-bottom: 10px;
}

.sun-size-text,
.sun-distance-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: #DDD;
    margin: 5px 0;
}

.sun-size-text strong,
.sun-distance-text strong {
    color: #FFD700;
}

.sun-description {
    font-family: var(--font-body);
    font-size: 16px;
    color: #CCC;
    margin-top: 10px;
    font-style: italic;
}

/* Sun Comparison Strip */
.sun-comparison-strip {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sun-comparison-strip h4 {
    font-family: var(--font-title);
    font-size: 12px;
    color: #AAA;
    text-align: center;
    margin-bottom: 15px;
}

.sun-strip-planets {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.sun-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 10px;
    border-radius: 8px;
}

.sun-strip-item:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.05);
}

.sun-strip-item.active {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.mini-sun {
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FFD700 0%, #FF8C00 50%, #FF4500 100%);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Atmosphere Tab */
.atmosphere-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.planet-selector-row {
    text-align: center;
}

.planet-selector-row p {
    font-family: var(--font-body);
    font-size: 16px;
    color: #CCC;
    margin-bottom: 15px;
}

/* Atmosphere Visualization */
.atmosphere-visualization {
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.9) 0%, rgba(30, 30, 60, 0.9) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
}

.atmosphere-scene {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 250px;
}

@media (max-width: 600px) {
    .atmosphere-scene {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .sky-section {
        height: 150px;
    }
}

.sky-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.5s ease;
}

.sky-label {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-title);
    font-size: 12px;
    color: #FFF;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 15px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.stars-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(2px 2px at 20px 30px, white, rgba(0, 0, 0, 0)),
                      radial-gradient(2px 2px at 40px 70px, white, rgba(0, 0, 0, 0)),
                      radial-gradient(1px 1px at 90px 40px, white, rgba(0, 0, 0, 0)),
                      radial-gradient(2px 2px at 160px 120px, white, rgba(0, 0, 0, 0)),
                      radial-gradient(1px 1px at 130px 80px, white, rgba(0, 0, 0, 0)),
                      radial-gradient(1px 1px at 200px 50px, white, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 250px 150px;
}

.horizon-line {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.sunset-sky {
    overflow: hidden; /* Ensure sun clips when setting */
    position: relative;
}

.setting-sun {
    position: absolute;
    bottom: 0; /* Align bottom with horizon ground */
    left: 50%;
    transform: translateX(-50%) translateY(40%); /* Move down to simulate setting */
    background: radial-gradient(circle at center, #FFF 0%, #FFD700 30%, #FF8C00 60%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    z-index: 1;
}

.sunset-sky .horizon-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px; /* Height of ground */
    background: linear-gradient(to bottom, #1a1a1a 0%, #000 100%);
    z-index: 2; /* Above the sun */
    border-top: 2px solid #333;
}

/* Day sun in atmosphere view */
.day-sun {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FFF 0%, #FFD700 40%, #FF8C00 100%);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 140, 0, 0.5);
}

/* Atmosphere Planet Selector */
.atmosphere-planet-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.atmosphere-planet-selector .planet-select-btn {
    padding: 8px 12px;
    font-size: 14px;
}

.atmosphere-planet-selector .planet-select-btn span {
    font-size: 9px;
}

/* Sun size note in atmosphere info */
.sun-size-note {
    font-family: var(--font-body);
    font-size: 14px;
    color: #FFD700;
    text-align: center;
    padding: 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
}

.atmosphere-info {
    padding: 25px;
    text-align: center;
}

.atmosphere-info h3 {
    font-family: var(--font-title);
    font-size: 18px;
    color: #FFF;
    margin-bottom: 15px;
}

.atmosphere-description {
    font-family: var(--font-body);
    font-size: 16px;
    color: #DDD;
    line-height: 1.5;
    margin-bottom: 20px;
}

.atmosphere-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.temp-stat {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.temp-label {
    font-family: var(--font-body);
    font-size: 14px;
    color: #AAA;
    margin-right: 10px;
}

.temp-value {
    font-family: var(--font-title);
    font-size: 14px;
    color: var(--neon-cyan);
}
.atmosphere-fact {
    font-family: var(--font-body);
    font-size: 16px;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}
