/* =========================================
   JD's Spot - Main Stylesheet
   ========================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&family=Jersey+10&family=Pixelify+Sans:wght@400;700&family=Space+Mono:wght@400;700&family=Tiny5&display=swap');

/* CSS Custom Properties */
:root {
    --font-main: 'Space Mono', monospace;
}

body.font-inconsolata {
    --font-main: 'Inconsolata', monospace;
}

body.font-pixelify {
    --font-main: 'Pixelify Sans', cursive;
}

body.font-jersey10 {
    --font-main: 'Jersey 10', cursive;
}

body.font-tiny5 {
    --font-main: 'Tiny5', cursive;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
    font-family: var(--font-main);
    color: white;
    cursor: crosshair;
    
    /* Disable text selection sitewide */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Pointer cursor for interactive elements */
button,
a,
select,
input[type="checkbox"],
input[type="radio"],
label,
.clickable,
.space-object,
.satellite,
.nebula,
.planet,
.black-hole,
.sol,
.space-station,
.menu-button,
.return-button,
.action-button,
.dialogue-nav-button,
.settings-button,
.modal-close,
.contact-icon,
.history-panel-toggle,
.history-entry {
    cursor: pointer;
}

/* Unified Return Button */
.return-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    background-image: url('../images/return.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    z-index: 100;
    transition: transform 0.3s ease, filter 0.3s ease;
    animation: return-sway 3s ease-in-out infinite, return-rainbow-glow 4s linear infinite;
}

.return-button:hover {
    transform: scale(1.15);
    animation: return-rainbow-glow 4s linear infinite;
    filter: brightness(1.3);
}

.return-button:active {
    transform: scale(0.95);
}

/* Return button tooltip (mouse-following) */
.return-tooltip {
    position: fixed;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid DodgerBlue;
    border-radius: 6px;
    color: white;
    font-family: var(--font-main);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 101;
}

.return-tooltip.visible {
    opacity: 1;
}

@keyframes return-sway {
    0%, 100% {
        transform: rotate(-8deg) translateY(0);
    }
    25% {
        transform: rotate(5deg) translateY(-4px);
    }
    50% {
        transform: rotate(-5deg) translateY(2px);
    }
    75% {
        transform: rotate(8deg) translateY(-2px);
    }
}

@keyframes return-rainbow-glow {
    0% {
        filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.8)) drop-shadow(0 0 15px rgba(255, 0, 0, 0.4));
    }
    16.67% {
        filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.8)) drop-shadow(0 0 15px rgba(255, 165, 0, 0.4));
    }
    33.33% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.8)) drop-shadow(0 0 15px rgba(255, 255, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.8)) drop-shadow(0 0 15px rgba(0, 255, 0, 0.4));
    }
    66.67% {
        filter: drop-shadow(0 0 8px rgba(0, 150, 255, 0.8)) drop-shadow(0 0 15px rgba(0, 150, 255, 0.4));
    }
    83.33% {
        filter: drop-shadow(0 0 8px rgba(180, 0, 255, 0.8)) drop-shadow(0 0 15px rgba(180, 0, 255, 0.4));
    }
    100% {
        filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.8)) drop-shadow(0 0 15px rgba(255, 0, 0, 0.4));
    }
}

/* Allow text selection for specific elements (use with copy buttons) */
.copyable {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* =========================================
   Preloader
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    color: white;
    font-family: var(--font-main), 'Courier New', monospace;
}

.preloader-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: orange;
}

.preloader-bar {
    width: 300px;
    height: 4px;
    background: rgba(30, 144, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 10px auto;
}

.preloader-progress {
    height: 100%;
    background: DodgerBlue;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.8);
}

.preloader-text {
    font-size: 14px;
    color: #87ceeb;
}

/* =========================================
   Scene Container (shared by all scenes)
   ========================================= */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.scene.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.scene.transitioning {
    z-index: 2;
}

/* =========================================
   Transition Effects
   ========================================= */
.transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
}

.transition-overlay.fade-black {
    background: #000;
}

.transition-overlay.fade-white {
    background: #fff;
}

.transition-overlay.fade-yellow {
    background: #fff8dc;
}

.transition-overlay.active {
    opacity: 1;
}

/* =========================================
   Space Background (Home Scene)
   ========================================= */
.space-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1e 50%, #000 100%);
}

/* Nebula layers */
.nebula-layer-1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 800px 600px at 20% 30%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 600px 400px at 80% 70%, rgba(75, 0, 130, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 400px 300px at 60% 20%, rgba(0, 100, 200, 0.06) 0%, transparent 50%);
    animation: nebula-drift-1 120s infinite linear;
}

.nebula-layer-2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 1000px 800px at 70% 80%, rgba(220, 20, 60, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 500px 700px at 10% 60%, rgba(0, 191, 255, 0.04) 0%, transparent 50%);
    animation: nebula-drift-2 180s infinite linear;
}

/* =========================================
   Stars
   ========================================= */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
}

.star-tiny {
    width: 1px;
    height: 1px;
    animation: twinkle-subtle 3s infinite ease-in-out;
}

.star-small {
    width: 2px;
    height: 2px;
    animation: twinkle 4s infinite ease-in-out;
}

.star-medium {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: twinkle-bright 5s infinite ease-in-out;
}

.star-large {
    width: 4px;
    height: 4px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(200, 200, 255, 0.5);
    animation: twinkle-bright 6s infinite ease-in-out;
}

.star-blue {
    background: #87ceeb;
    box-shadow: 0 0 8px rgba(135, 206, 235, 0.8);
}

.star-red {
    background: #ffb6c1;
    box-shadow: 0 0 8px rgba(255, 182, 193, 0.8);
}

.star-yellow {
    background: #fff8dc;
    box-shadow: 0 0 8px rgba(255, 248, 220, 0.8);
}

/* =========================================
   Comet
   ========================================= */
.comet-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.flying-comet {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 
        0 0 6px #fff,
        0 0 12px #87ceeb,
        0 0 18px #4169e1;
}

.flying-comet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(135, 206, 235, 0.6) 30%, 
        rgba(65, 105, 225, 0.4) 60%, 
        transparent 100%);
    transform: translate(-50%, -50%);
    border-radius: 1px;
    transform-origin: left center;
}

/* =========================================
   Alien & Laser
   ========================================= */
.alien {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('../images/alien-spaceship.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 11;
    pointer-events: none;
}

.laser {
    position: absolute;
    width: 4px;
    height: 30px;
    background: linear-gradient(to top,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 10%,
        rgba(255, 100, 100, 1) 30%,
        rgba(255, 0, 0, 1) 50%,
        rgba(255, 100, 100, 1) 70%,
        rgba(255, 255, 255, 1) 90%,
        rgba(255, 255, 255, 0) 100%);
    box-shadow: 0 0 6px rgba(255, 0, 0, 1), 0 0 12px rgba(255, 0, 0, 0.7);
    z-index: 14;
    pointer-events: none;
    border-radius: 2px;
    transform-origin: center bottom;
}

/* =========================================
   Space Objects (Locations)
   ========================================= */
/* =========================================
   Space Objects - JS handles positioning
   ========================================= */
.space-object {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: filter 0.3s ease;
    z-index: 5;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.space-object:hover {
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(255, 99, 71, 0.7));
}

.space-object.discovered:hover {
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(0, 250, 154, 0.7));
}

.space-object.active {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(30, 144, 255, 0.7));
}

/* Sol - Center of the scene */
.sol {
    width: 200px;
    height: 200px;
    background-image: url('../images/sol.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    cursor: pointer;
    transition: filter 0.3s ease;
}

/* Sol radiating light effect - container for waves */
.sol-glow-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 9;
}

.sol-glow-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: radial-gradient(
        circle at center,
        rgba(255, 180, 80, 0.4) 0%,
        rgba(255, 140, 50, 0.3) 20%,
        rgba(255, 100, 30, 0.15) 40%,
        rgba(255, 60, 10, 0.05) 70%,
        transparent 100%
    );
    animation: sol-radiate 3s ease-out infinite;
    opacity: 0;
}

.sol-glow-wave:nth-child(2) {
    animation-delay: 1s;
}

.sol-glow-wave:nth-child(3) {
    animation-delay: 2s;
}

@keyframes sol-radiate {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.sol:hover {
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(255, 99, 71, 0.7));
}

.sol.discovered:hover {
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(0, 250, 154, 0.7));
}

.sol.active {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(30, 144, 255, 0.7));
}

/* Space Station */
.space-station {
    width: 180px;
    height: 180px;
    background-image: url('../images/space-station.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    cursor: pointer;
    transition: filter 0.3s ease;
}

.space-station:hover {
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(255, 99, 71, 0.7));
}

.space-station.discovered:hover {
    filter: brightness(1.1) drop-shadow(0 0 15px rgba(0, 250, 154, 0.7));
}

.space-station.active {
    filter: brightness(1.3) drop-shadow(0 0 20px rgba(30, 144, 255, 0.7));
}

/* Nebula */
.nebula-object {
    width: 300px;
    height: 300px;
    background-image: url('../images/playful-nebula.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

/* Planet */
.planet {
    width: 180px;
    height: 180px;
    background-image: url('../images/fauxrth.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

/* Satellite */
.satellite {
    width: 90px;
    height: 90px;
    background-image: url('../images/communications-hub.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

/* Black Hole */
.black-hole {
    width: 150px;
    height: 150px;
    background-image: url('../images/blackhole.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
}

/* Placeholder for future location */
.placeholder-location {
    width: 150px;
    height: 150px;
    pointer-events: none;
    opacity: 0;
}

/* =========================================
   Spaceship
   ========================================= */
.spaceship {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('../images/spaceship.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 15;
    transform-origin: center 40%;
}

/* Spaceship trail particles */
.spaceship-trail-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 14;
}

/* =========================================
   Dialogue System
   ========================================= */
/* Dialogue Wrapper (contains window and actions) */
.dialogue-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: flex-end;
    gap: 15px;
    z-index: 1000;
}

.dialogue-window {
    background: rgba(0, 0, 0, 0.9);
    padding: 0;
    border-radius: 8px;
    border: 2px solid DodgerBlue;
    width: 650px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    gap: 0;
    align-items: flex-start;
    font-family: var(--font-main);
}

.portrait-box {
    width: 150px;
    height: 150px;
    background-image: url('../images/portrait.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 6px 0 0 6px;
    flex-shrink: 0;
}

.dialogue-content {
    width: 500px;
    height: 150px;
    padding: 15px 0 15px 15px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: DodgerBlue rgba(0, 0, 0, 0.3);
}

.dialogue-content::-webkit-scrollbar {
    width: 8px;
}

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

.dialogue-content::-webkit-scrollbar-thumb {
    background: DodgerBlue;
    border-radius: 4px;
}

.dialogue-content::-webkit-scrollbar-thumb:hover {
    background: #4a90e2;
}

.dialogue-content h3 {
    margin: 0 0 8px 0;
    color: orange;
    font-size: 14px;
    font-weight: bold;
}

.dialogue-content p {
    margin: 0 0 6px 0;
    padding-right: 15px;
    font-size: 16px;
    line-height: 1.78;
}

.dialogue-content strong {
    color: #87ceeb;
}

/* Italic text shake animation */
.dialogue-content em.shake {
    display: inline-block;
    animation: italic-shake 0.4s ease-in-out;
}

@keyframes italic-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px) rotate(-1deg); }
    40% { transform: translateX(2px) rotate(1deg); }
    60% { transform: translateX(-1px) rotate(-0.5deg); }
    80% { transform: translateX(1px) rotate(0.5deg); }
}

/* Dialogue Actions (buttons - positioned outside dialogue window) */
.dialogue-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.dialogue-actions:empty {
    display: none;
}

.dialogue-btn {
    padding: 8px 16px;
    background: rgba(0, 250, 154, 0.3);
    border: 1px solid MediumSpringGreen;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 12px;
    transition: all 0.2s ease;
}

.dialogue-btn:hover {
    background: rgba(0, 250, 154, 0.6);
}

.dialogue-btn.danger {
    background: rgba(255, 60, 60, 0.3);
    border-color: #ff3c3c;
}

.dialogue-btn.danger:hover {
    background: rgba(255, 60, 60, 0.6);
}

/* =========================================
   Location Box & Tooltip
   ========================================= */
.location-box {
    position: fixed;
    top: 20px;
    right: 20px;
    height: 44px;
    background: rgba(0, 0, 0, 0.85);
    padding: 0 15px;
    border-radius: 8px;
    border: 2px solid DodgerBlue;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-box strong {
    color: orange;
}

/* Flashing red for unknown location */
.location-unknown-flash {
    color: #ff3333 !important;
    animation: location-flash 1s ease-in-out infinite;
}

@keyframes location-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.location-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid DodgerBlue;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-family: var(--font-main);
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.location-tooltip.unknown {
    color: Tomato;
}

.location-tooltip.discovered {
    color: MediumSpringGreen;
}

.location-tooltip.visible {
    opacity: 1;
}

/* =========================================
   Persistent Menu (future use)
   ========================================= */
.persistent-menu {
    position: fixed;
    top: 74px;
    right: 20px;
    z-index: 998;
    display: flex;
    gap: 10px;
}

.menu-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 12px;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: rgba(30, 144, 255, 0.4);
}

/* Menu icon buttons */
.menu-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.menu-icon-btn:hover {
    background: rgba(30, 144, 255, 0.4);
    transform: scale(1.05);
}

.menu-icon-btn:active {
    transform: scale(0.95);
}

.menu-icon-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-icon-btn.disabled:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: none;
}

.menu-icon {
    font-size: 20px;
    line-height: 1;
}

.persistent-menu.hidden {
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   Onboarding System
   ========================================= */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    pointer-events: auto;
}

/* Rainbow glow highlight for menu buttons during onboarding */
.menu-icon-btn.onboarding-highlight {
    z-index: 1000;
    pointer-events: auto;
    animation: onboarding-rainbow-glow 2s linear infinite, onboarding-pulse 1s ease-in-out infinite;
}

/* Location box blocked during onboarding */
.location-box.onboarding-blocked {
    z-index: 998;
    pointer-events: none;
}

@keyframes onboarding-rainbow-glow {
    0% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.5), 0 0 30px rgba(255, 0, 0, 0.3);
        border-color: rgb(255, 0, 0);
    }
    16.67% {
        box-shadow: 0 0 10px rgba(255, 165, 0, 0.8), 0 0 20px rgba(255, 165, 0, 0.5), 0 0 30px rgba(255, 165, 0, 0.3);
        border-color: rgb(255, 165, 0);
    }
    33.33% {
        box-shadow: 0 0 10px rgba(255, 255, 0, 0.8), 0 0 20px rgba(255, 255, 0, 0.5), 0 0 30px rgba(255, 255, 0, 0.3);
        border-color: rgb(255, 255, 0);
    }
    50% {
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.8), 0 0 20px rgba(0, 255, 0, 0.5), 0 0 30px rgba(0, 255, 0, 0.3);
        border-color: rgb(0, 255, 0);
    }
    66.67% {
        box-shadow: 0 0 10px rgba(0, 150, 255, 0.8), 0 0 20px rgba(0, 150, 255, 0.5), 0 0 30px rgba(0, 150, 255, 0.3);
        border-color: rgb(0, 150, 255);
    }
    83.33% {
        box-shadow: 0 0 10px rgba(180, 0, 255, 0.8), 0 0 20px rgba(180, 0, 255, 0.5), 0 0 30px rgba(180, 0, 255, 0.3);
        border-color: rgb(180, 0, 255);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.8), 0 0 20px rgba(255, 0, 0, 0.5), 0 0 30px rgba(255, 0, 0, 0.3);
        border-color: rgb(255, 0, 0);
    }
}

@keyframes onboarding-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* Back button for sub-scenes */
.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 14px;
    z-index: 100;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(30, 144, 255, 0.4);
}

/* =========================================
   Dialogue History Panel
   ========================================= */
.dialogue-history-panel {
    position: fixed;
    top: 128px; /* Below location box (20px + 44px) + menu buttons (10px gap + 44px) + 10px gap */
    right: 20px;
    width: 300px;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    z-index: 999;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dialogue-history-panel.open {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.dialogue-history-panel.large {
    width: 400px;
}

.dialogue-history-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(30, 144, 255, 0.5);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: bold;
    color: orange;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.dialogue-history-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dialogue-history-close:hover {
    color: white;
    background: rgba(255, 100, 100, 0.3);
}

.dialogue-history-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 10px;
}

.dialogue-history-spacer {
    flex: 1 1 auto;
    min-height: 0;
}

/* Custom scrollbar for dialogue history */
.dialogue-history-content::-webkit-scrollbar {
    width: 8px;
}

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

.dialogue-history-content::-webkit-scrollbar-thumb {
    background: DodgerBlue;
    border-radius: 4px;
}

.dialogue-history-content::-webkit-scrollbar-thumb:hover {
    background: #4a90e2;
}

/* Firefox scrollbar */
.dialogue-history-content {
    scrollbar-width: thin;
    scrollbar-color: DodgerBlue rgba(0, 0, 0, 0.3);
}

.dialogue-history-entry {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    flex-shrink: 0;
}

.dialogue-history-portrait-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
}

.dialogue-history-portrait {
    width: 40px;
    height: 40px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(30, 144, 255, 0.5);
}

.dialogue-history-timestamp {
    font-size: 11px;
    color: #666;
    margin-top: 3px;
    text-align: center;
    width: 40px;
}

.dialogue-history-portrait.no-portrait {
    background-color: rgba(30, 144, 255, 0.2);
    border-style: dashed;
}

.dialogue-history-text {
    flex: 1;
    font-family: var(--font-main);
    font-size: 12px;
    line-height: 1.4;
    color: white;
    min-width: 0; /* Allow text to wrap */
    word-wrap: break-word;
}

.dialogue-history-speaker {
    display: inline;
}

.dialogue-history-message {
    display: inline;
}

/* =========================================
   Help Modal
   ========================================= */
.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.help-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.help-modal {
    width: 740px;
    max-width: 90%;
    height: 80%;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid DodgerBlue;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.help-modal-overlay.open .help-modal {
    transform: scale(1);
}

.help-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(30, 144, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.help-modal-title {
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: bold;
    color: orange;
    text-align: center;
}

.help-modal-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.help-modal-close:hover {
    color: white;
    background: rgba(255, 100, 100, 0.3);
}

/* Help modal tabs */
.help-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0 20px;
    border-bottom: 1px solid rgba(30, 144, 255, 0.3);
    flex-shrink: 0;
}

.help-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: DodgerBlue;
    font-family: var(--font-main);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.help-tab-btn:hover {
    color: orange;
    background: rgba(30, 144, 255, 0.1);
}

.help-tab-btn.active {
    color: orange;
    border-bottom-color: orange;
}

.help-tab-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.help-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-family: var(--font-main);
    font-size: 14px;
    color: white;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for help modal */
.help-modal-content::-webkit-scrollbar {
    width: 8px;
}

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

.help-modal-content::-webkit-scrollbar-thumb {
    background: DodgerBlue;
    border-radius: 4px;
}

.help-modal-content::-webkit-scrollbar-thumb:hover {
    background: #4a90e2;
}

/* Firefox scrollbar */
.help-modal-content {
    scrollbar-width: thin;
    scrollbar-color: DodgerBlue rgba(0, 0, 0, 0.3);
}

/* Help content sections */
.help-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-section.no-border {
    border-bottom: none;
    padding-bottom: 0;
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h2 {
    color: DodgerBlue;
    font-size: 18px;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.help-section h3 {
    color: orange;
    font-size: 14px;
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.help-section p {
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.9);
}

.help-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.help-section li {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.85);
}

.help-subsection {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.help-key {
    display: inline-block;
    background: rgba(30, 144, 255, 0.2);
    border: 1px solid rgba(30, 144, 255, 0.4);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: var(--font-main);
    font-size: 12px;
    color: #87ceeb;
}

.help-note {
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid orange;
    padding: 8px 12px;
    margin: 12px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.help-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    padding-top: 20px;
    margin-top: auto;
    border-bottom: none;
}

.help-footer p {
    color: rgba(255, 255, 255, 0.5);
}

.help-astronaut {
    display: block;
    width: 300px;
    height: auto;
    margin: 20px auto;
}

.help-link {
    color: DodgerBlue;
    text-decoration: none;
    transition: color 0.2s ease;
}

.help-link:hover {
    color: orange;
    text-decoration: underline;
}

/* =========================================
   Settings Modal
   ========================================= */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.settings-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.settings-modal {
    width: 740px;
    max-width: 90%;
    height: 80%;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid DodgerBlue;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.settings-modal-overlay.open .settings-modal {
    transform: scale(1);
}

.settings-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(30, 144, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.settings-modal-title {
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: bold;
    color: orange;
    text-align: center;
}

.settings-modal-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.settings-modal-close:hover {
    color: white;
    background: rgba(255, 100, 100, 0.3);
}

.settings-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-family: var(--font-main);
    font-size: 14px;
    color: white;
    line-height: 1.6;
}

/* Custom scrollbar for settings modal */
.settings-modal-content::-webkit-scrollbar {
    width: 8px;
}

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

.settings-modal-content::-webkit-scrollbar-thumb {
    background: DodgerBlue;
    border-radius: 4px;
}

.settings-modal-content::-webkit-scrollbar-thumb:hover {
    background: #4a90e2;
}

/* Firefox scrollbar */
.settings-modal-content {
    scrollbar-width: thin;
    scrollbar-color: DodgerBlue rgba(0, 0, 0, 0.3);
}

/* Settings Form Elements */
.settings-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(30, 144, 255, 0.2);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-size: 14px;
    color: white;
}

.settings-control {
    display: flex;
    align-items: center;
}

.settings-description {
    width: 100%;
    background: rgba(255, 165, 0, 0.1);
    border-left: 3px solid orange;
    padding: 8px 12px;
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* Custom Checkbox */
.settings-checkbox {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.settings-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: rgba(30, 144, 255, 0.2);
    border: 2px solid DodgerBlue;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.settings-checkbox:hover .settings-checkmark {
    background: rgba(30, 144, 255, 0.3);
}

.settings-checkbox input:checked ~ .settings-checkmark {
    background: DodgerBlue;
}

.settings-checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.settings-checkbox input:checked ~ .settings-checkmark::after {
    display: block;
}

/* Custom Radio Buttons */
.settings-radio-group {
    display: flex;
    gap: 20px;
}

.settings-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.settings-radio input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.settings-radiomark {
    width: 20px;
    height: 20px;
    background: rgba(30, 144, 255, 0.2);
    border: 2px solid DodgerBlue;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}

.settings-radio:hover .settings-radiomark {
    background: rgba(30, 144, 255, 0.3);
}

.settings-radiomark::after {
    content: '';
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.settings-radio input:checked ~ .settings-radiomark {
    background: DodgerBlue;
}

.settings-radio input:checked ~ .settings-radiomark::after {
    display: block;
}

.settings-radio-label {
    font-size: 13px;
    color: #aaa;
}

.settings-radio input:checked ~ .settings-radio-label {
    color: white;
}

/* Font preview labels - show each font in its own style */
.settings-radio-label.font-preview-inconsolata {
    font-family: 'Inconsolata', monospace !important;
}

.settings-radio-label.font-preview-pixelify {
    font-family: 'Pixelify Sans', cursive !important;
}

.settings-radio-label.font-preview-spacemono {
    font-family: 'Space Mono', monospace !important;
}

.settings-radio-label.font-preview-jersey10 {
    font-family: 'Jersey 10', cursive !important;
}

.settings-radio-label.font-preview-tiny5 {
    font-family: 'Tiny5', cursive !important;
}

/* Font size adjustments */
body.font-size-small .persistent-menu-btn {
    font-size: 14px;
}
body.font-size-large .persistent-menu-btn {
    font-size: 18px;
}

body.font-size-small .dialogue-content p {
    font-size: 14px;
    line-height: 2.04;
}
body.font-size-large .dialogue-content p {
    font-size: 18px;
    line-height: 1.27;
}

/* Jersey 10 font sizes */
body.font-jersey10.font-size-small .dialogue-content p {
    font-size: 16px;
    line-height: 2.38;
}
body.font-jersey10 .dialogue-content p {
    font-size: 18px;
    line-height: 2.12;
}
body.font-jersey10.font-size-large .dialogue-content p {
    font-size: 20px;
    line-height: 1.9;
}

/* Tiny 5 font sizes */
body.font-tiny5.font-size-small .dialogue-content p {
    font-size: 14px;
    line-height: 2.72;
}
body.font-tiny5 .dialogue-content p {
    font-size: 16px;
    line-height: 2.38;
}
body.font-tiny5.font-size-large .dialogue-content p {
    font-size: 18px;
    line-height: 2.12;
}

/* Pixelify font sizes */
body.font-pixelify.font-size-small .dialogue-content p {
    font-size: 16px;
    line-height: 1.78;
}
body.font-pixelify .dialogue-content p {
    font-size: 18px;
    line-height: 1.59;
}
body.font-pixelify.font-size-large .dialogue-content p {
    font-size: 20px;
    line-height: 1.43;
}

/* Inconsolata font sizes */
body.font-inconsolata.font-size-small .dialogue-content p {
    font-size: 14px;
    line-height: 2.72;
}
body.font-inconsolata .dialogue-content p {
    font-size: 18px;
    line-height: 1.78;
}
body.font-inconsolata.font-size-large .dialogue-content p {
    font-size: 18px;
    line-height: 1.59;
}

body.font-size-small .location-box {
    font-size: 10px;
}
body.font-size-large .location-box {
    font-size: 14px;
}

body.font-size-small .dialogue-history-message {
    font-size: 10px;
}
body.font-size-large .dialogue-history-message {
    font-size: 14px;
}

body.font-size-small .settings-modal {
    font-size: 12px;
}
body.font-size-large .settings-modal {
    font-size: 16px;
}

body.font-size-small .settings-label {
    font-size: 12px;
}
body.font-size-large .settings-label {
    font-size: 16px;
}

body.font-size-small .settings-radio-label {
    font-size: 11px;
}
body.font-size-large .settings-radio-label {
    font-size: 15px;
}

body.font-size-small .settings-btn {
    font-size: 12px;
}
body.font-size-large .settings-btn {
    font-size: 16px;
}

/* Help modal font sizes */
body.font-size-small .help-modal-content {
    font-size: 12px;
}
body.font-size-large .help-modal-content {
    font-size: 16px;
}
body.font-size-small .help-section h2 {
    font-size: 16px;
}
body.font-size-large .help-section h2 {
    font-size: 20px;
}
body.font-size-small .help-section h3 {
    font-size: 13px;
}
body.font-size-large .help-section h3 {
    font-size: 17px;
}

/* Settings Buttons Row (outside modal) */
.settings-buttons-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.settings-btn {
    padding: 10px 30px;
    border: 2px solid #ff3c3c;
    border-radius: 6px;
    background: rgba(255, 60, 60, 0.2);
    color: #ff6b6b;
    font-family: var(--font-main);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-btn:hover {
    background: rgba(255, 60, 60, 0.4);
    color: white;
}

.settings-btn.primary {
    background: rgba(0, 250, 154, 0.3);
    border-color: MediumSpringGreen;
    color: #98ffcc;
}

.settings-btn.primary:hover {
    background: rgba(0, 250, 154, 0.5);
    color: white;
}

.settings-action-btn {
    padding: 6px 16px;
    border: 2px solid MediumSpringGreen;
    border-radius: 6px;
    background: rgba(0, 250, 154, 0.2);
    color: #98ffcc;
    font-family: var(--font-main);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-action-btn:hover {
    background: rgba(0, 250, 154, 0.4);
    color: white;
}

/* =========================================
   Confirmation Prompt (used by Settings)
   ========================================= */
.confirm-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.confirm-prompt-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.confirm-prompt {
    background: rgba(0, 0, 0, 0.98);
    border: 2px solid orange;
    border-radius: 12px;
    padding: 25px 30px;
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

.confirm-prompt-overlay.open .confirm-prompt {
    transform: scale(1);
}

.confirm-prompt-message {
    font-family: var(--font-main);
    font-size: 16px;
    color: white;
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-prompt-btn {
    padding: 10px 25px;
    border: 2px solid #ff3c3c;
    border-radius: 6px;
    background: rgba(255, 60, 60, 0.2);
    color: #ff6b6b;
    font-family: var(--font-main);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-prompt-btn:hover {
    background: rgba(255, 60, 60, 0.4);
    color: white;
}

.confirm-prompt-btn.primary {
    background: rgba(0, 250, 154, 0.3);
    border-color: MediumSpringGreen;
    color: #98ffcc;
}

.confirm-prompt-btn.primary:hover {
    background: rgba(0, 250, 154, 0.5);
    color: white;
}

/* Reset confirmation prompt - Dodger Blue border */
.reset-confirm-prompt {
    border-color: DodgerBlue;
}

/* Settings unsaved changes confirmation prompt - Dodger Blue border */
.settings-confirm-prompt {
    border-color: DodgerBlue;
}

/* =========================================
   Copyright
   ========================================= */
.copyright {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-main);
}

.copyright a {
    color: DodgerBlue;
    text-decoration: none;
    transition: color 0.2s ease;
}

.copyright a:hover {
    color: orange;
    text-decoration: underline;
}

/* =========================================
   Fauxrth Scene
   ========================================= */
.fauxrth-scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* =========================================
   Nebula Scene
   ========================================= */
.nebula-scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.nebula-scene-container canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
}

/* Nebula Controls UI - matches site theme */
.nebula-controls {
    --panel-color-r: 30;
    --panel-color-g: 144;
    --panel-color-b: 255;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid DodgerBlue;
    box-shadow: 0 0 15px rgba(30, 144, 255, 0.3);
    border-radius: 8px;
    font-family: var(--font-main);
    max-width: calc(100vw - 40px);
}

.nebula-controls-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.nebula-controls-title {
    color: rgb(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b));
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nebula-controls-toggle {
    position: absolute;
    right: 16px;
    color: rgb(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b));
    font-size: 14px;
    transition: transform 0.3s ease;
}

.nebula-controls.collapsed .nebula-controls-toggle {
    transform: rotate(180deg);
}

.nebula-controls-content {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding: 0 16px 12px 16px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    max-height: 200px;
    opacity: 1;
}

.nebula-controls.collapsed .nebula-controls-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Group containers for flex ordering */
.nebula-controls-group-toggles {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
    order: 1;
}

.nebula-controls-group-sliders {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-shrink: 0;
    order: 2;
}

.nebula-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nebula-control-label {
    color: orange;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nebula-select {
    background: rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.2);
    border: 2px solid rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.6);
    color: white;
    border-radius: 4px;
    padding: 6px 12px;
    font-family: var(--font-main);
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.nebula-select:hover {
    background: rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.35);
}

.nebula-select:focus {
    box-shadow: 0 0 0 2px rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.5);
}

.nebula-select option {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

.nebula-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.3);
    outline: none;
    cursor: pointer;
}

.nebula-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgb(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b));
    cursor: pointer;
    border: 2px solid white;
    transition: all 0.2s ease;
}

.nebula-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.7);
}

.nebula-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgb(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b));
    cursor: pointer;
    border: 2px solid white;
    transition: all 0.2s ease;
}

.nebula-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.7);
}

/* Movable spaceship in nebula scene */
.nebula-spaceship {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('../images/spaceship.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 50;
    pointer-events: none;
}

/* Nebula checkbox styling */
.nebula-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nebula-checkbox {
    display: none;
}

.nebula-checkmark {
    width: 18px;
    height: 18px;
    background: rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.2);
    border: 2px solid rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.8);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nebula-checkbox:checked + .nebula-checkmark {
    background: rgb(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b));
}

.nebula-checkmark::after {
    content: '';
    display: none;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.nebula-checkbox:checked + .nebula-checkmark::after {
    display: block;
}

.nebula-checkbox-wrapper:hover .nebula-checkmark {
    background: rgba(var(--panel-color-r), var(--panel-color-g), var(--panel-color-b), 0.3);
}

.nebula-checkbox-wrapper .nebula-control-label {
    margin: 0;
}

/* Trail container */
.nebula-trail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 45;
}

/* Trail particles */
.nebula-trail-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(100, 150, 255, 0.8) 0%, rgba(100, 150, 255, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    pointer-events: none;
}

/* Responsive adjustments for nebula controls */
@media (max-width: 768px), (orientation: portrait) {
    .nebula-controls {
        left: 20px;
        transform: none;
        max-width: 220px;
    }
    
    .nebula-controls-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .nebula-controls-group-toggles,
    .nebula-controls-group-sliders {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
    }
    
    .nebula-control-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .nebula-slider {
        width: 80px;
    }
    
    .nebula-select {
        width: 100px;
    }
}

/* =========================================
   Sol Scene
   ========================================= */
.sol-scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1e 50%, #000 100%);
    overflow: hidden;
}

.sol-scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 800px 600px at 20% 30%, rgba(255, 100, 50, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 600px 400px at 80% 70%, rgba(255, 150, 50, 0.05) 0%, transparent 50%);
}

.sol-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-image: url('../images/sol.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
}

/* Sol large glow effect - container for waves */
.sol-large-glow-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9;
}

.sol-large-glow-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: radial-gradient(
        circle at center,
        rgba(255, 180, 80, 0.4) 0%,
        rgba(255, 140, 50, 0.3) 20%,
        rgba(255, 100, 30, 0.15) 40%,
        rgba(255, 60, 10, 0.05) 70%,
        transparent 100%
    );
    animation: sol-radiate 3s ease-out infinite;
    opacity: 0;
}

.sol-large-glow-wave:nth-child(2) {
    animation-delay: 1s;
}

.sol-large-glow-wave:nth-child(3) {
    animation-delay: 2s;
}

/* Sol Credits Panel */
.sol-credits-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    padding: 15px 20px;
    z-index: 20;
    min-width: 180px;
}

.sol-credits-section {
    margin-bottom: 12px;
}

.sol-credits-section:last-child {
    margin-bottom: 0;
}

.sol-credits-heading {
    color: orange;
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sol-credits-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sol-credits-list li {
    color: white;
    font-size: 13px;
    padding: 2px 0;
    padding-left: 12px;
    position: relative;
}

.sol-credits-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: DodgerBlue;
}

/* =========================================
   Black Hole Scene
   ========================================= */
.blackhole-scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a0a15 0%, #050510 50%, #000 100%);
}

.blackhole-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, 
        #000 0%, 
        #000 30%, 
        rgba(100, 0, 150, 0.3) 50%, 
        rgba(200, 100, 255, 0.2) 70%, 
        transparent 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 60px rgba(150, 50, 200, 0.5),
        0 0 120px rgba(100, 0, 150, 0.3),
        inset 0 0 60px rgba(0, 0, 0, 1);
    animation: blackhole-pulse 4s infinite ease-in-out;
    z-index: 10;
}

/* Solid black core to prevent stars from showing through */
.blackhole-center::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    height: 55%;
    background: #000;
    border-radius: 50%;
    z-index: 1;
}

.accretion-disk {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(255, 150, 50, 0.8),
        rgba(255, 200, 100, 0.6),
        rgba(255, 100, 50, 0.8),
        rgba(200, 50, 100, 0.6),
        rgba(255, 150, 50, 0.8)
    );
    animation: accretion-spin 20s infinite linear;
    opacity: 0.7;
}

@keyframes blackhole-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes accretion-spin {
    from { transform: translate(-50%, -50%) rotateX(75deg) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotateX(75deg) rotate(360deg); }
}

/* Gravity ship for orbital physics */
.blackhole-scene-container .gravity-ship {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('../images/spaceship.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
    pointer-events: none;
    transform-origin: center center;
}

/* Trail particles */
.blackhole-scene-container .trail-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9;
}

/* Fade overlay for absorption effect */
.blackhole-scene-container .blackhole-fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

/* Black Hole Stats Panel */
.blackhole-stats {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
    font-family: var(--font-main);
    font-size: 11px;
    z-index: 100;
    min-width: 220px;
}

.blackhole-stats .stats-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 6px;
}

.blackhole-stats .stats-row:last-child {
    margin-bottom: 0;
}

.blackhole-stats .stats-label {
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.blackhole-stats .stats-value {
    color: #bb86fc;
    font-weight: bold;
    margin-left: auto;
    min-width: 50px;
    text-align: right;
}

.blackhole-stats .stats-unit {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    min-width: 24px;
}

/* Warning state when past point of no return */
.blackhole-stats.warning {
    border-color: rgba(255, 100, 100, 0.8);
    box-shadow: 0 0 15px rgba(255, 50, 50, 0.4);
}

.blackhole-stats.warning .stats-value {
    color: #ff6b6b;
}

/* =========================================
   Black Hole Inside Scene
   ========================================= */
.blackhole-inside-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.void-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
}

/* White background layer - revealed by spotlight */
.white-background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

.white-background-layer.active {
    opacity: 1;
}

/* Spotlight mask - creates circular reveal */
.spotlight-mask {
    --spotlight-x: 50%;
    --spotlight-y: 50%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle 180px at var(--spotlight-x) var(--spotlight-y),
        transparent 0%,
        transparent 20%,
        rgba(0, 0, 0, 0.05) 30%,
        rgba(0, 0, 0, 0.15) 40%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.7) 70%,
        rgba(0, 0, 0, 0.85) 80%,
        rgba(0, 0, 0, 0.95) 90%,
        #000 100%
    );
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.spotlight-mask.active {
    opacity: 1;
}

/* Hidden objects base styling */
.hidden-object {
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

/* Dark layer (shown when discovered at 25% opacity, always visible) */
.hidden-object-dark {
    z-index: 52;
}

.hidden-object-dark.revealed {
    opacity: 0.25;
    pointer-events: auto;
    cursor: pointer;
}

/* Spotlight reveal layer (full brightness, masked by spotlight position) */
.hidden-object-spotlight {
    --spotlight-x: 50%;
    --spotlight-y: 50%;
    z-index: 53;
    -webkit-mask-image: radial-gradient(
        circle 180px at var(--spotlight-x) var(--spotlight-y),
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 20%,
        rgba(0, 0, 0, 0.95) 30%,
        rgba(0, 0, 0, 0.85) 40%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.15) 80%,
        rgba(0, 0, 0, 0.05) 90%,
        rgba(0, 0, 0, 0) 100%
    );
    mask-image: radial-gradient(
        circle 180px at var(--spotlight-x) var(--spotlight-y),
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 20%,
        rgba(0, 0, 0, 0.95) 30%,
        rgba(0, 0, 0, 0.85) 40%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.15) 80%,
        rgba(0, 0, 0, 0.05) 90%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none; /* Click through to dark layer */
}

.hidden-object-spotlight.revealed {
    opacity: 1;
}

/* Rift object */
#rift,
#rift-spotlight {
    width: 200px;
    height: 200px;
    background-image: url('../images/unstable-rift.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Obelisk object */
#obelisk,
#obelisk-spotlight {
    width: 150px;
    height: 150px;
    background-image: url('../images/obelisk.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Void spaceship */
.void-spaceship {
    position: absolute;
    width: 60px;
    height: 60px;
    background-image: url('../images/spaceship.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 100;
    transform-origin: center;
}

/* Shrinking animation for spaceship */
.void-spaceship.shrinking {
    animation: void-ship-shrink 5s ease-in forwards;
}

@keyframes void-ship-shrink {
    0% {
        transform: rotate(var(--rotation, 0deg)) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(calc(var(--rotation, 0deg) + var(--spin-amount, 1800deg))) scale(0);
        opacity: 0;
    }
}

/* Exit overlay */
.exit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}

/* Screen shake animations */
.blackhole-inside-container.shake-light {
    animation: shake-light 0.1s infinite;
}

.blackhole-inside-container.shake-medium {
    animation: shake-medium 0.1s infinite;
}

.blackhole-inside-container.shake-heavy {
    animation: shake-heavy 0.1s infinite;
}

@keyframes shake-light {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, 2px); }
}

@keyframes shake-medium {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-5px, 3px); }
    50% { transform: translate(5px, -3px); }
    75% { transform: translate(-3px, 5px); }
}

@keyframes shake-heavy {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-10px, 6px); }
    50% { transform: translate(10px, -6px); }
    75% { transform: translate(-6px, 10px); }
}

/* Action button in void scene */
.void-action-button {
    position: absolute;
    padding: 10px 20px;
    background: rgba(0, 250, 154, 0.8);
    border: 2px solid MediumSpringGreen;
    border-radius: 8px;
    color: white;
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    pointer-events: none;
}

.void-action-button.visible {
    opacity: 1;
    pointer-events: auto;
}

.void-action-button:hover {
    background: rgba(0, 250, 154, 1);
}

/* =========================================
   Satellite Scene
   ========================================= */
.satellite-scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1e 50%, #000 100%);
    overflow: hidden;
}

.satellite-scene-container #ship-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

.satellite-scene-container #tether-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15;
    pointer-events: none;
}

/* =========================================
   Recent Updates Box (Satellite Scene)
   ========================================= */
.updates-box {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 500px;
    max-height: 300px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.4);
}

.updates-header {
    padding: 10px 15px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: bold;
    color: orange;
}

.updates-header-text {
    animation: orange-pulse-glow 2s ease-in-out infinite;
}

@keyframes orange-pulse-glow {
    0%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 10px rgba(255, 165, 0, 0.8),
            0 0 20px rgba(255, 165, 0, 0.6),
            0 0 30px rgba(255, 165, 0, 0.4),
            0 0 40px rgba(255, 165, 0, 0.2);
    }
    50% {
        opacity: 0.6;
        text-shadow: 
            0 0 5px rgba(255, 165, 0, 0.4),
            0 0 10px rgba(255, 165, 0, 0.2);
    }
}

.updates-content {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 250px;
}

.update-entry {
    font-family: var(--font-main);
    font-size: 12px;
    color: white;
    line-height: 1.4;
}

.update-date {
    color: #ff6666;
}

/* =========================================
   Contact Icons (Satellite Scene)
   ========================================= */
.contacts-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.contact-icon {
    position: absolute;
    width: calc(round(min(100vw, 100vh) * 0.05, 1px));
    height: calc(round(min(100vw, 100vh) * 0.05, 1px));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    pointer-events: auto;
    animation: return-rainbow-glow 4s linear infinite;
}

.contact-icon:hover {
    animation: contact-icon-pulse-white 2s ease-in-out infinite;
}

@keyframes contact-icon-pulse-white {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
                drop-shadow(0 0 16px rgba(255, 255, 255, 0.6))
                drop-shadow(0 0 24px rgba(255, 255, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5))
                drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }
}

.contact-icon:active {
    transform: scale(0.95);
}

.contact-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contact-icon .emoji {
    font-size: calc(round(min(100vw, 100vh) * 0.04, 1px));
    line-height: 1;
}

/* Social Handles Container (Satellite Scene) */
.satellite-scene-container .handles-container {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    padding: 16px;
}

.satellite-scene-container .handles-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.satellite-scene-container .handle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.satellite-scene-container .handle-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.satellite-scene-container .handle-icon.emoji {
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.satellite-scene-container .handle-text {
    font-family: var(--font-main);
    font-size: 14px;
    color: white;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.satellite-scene-container .handle-clipboard {
    position: relative;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.satellite-scene-container .handle-clipboard img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.satellite-scene-container .handle-clipboard .clipboard-base {
    opacity: 1;
}

.satellite-scene-container .handle-clipboard .clipboard-hover {
    opacity: 0;
}

.satellite-scene-container .handle-clipboard:hover {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7))
            drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
}

.satellite-scene-container .handle-clipboard:hover .clipboard-base {
    opacity: 0;
}

.satellite-scene-container .handle-clipboard:hover .clipboard-hover {
    opacity: 1;
}

.satellite-scene-container .handle-clipboard:active {
    transform: scale(0.9);
}

/* Tautness Meter - inside handles container */
.satellite-scene-container .tautness-meter {
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(30, 144, 255, 0.3);
}

.satellite-scene-container .tautness-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.satellite-scene-container .tautness-label-slack,
.satellite-scene-container .tautness-label-taut {
    font-family: var(--font-main);
    font-size: 10px;
    color: rgba(180, 200, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.satellite-scene-container .tautness-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(30, 144, 255, 0.5);
    overflow: hidden;
}

.satellite-scene-container .tautness-fill {
    height: 100%;
    width: 0%;
    background: hsla(210, 50%, 60%, 0.8);
    border-radius: 3px;
    transition: width 0.1s ease-out, background 0.3s ease;
}

.satellite-scene-container .tautness-percent {
    text-align: center;
    font-family: var(--font-main);
    font-size: 11px;
    color: rgba(180, 200, 255, 0.7);
    margin-top: 6px;
}

/* Toast notification for clipboard copy */
.copy-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid DodgerBlue;
    border-radius: 8px;
    padding: 10px 20px;
    font-family: var(--font-main);
    font-size: 14px;
    color: white;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

/* =========================================
   Keyframe Animations
   ========================================= */
@keyframes nebula-drift-1 {
    0% { transform: rotate(0deg) translateX(20px); }
    100% { transform: rotate(360deg) translateX(20px); }
}

@keyframes nebula-drift-2 {
    0% { transform: rotate(0deg) translateX(-15px); }
    100% { transform: rotate(-360deg) translateX(-15px); }
}

@keyframes twinkle-subtle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes twinkle-bright {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    25% { opacity: 1; transform: scale(1.2); }
    75% { opacity: 0.9; transform: scale(1.1); }
}

@keyframes comet-fly-dynamic {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* =========================================
   Mobile Blocker
   ========================================= */
.mobile-blocker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1e 50%, #000 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-blocker-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.mobile-blocker-content {
    text-align: center;
    padding: 40px;
    max-width: 90%;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.mobile-blocker-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

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

.mobile-blocker-title {
    font-family: var(--font-main);
    font-size: 28px;
    color: DodgerBlue;
    margin: 0 0 15px 0;
}

.mobile-blocker-message {
    font-family: var(--font-main);
    font-size: 16px;
    color: #ccc;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.mobile-blocker-specs {
    font-family: var(--font-main);
    font-size: 12px;
    color: #666;
    margin-bottom: 24px;
}

.mobile-blocker-contact-link {
    display: inline-block;
    font-family: var(--font-main);
    font-size: 14px;
    color: DodgerBlue;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid DodgerBlue;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mobile-blocker-contact-link:hover {
    background: DodgerBlue;
    color: white;
}

/* =========================================
   Responsive Design Foundation
   ========================================= */

/* Resolution-specific adjustments */
body.resolution-720p {
    /* Adjustments for 720p screens */
}

body.resolution-1080p {
    /* Default - no adjustments needed */
}

body.resolution-1440p {
    /* Adjustments for 1440p screens */
}

body.resolution-4k {
    /* Adjustments for 4k screens */
}

/* Device-specific styles (for future mobile CSS) */
body.device-mobile {
    /* Mobile-specific styles will go here */
}

body.device-tablet {
    /* Tablet-specific styles will go here */
}

body.device-desktop {
    /* Desktop-specific styles (default) */
}

/* Touch vs non-touch adjustments */
body.has-touch {
    /* Touch-friendly adjustments */
}

body.no-touch {
    /* Mouse/pointer-specific styles */
}

/* Orientation-specific styles */
body.orientation-portrait {
    /* Portrait mode adjustments */
}

body.orientation-landscape {
    /* Landscape mode (default) */
}

/* =========================================
   Travel Lock - Disable interactions during navigation
   ========================================= */
body.is-traveling .space-station,
body.is-traveling .satellite,
body.is-traveling .nebula,
body.is-traveling .planet,
body.is-traveling .black-hole,
body.is-traveling .space-object {
    pointer-events: none;
    cursor: default;
}

body.is-traveling .dialogue-actions {
    pointer-events: none;
    opacity: 0.5;
}

body.is-traveling .location-tooltip {
    display: none;
}
