/* ============================================
   MAGNA GATEWAY — Piri Reis Map Landing
   The 1513 map fades from darkness, compass rose
   becomes the portal to the 3D Convergence Globe.
   ============================================ */

/* ============================================
   PIRI REIS LANDING OVERLAY
   ============================================ */
.piri-reis-landing {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transition: opacity 1.5s ease-out;
    isolation: isolate;
}

.piri-reis-landing.visible {
    opacity: 1;
}

/* Warm ambient glow behind the map */
.piri-reis-landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 43% 28%, rgba(212, 175, 55, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(180, 140, 60, 0.05) 0%, transparent 60%);
    z-index: 0;
    opacity: 0;
    transition: opacity 2s ease-out 0.5s;
}

.piri-reis-landing.entrance-glow::before {
    opacity: 1;
}

/* ============================================
   TITLE — Above the map
   ============================================ */
.piri-reis-title {
    position: absolute;
    top: 5vh;
    left: 0;
    right: 0;
    z-index: 10;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0);
    text-align: center;
    transition: color 2s ease-out;
    text-shadow:
        0 0 40px rgba(0, 0, 0, 1),
        0 0 80px rgba(0, 0, 0, 0.6),
        0 2px 20px rgba(212, 175, 55, 0.15),
        0 0 60px rgba(212, 175, 55, 0.08);
}

.piri-reis-landing.show-title .piri-reis-title {
    color: rgba(212, 175, 55, 1);
}

/* ============================================
   GLOBE WRAPPER — Three.js sphere floating in space
   No box, no borders — fills the entire viewport
   ============================================ */
.piri-reis-globe-wrapper {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: visible;
    opacity: 0;
    transition: opacity 2.5s ease-out;
}

.piri-reis-landing.show-map .piri-reis-globe-wrapper {
    opacity: 1;
}

.piri-reis-globe-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Legacy flat image wrapper — hidden but kept for fallback */
.piri-reis-map-wrapper {
    display: none;
}

/* ============================================
   COMPASS HOTSPOT — Centered over the globe
   ============================================ */
.compass-hotspot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 130px;
    height: 130px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transition: opacity 1.5s ease-out;
    /* larger hit area on mobile */
    padding: 10px;
    margin: -10px;
}

.piri-reis-landing.show-compass .compass-hotspot {
    opacity: 1;
}

.compass-hotspot:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.8);
    outline-offset: 8px;
    border-radius: 50%;
}

/* Compass rose SVG — slow idle rotation */
.compass-rose-svg {
    width: 100%;
    height: 100%;
    animation: compassIdleRotate 90s linear infinite;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
}

@keyframes compassIdleRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pulsing golden glow ring */
.compass-glow {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.4);
    animation: compassPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes compassPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.2), inset 0 0 10px rgba(212, 175, 55, 0.1);
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.2);
        transform: scale(1.08);
        opacity: 1;
    }
}

/* "Enter" label below compass */
.compass-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.7);
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.compass-hotspot:hover .compass-label {
    color: rgba(212, 175, 55, 1);
}

.compass-hotspot:hover .compass-rose-svg {
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.7));
}

.compass-hotspot:hover .compass-glow {
    animation-duration: 1.5s;
}

/* ============================================
   TAGLINE — Below the map
   ============================================ */
.piri-reis-tagline {
    position: absolute;
    bottom: 6vh;
    left: 0;
    right: 0;
    z-index: 10;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    letter-spacing: 0.15em;
    color: rgba(212, 175, 55, 0);
    text-align: center;
    transition: color 2s ease-out;
    text-shadow:
        0 0 30px rgba(0, 0, 0, 1),
        0 0 50px rgba(0, 0, 0, 0.6),
        0 1px 15px rgba(212, 175, 55, 0.1);
}

.piri-reis-landing.show-tagline .piri-reis-tagline {
    color: rgba(212, 175, 55, 0.85);
}

/* ============================================
   SKIP BUTTON — Top-right corner
   ============================================ */
.piri-reis-skip {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
}

.piri-reis-skip:hover {
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   ACTIVATION SEQUENCE — Compass spin + map dissolve
   ============================================ */

/* Compass rapid spin */
.piri-reis-landing.activating .compass-rose-svg {
    animation: compassActivateSpin 2s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes compassActivateSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(1080deg); }
}

/* Compass glow expands */
.piri-reis-landing.activating .compass-glow {
    animation: compassGlowExpand 2s ease-out forwards;
}

@keyframes compassGlowExpand {
    0% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
        transform: scale(1);
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 80px rgba(212, 175, 55, 0.6);
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Globe dissolve — brightness flare + fade */
.piri-reis-landing.activating .piri-reis-globe-wrapper {
    transition: none;
    animation: globeDissolve 2.5s ease-out forwards;
}

@keyframes globeDissolve {
    0% {
        opacity: 1;
        filter: brightness(1);
    }
    60% {
        opacity: 0.7;
        filter: brightness(1.6);
    }
    100% {
        opacity: 0;
        filter: brightness(2.5);
    }
}

/* Title and tagline fade out */
.piri-reis-landing.activating .piri-reis-title,
.piri-reis-landing.activating .piri-reis-tagline {
    transition: color 1s ease-out;
    color: rgba(212, 175, 55, 0) !important;
}

.piri-reis-landing.activating .piri-reis-skip {
    transition: opacity 0.5s ease-out;
    opacity: 0;
    pointer-events: none;
}

/* Golden burst radial overlay */
.golden-burst {
    position: fixed;
    z-index: 999;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0.1) 30%, transparent 70%);
    pointer-events: none;
    width: 0;
    height: 0;
    opacity: 0;
}

.golden-burst.active {
    animation: goldenBurstExpand 2s ease-out forwards;
}

@keyframes goldenBurstExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    40% {
        opacity: 0.5;
    }
    100% {
        width: 300vmax;
        height: 300vmax;
        opacity: 0;
    }
}

/* Final overlay fade-out */
.piri-reis-landing.fade-out {
    transition: opacity 0.8s ease-out;
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   REMOVED STATE — After full transition
   ============================================ */
.piri-reis-landing.removed {
    display: none;
}

/* ============================================
   IRONWORK FRAME — Disabled (no borders)
   ============================================ */
.ironwork-frame {
    display: none !important;
}

/* ============================================
   HERO CONTENT — Minimal label, bottom-left
   ============================================ */
.magna-hero-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 600;
    text-align: left;
    padding: 0 0 2.5rem 2.5rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.5s ease-out 0.5s, transform 1.5s ease-out 0.5s;
    touch-action: auto;
}

.magna-hero-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-title-minimal {
    display: inline-block;
}

.hero-title-minimal .hero-label {
    font-family: 'Cinzel', serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.85);
}

.hero-title-minimal .hero-subtitle {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    letter-spacing: 0.1em;
    color: rgba(212, 175, 55, 0.5);
    margin-top: 0.3rem;
}

/* ============================================
   DUAL NAV — Read / Explore
   ============================================ */
.hero-dual-nav {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
    pointer-events: auto;
}

.hero-nav-group {
    position: relative;
}

.hero-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 1.1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(212, 175, 55, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    transition: color 0.15s ease-out, background 0.15s ease-out;
}

.hero-nav-btn svg {
    opacity: 0.6;
    transition: opacity 0.15s ease-out;
}

.hero-nav-btn:hover {
    color: rgba(212, 175, 55, 1);
    background: rgba(0, 0, 0, 0.55);
}

.hero-nav-btn:hover svg {
    opacity: 0.9;
}

/* Read dropdown */
.hero-nav-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: rgba(0, 0, 0, 0.88);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 5px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 0;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 6px, 0);
    transition: opacity 0.15s cubic-bezier(0.2, 0, 0, 1), transform 0.15s cubic-bezier(0.2, 0, 0, 1);
    will-change: opacity, transform;
}

.hero-nav-group:hover .hero-nav-dropdown,
.hero-nav-group:focus-within .hero-nav-dropdown,
.hero-nav-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
}

/* Hover bridge: keeps menu open while moving from button to dropdown */
.hero-nav-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    background: transparent;
}

.hero-nav-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: rgba(212, 175, 55, 0.7);
    transition: color 0.1s ease-out, background 0.1s ease-out;
}

.hero-nav-dropdown a:hover {
    color: rgba(212, 175, 55, 1);
    background: rgba(212, 175, 55, 0.08);
}

/* Bottom gradient behind hero content for readability */
.magna-hero-content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to top, rgba(5, 5, 10, 0.7) 0%, rgba(5, 5, 10, 0.3) 50%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================
   GLOBE HERO CONTAINER
   ============================================ */
#magna-globe-hero {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: #0a0a1a;
    pointer-events: none;
    transition: pointer-events 0s linear 0s;
}

/* Full-viewport globe on landing page */
.magna-landing #magna-globe-hero {
    inset: 0;
    width: 100%;
    height: 100%;
    background: #0a0a1a;
}

/* After landing completes, globe becomes interactive */
#magna-globe-hero.interactive {
    pointer-events: auto;
}

.magna-landing #magna-globe-hero.interactive {
    pointer-events: auto;
}

#magna-globe-hero #grid-globe-container {
    width: 100%;
    height: 100%;
    pointer-events: inherit;
}

/* ============================================
   SCROLL HINT (over globe)
   ============================================ */
.magna-scroll-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-out 0.5s;
    touch-action: auto;
}

.magna-scroll-hint.visible {
    opacity: 0.8;
}

.magna-scroll-hint svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ============================================
   BELOW-FOLD CONTENT
   ============================================ */
.magna-below-fold {
    position: relative;
    z-index: 400;
    margin-top: 100vh;
    background: var(--magna-papyrus, #f4ecd8);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (pointer: coarse) {
    #magna-globe-hero {
        pointer-events: auto;
        touch-action: pan-y;
    }

    #magna-globe-hero #grid-globe-container,
    #magna-globe-hero #grid-globe-container canvas {
        touch-action: pan-y;
    }

    .magna-landing #magna-globe-hero {
        inset: 0;
        width: 100%;
        height: 100%;
        transform: none;
    }

    /* Larger compass hotspot for touch */
    .compass-hotspot {
        width: 150px;
        height: 150px;
        padding: 20px;
        margin: -20px;
    }
}

@media (max-width: 768px) {
    .piri-reis-globe-wrapper {
        inset: 0;
    }

    .piri-reis-title {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
        letter-spacing: 0.3em;
        top: 3vh;
        padding: 0 1rem;
    }

    .piri-reis-tagline {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        bottom: 4vh;
        padding: 0 1.5rem;
    }

    .compass-hotspot {
        width: 110px;
        height: 110px;
    }

    .compass-label {
        font-size: 0.7rem;
    }

    .piri-reis-skip {
        top: 12px;
        right: 12px;
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .ironwork-top-bar,
    .ironwork-side-bar {
        display: none;
    }

    .magna-hero-content {
        padding: 0 0 1.5rem 1.5rem;
        opacity: 1;
        transform: none;
        pointer-events: none;
        touch-action: auto;
    }

    .hero-title-minimal .hero-label {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }

    .magna-scroll-hint {
        opacity: 0.5;
    }

    .hero-nav-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.65rem;
    }

    .hero-nav-dropdown {
        min-width: 160px;
    }

    .magna-hero-content::before {
        height: 140px;
        background: linear-gradient(to top, rgba(5, 5, 10, 0.7) 0%, transparent 100%);
    }

    .magna-landing #magna-globe-hero {
        inset: 0;
        width: 100%;
        height: 100%;
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-title-minimal .hero-label {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
    }

    .piri-reis-title {
        font-size: 1.1rem;
        letter-spacing: 0.25em;
        top: 2vh;
    }

    .piri-reis-globe-wrapper {
        inset: 0;
    }

    .compass-hotspot {
        width: 90px;
        height: 90px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .piri-reis-landing {
        opacity: 1;
        transition: none;
    }

    .piri-reis-landing::before {
        opacity: 1;
        transition: none;
    }

    .piri-reis-landing.show-title .piri-reis-title,
    .piri-reis-landing.show-tagline .piri-reis-tagline {
        transition: none;
    }

    .piri-reis-landing.show-map .piri-reis-globe-wrapper {
        opacity: 1;
        transition: none;
    }

    .compass-rose-svg {
        animation: none;
    }

    .compass-glow {
        animation: none;
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    }

    .piri-reis-landing.activating .compass-rose-svg,
    .piri-reis-landing.activating .compass-glow {
        animation: none;
    }

    .piri-reis-landing.activating .piri-reis-globe-wrapper {
        animation: none;
    }

    .golden-burst.active {
        animation: none;
    }

    .piri-reis-landing.fade-out {
        opacity: 0;
        transition: opacity 0.3s ease-out;
    }
}

/* ============================================
   GLOBE CONTROLS OVERLAY
   Floating panels over the convergence globe
   z-index 350: above globe (1), below below-fold (400)
   ============================================ */
#globe-controls-overlay {
    position: fixed;
    inset: 0;
    z-index: 350;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-out;
}

#globe-controls-overlay.visible {
    opacity: 1;
}

/* --- Layer Panel (top-right) --- */
#globe-controls {
    position: absolute;
    top: 80px;
    right: 20px;
    pointer-events: auto;
}

.globe-panel-toggle {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.globe-panel-toggle:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.04);
}

.globe-panel-toggle svg {
    opacity: 0.7;
    transition: transform 0.3s ease;
}

#globe-controls.expanded .globe-panel-toggle svg {
    transform: rotate(90deg);
}

.globe-panel-body {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 8px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
}

#globe-controls.expanded .globe-panel-body {
    max-height: 400px;
    opacity: 1;
    padding: 12px 16px;
}

.globe-panel-body label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s ease;
}

.globe-panel-body label:hover {
    color: rgba(255, 255, 255, 0.95);
}

.globe-panel-body input[type="checkbox"] {
    accent-color: rgba(212, 175, 55, 0.8);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.globe-layer-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* --- Focus Navigation (right side, vertical) --- */
#globe-focus-nav {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: auto;
}

#globe-focus-nav .focus-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(212, 175, 55, 0.3);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: right;
    white-space: nowrap;
}

#globe-focus-nav .focus-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(-3px);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

/* Color-coded left borders matching data layer colors */
#globe-focus-nav .focus-btn.giza-line {
    border-left-color: rgba(0, 255, 136, 0.6);
    color: rgba(0, 255, 136, 0.7);
}

#globe-focus-nav .focus-btn.giza-line:hover {
    border-left-color: #00ff88;
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

#globe-focus-nav .focus-btn[data-focus="giza"] {
    border-left-color: rgba(204, 153, 0, 0.6);
}
#globe-focus-nav .focus-btn[data-focus="giza"]:hover {
    border-left-color: #cc9900;
    color: #e6bf3a;
    box-shadow: 0 0 20px rgba(204, 153, 0, 0.15);
}

#globe-focus-nav .focus-btn[data-focus="teotihuacan"] {
    border-left-color: rgba(51, 255, 102, 0.5);
}
#globe-focus-nav .focus-btn[data-focus="teotihuacan"]:hover {
    border-left-color: #33ff66;
    color: #66ff88;
    box-shadow: 0 0 20px rgba(51, 255, 102, 0.12);
}

#globe-focus-nav .focus-btn[data-focus="angkor_wat"] {
    border-left-color: rgba(153, 238, 255, 0.5);
}
#globe-focus-nav .focus-btn[data-focus="angkor_wat"]:hover {
    border-left-color: #99eeff;
    color: #bbf4ff;
    box-shadow: 0 0 20px rgba(153, 238, 255, 0.12);
}

#globe-focus-nav .focus-btn[data-focus="gobekli_tepe"] {
    border-left-color: rgba(255, 170, 51, 0.5);
}
#globe-focus-nav .focus-btn[data-focus="gobekli_tepe"]:hover {
    border-left-color: #ffaa33;
    color: #ffc266;
    box-shadow: 0 0 20px rgba(255, 170, 51, 0.12);
}

#globe-focus-nav .focus-btn[data-focus="stonehenge"] {
    border-left-color: rgba(204, 153, 255, 0.5);
}
#globe-focus-nav .focus-btn[data-focus="stonehenge"]:hover {
    border-left-color: #cc99ff;
    color: #ddbbff;
    box-shadow: 0 0 20px rgba(204, 153, 255, 0.12);
}

/* --- Node Info Panel (bottom-left) --- */
#globe-controls-overlay #node-info {
    position: absolute;
    bottom: 30px;
    left: 20px;
    max-width: 380px;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 8px;
    padding: 20px;
    pointer-events: auto;
    display: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#globe-controls-overlay #node-info.visible {
    display: block;
    animation: nodeInfoSlideIn 0.3s ease-out;
}

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

#globe-controls-overlay #node-info h3 {
    color: #00ffcc;
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-family: 'Cinzel', serif;
}

#globe-controls-overlay #node-info p {
    margin: 5px 0;
    font-size: 0.85em;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
}

#globe-controls-overlay #node-info .coords {
    color: rgba(255, 255, 255, 0.45);
    font-family: monospace;
    font-size: 0.8em;
}

#globe-controls-overlay #node-info .bearing { color: #ffcc00; }
#globe-controls-overlay #node-info .distance { color: #ff8c00; }
#globe-controls-overlay #node-info .category { color: #cc99ff; }

#globe-controls-overlay #node-info .info-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

#globe-controls-overlay #node-info .info-close:hover {
    color: #fff;
}

/* --- Mobile adjustments for globe controls --- */
@media (max-width: 768px) {
    #globe-controls {
        top: 70px;
        right: 12px;
    }

    .globe-panel-toggle {
        font-size: 0.75rem;
        padding: 7px 12px;
    }

    #globe-focus-nav {
        right: 12px;
        gap: 4px;
    }

    #globe-focus-nav .focus-btn {
        font-size: 0.65rem;
        padding: 6px 10px 6px 8px;
        border-left-width: 2px;
    }

    #globe-controls-overlay #node-info {
        left: 12px;
        right: 12px;
        bottom: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    #globe-focus-nav {
        display: none;
    }
}
