/* ==========================================================================
           1. CORE BASE STYLING (OBSIDIAN GAMING AESTHETIC - NEVER UNSTYLED)
           ========================================================================== */
        body {
            background-color: #08090d;
            color: #ededed;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            overflow-x: hidden;
            transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .font-serif-hero {
            font-family: 'Instrument Serif', Georgia, serif;
        }

        button, a, .clickable {
            cursor: pointer;
        }

        /* ==========================================================================
           2. RICH CSS KEYFRAME ANIMATIONS (FROM PORTFOLIO HISTORY)
           ========================================================================== */
                /* Breathing neon drop-shadow behind gameplay videos & wallpapers */
        @keyframes videoGlowPulseDark {
            0%, 100% {
                opacity: 0.88;
            }
            50% {
                opacity: 1;
            }
        }
        
        @keyframes videoGlowPulseLight {
            0%, 100% {
                opacity: 0.92;
            }
            50% {
                opacity: 1;
            }
        }


        /* Fluid shifting multi-stop gradient for titles */
        @keyframes gradientShift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        /* Scroll progress gradient flow */
        @keyframes progressGradient {
            0% { background-position: 0% 50%; }
            100% { background-position: 300% 50%; }
        }

        /* Floating motion for ambient orbs */
        @keyframes orbFloat {
            0% { transform: translate(0, 0) scale(1); }
            33% { transform: translate(45px, -50px) scale(1.08); }
            66% { transform: translate(-35px, 35px) scale(0.94); }
            100% { transform: translate(25px, 20px) scale(1.04); }
        }

        /* Floating movement for hero badge shields */
        @keyframes floatSlow {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-7px) rotate(0.4deg); }
        }

        /* Specular button sheen sweep */
        @keyframes btnShine {
            0% { transform: translateX(-150%) rotate(30deg); }
            20%, 100% { transform: translateX(350%) rotate(30deg); }
        }

        /* Glowing pulsing status indicator dot */
        @keyframes dotPulse {
            0%, 100% {
                box-shadow: 0 0 10px rgba(56, 189, 248, 0.8), 0 0 22px rgba(56, 189, 248, 0.4);
                transform: scale(1);
            }
            50% {
                box-shadow: 0 0 18px rgba(56, 189, 248, 1), 0 0 32px rgba(56, 189, 248, 0.6);
                transform: scale(1.2);
            }
        }

        /* Title glow */
        @keyframes titleGlow {
            0%, 100% { text-shadow: 0 0 15px rgba(56, 189, 248, 0.3), 0 0 30px rgba(99, 102, 241, 0.15); }
            50% { text-shadow: 0 0 25px rgba(56, 189, 248, 0.6), 0 0 45px rgba(99, 102, 241, 0.3); }
        }

        /* ==========================================================================
           3. SCROLL PROGRESS BAR
           ========================================================================== */
        .scroll-progress {
            position: fixed;
            top: 0;
            left: 0;
            height: 3px;
            background: linear-gradient(90deg, #38bdf8, #818cf8, #ec4899, #06b6d4);
            background-size: 300% 100%;
            animation: progressGradient 3s linear infinite;
            z-index: 99999;
            width: 0%;
            transition: width 0.08s linear;
        }

        /* ==========================================================================
           4. AMBIENT GLOWING ORBS (ATMOSPHERE)
           ========================================================================== */
        .gradient-orbs {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            overflow: hidden;
        }
        .orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(110px);
            opacity: 0.45;
            animation: orbFloat 18s ease-in-out infinite alternate;
            transition: opacity 0.5s ease;
        }
        .orb-1 {
            width: 650px;
            height: 650px;
            background: radial-gradient(circle, rgba(56, 189, 248, 0.38), transparent 70%);
            top: -10%;
            left: -5%;
            animation-delay: 0s;
        }
        .orb-2 {
            width: 550px;
            height: 550px;
            background: radial-gradient(circle, rgba(99, 102, 241, 0.32), transparent 70%);
            top: 35%;
            right: -10%;
            animation-delay: -4s;
        }
        .orb-3 {
            width: 480px;
            height: 480px;
            background: radial-gradient(circle, rgba(236, 72, 153, 0.28), transparent 70%);
            bottom: -5%;
            left: 25%;
            animation-delay: -8s;
        }
        .orb-4 {
            width: 380px;
            height: 380px;
            background: radial-gradient(circle, rgba(6, 182, 212, 0.3), transparent 70%);
            top: 65%;
            left: -5%;
            animation-delay: -12s;
        }

        /* ==========================================================================
           5. GLASSMORPHISM CARDS & CORE COMPONENTS
           ========================================================================== */
        .glass-card {
            background: rgba(18, 22, 34, 0.72);
            border: 1px solid rgba(255, 255, 255, 0.09);
            border-radius: 20px;
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            color: #ededed;
            box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                        border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                        box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .glass-card:hover {
            transform: translateY(-6px);
            border-color: rgba(56, 189, 248, 0.65);
            box-shadow: 0 20px 45px -10px rgba(56, 189, 248, 0.28), 0 0 25px rgba(56, 189, 248, 0.15);
        }

        /* Moving Animated Gradient Text */
        .gradient-text {
            background-image: linear-gradient(135deg, #38bdf8 0%, #818cf8 35%, #ec4899 70%, #06b6d4 100%);
            background-size: 300% 300%;
            animation: gradientShift 6s ease infinite;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        /* Section Header Shields */
        .section-header-shield {
            background: rgba(14, 18, 30, 0.62);
            border: 1px solid rgba(56, 189, 248, 0.38);
            border-radius: 24px;
            box-shadow: 0 0 40px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.25);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        /* Video Ambient Glowing Drop-Shadow (Compositor Accelerated) */
        .video-glow {
            will-change: opacity;
            contain: paint;
            transition: opacity 0.5s ease;
        }
        html.dark .video-glow, html:not(.light) .video-glow {
            animation: videoGlowPulseDark 4s ease-in-out infinite;
        }


        /* 3D Model & Map Viewers with High-Contrast Saturation */
        .model-card-viewer {
            width: 100% !important;
            height: 280px !important;
            min-height: 280px !important;
            display: block !important;
            background: radial-gradient(circle at center, rgba(30, 48, 80, 0.6) 0%, rgba(10, 14, 24, 0.98) 100%);
            border-top-left-radius: 18px;
            border-top-right-radius: 18px;
            --poster-color: transparent;
            cursor: grab;
            filter: saturate(1.35) contrast(1.12) brightness(1.05);
            transition: filter 0.3s ease, background 0.4s ease;
        }
        .model-card-viewer:active { cursor: grabbing; }

        .map-viewer {
            width: 100% !important;
            height: 380px !important;
            min-height: 380px !important;
            display: block !important;
            background: radial-gradient(circle at center, rgba(30, 48, 80, 0.65) 0%, rgba(10, 14, 24, 0.98) 100%);
            border-top-left-radius: 18px;
            border-top-right-radius: 18px;
            cursor: grab;
            filter: saturate(1.28) contrast(1.1) brightness(1.04);
            transition: filter 0.3s ease, background 0.4s ease;
        }
        .map-viewer:active { cursor: grabbing; }

        .badge-360 {
            background: rgba(10, 14, 26, 0.88);
            border: 1px solid rgba(56, 189, 248, 0.35);
            color: #f8fafc;
            backdrop-filter: blur(8px);
        }

        .spec-pill {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            color: #cbd5e1;
        }

        .dot-pulse {
            animation: dotPulse 2s ease-in-out infinite;
        }

        .animate-float {
            animation: floatSlow 5s ease-in-out infinite;
        }

        /* Button Sheen */
        .btn-shine {
            position: relative;
            overflow: hidden;
        }
        .btn-shine::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -60%;
            width: 40%;
            height: 200%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
            transform: rotate(30deg);
            animation: btnShine 4s ease-in-out infinite;
        }

        /* ==========================================================================
           6. DARK MODE SPECIFICS (VERCEL OBSIDIAN AESTHETIC)
           ========================================================================== */
        html.dark body {
            background-color: #08090d !important;
            color: #ededed !important;
        }
        html.dark .glass-card {
            background: rgba(12, 16, 28, 0.58) !important;
            backdrop-filter: blur(14px) !important;
            -webkit-backdrop-filter: blur(14px) !important;
            border-color: rgba(56, 189, 248, 0.22) !important;
            box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.14) !important;
            color: #ededed !important;
        }

        /* ==========================================================================
           7. LIGHT MODE SPECIFICS (CLEAN HIGH-CONTRAST DAYLIGHT)
           ========================================================================== */
        html.light body {
            background-color: #f8fafc !important;
            color: #0f172a !important;
        }

        html.light .orb {
            opacity: 0.16 !important;
            filter: blur(120px) !important;
        }

        html.light .glass-card {
            background: rgba(255, 255, 255, 0.75) !important;
            backdrop-filter: blur(16px) !important;
            -webkit-backdrop-filter: blur(16px) !important;
            border: 1px solid rgba(255, 255, 255, 0.75) !important;
            border-radius: 20px;
            color: #0f172a !important;
            box-shadow: 0 12px 35px -8px rgba(15, 23, 42, 0.08), 0 0 25px rgba(2, 132, 199, 0.16) !important;
        }
        html.light .glass-card:hover {
            transform: translateY(-6px);
            border-color: #0284c7 !important;
            box-shadow: 0 20px 40px -8px rgba(2, 132, 199, 0.22) !important;
        }

        html.light .glass-card h1, 
        html.light .glass-card h2, 
        html.light .glass-card h3, 
        html.light .glass-card h4,
        html.light .glass-card strong {
            color: #0f172a !important;
        }
        html.light .glass-card p, 
        html.light .glass-card li,
        html.light .glass-card span {
            color: #334155;
        }

        html.light .gradient-text {
            background-image: linear-gradient(135deg, #0284c7 0%, #4f46e5 50%, #9333ea 100%) !important;
        }

        html.light .section-header-shield {
            background: rgba(255, 255, 255, 0.8) !important;
            backdrop-filter: blur(16px) !important;
            -webkit-backdrop-filter: blur(16px) !important;
            border: 1px solid rgba(255, 255, 255, 0.8) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 0 25px rgba(2, 132, 199, 0.18) !important;
        }
        html.light .section-header-shield h2, html.light .section-header-shield h3 {
            color: #0f172a !important;
        }
        html.light .section-header-shield p {
            color: #475569 !important;
        }

        html.light .model-card-viewer {
            background: radial-gradient(circle at center, rgba(224, 242, 254, 0.75) 0%, rgba(241, 245, 249, 0.98) 100%) !important;
        }
        html.light .map-viewer {
            background: transparent !important;
        }

        html.light .badge-360 {
            background: #ffffff !important;
            border: 1px solid rgba(0, 0, 0, 0.12) !important;
            color: #0f172a !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
        }

        html.light .spec-pill {
            background: rgba(0, 0, 0, 0.05) !important;
            border: 1px solid rgba(0, 0, 0, 0.08) !important;
            color: #1e293b !important;
        }

        html.light nav div {
            background-color: rgba(255, 255, 255, 0.96) !important;
            border-color: rgba(0, 0, 0, 0.12) !important;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
        }
        html.light nav a {
            color: #1e293b !important;
        }

        html.light .filter-btn {
            background-color: #ffffff !important;
            color: #1e293b !important;
            border-color: rgba(0, 0, 0, 0.12) !important;
        }
        html.light .filter-btn.active {
            background-color: #0284c7 !important;
            color: #ffffff !important;
            border-color: #0284c7 !important;
        }

                html.light .video-glow {
            animation: videoGlowPulseLight 4s ease-in-out infinite !important;
        }


        /* ==========================================================================
           8. CUSTOM HIGH-CONTRAST SCROLLBAR
           ========================================================================== */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #08090d; }
        ::-webkit-scrollbar-thumb { background: #232a3b; border-radius: 4px; }
        ::-webkit-scrollbar-thumb:hover { background: #38bdf8; }

        html.light ::-webkit-scrollbar-track { background: #f1f5f9; }
        html.light ::-webkit-scrollbar-thumb { background: #cbd5e1; }
        html.light ::-webkit-scrollbar-thumb:hover { background: #0284c7; }
    
                                /* ==========================================================================
           SECTION BACKGROUND VIDEOS (LUMINOUS, RADIANT, GLOWING IN DARK & LIGHT)
           ========================================================================== */
        .section-bg-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            opacity: 1 !important;
            transition: filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Dark Mode: Vibrant, high-contrast, luminous glow like the reference screenshot */
        html.dark .section-bg-video, html:not(.light) .section-bg-video {
            filter: brightness(1.45) contrast(1.25) saturate(1.6);
        }

        /* Light Mode: Radiant, punchy daylight saturation, crystal clear */
        html.light .section-bg-video {
            filter: brightness(1.18) contrast(1.2) saturate(1.5);
            mix-blend-mode: normal !important;
        }

        /* Seamless Edge Blending - Transparent in middle, soft dissolve at very tips */
        .section-video-overlay-b {
            position: absolute;
            inset: 0;
            z-index: 10;
            pointer-events: none;
            transition: background 0.5s ease;
        }
        html.dark .section-video-overlay-b, html:not(.light) .section-video-overlay-b {
            background: linear-gradient(180deg, rgba(8, 9, 13, 0.45) 0%, rgba(8, 9, 13, 0) 15%, rgba(8, 9, 13, 0) 85%, rgba(8, 9, 13, 0.55) 100%);
        }
        html.light .section-video-overlay-b {
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.4) 0%, rgba(248, 250, 252, 0) 15%, rgba(248, 250, 252, 0) 85%, rgba(248, 250, 252, 0.45) 100%);
        }

        /* Disabled side darkening so full video shines through vividly */
        .section-video-overlay-r {
            display: none !important;
        }

        /* 3D Character Rig Animation Controller Pills */
        .anim-pill.active {
            background-color: #06b6d4 !important;
            color: #000000 !important;
            font-weight: 700 !important;
            border-color: #22d3ee !important;
            box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
        }

        .modal-anim-pill.active {
            background-color: #06b6d4 !important;
            color: #000000 !important;
            font-weight: 700 !important;
            border-color: #22d3ee !important;
            box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
        }

        /* 3D Costume Colorway Controller Pills */
        .costume-pill.active {
            background-color: #f97316 !important;
            color: #000000 !important;
            font-weight: 700 !important;
            border-color: #fb923c !important;
            box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
        }

        /* Enforce Model-Viewer Custom Element Block Sizing */
        model-viewer {
            display: block;
            width: 100%;
            outline: none;
        }

        .model-retry-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 30;
            padding: 12px 16px;
            border: 1px solid rgba(56, 189, 248, 0.75);
            border-radius: 12px;
            background: rgba(8, 16, 30, 0.94);
            color: #e0f2fe;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
        }

        /* ==========================================================================
           9. 3D LEVEL MAPS SHOWROOM & VIEWPORT BACKDROPS (PRO ARCHITECTURAL STUDIO)
           ========================================================================== */
        .maps-section-wrapper {
            position: relative;
            background: radial-gradient(ellipse 90% 50% at 50% 0%, rgba(30, 41, 59, 0.5) 0%, rgba(10, 14, 23, 0.98) 70%, #06080e 100%);
            transition: background 0.4s ease;
        }
        html.light .maps-section-wrapper {
            background: radial-gradient(ellipse 90% 50% at 50% 0%, #ffffff 0%, #f1f5f9 60%, #e2e8f0 100%) !important;
        }
        /* Disable distracting, fiery raw video overlay behind maps in both modes */
        .maps-section-wrapper .section-bg-video,
        .maps-section-wrapper .video-glow {
            display: none !important;
        }

        /* Architectural Showroom Cards */
        .map-showroom-card {
            background: rgba(11, 15, 26, 0.90);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 1.5rem;
            backdrop-filter: blur(20px);
            box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
            transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }
        .map-showroom-card:hover {
            transform: translateY(-4px);
        }
        .map-showroom-card.card-circuit:hover {
            border-color: rgba(239, 68, 68, 0.7);
            box-shadow: 0 24px 60px -12px rgba(239, 68, 68, 0.32), 0 0 35px -5px rgba(239, 68, 68, 0.18);
        }
        .map-showroom-card.card-sanctuary:hover {
            border-color: rgba(245, 158, 11, 0.7);
            box-shadow: 0 24px 60px -12px rgba(245, 158, 11, 0.32), 0 0 35px -5px rgba(245, 158, 11, 0.18);
        }
        .map-showroom-card.card-stadium:hover {
            border-color: rgba(16, 185, 129, 0.7);
            box-shadow: 0 24px 60px -12px rgba(16, 185, 129, 0.32), 0 0 35px -5px rgba(16, 185, 129, 0.18);
        }
        .map-showroom-card.card-arena:hover {
            border-color: rgba(6, 182, 212, 0.7);
            box-shadow: 0 24px 60px -12px rgba(6, 182, 212, 0.32), 0 0 35px -5px rgba(6, 182, 212, 0.18);
        }

        html.light .map-showroom-card {
            background: #ffffff !important;
            border: 1px solid rgba(203, 213, 225, 0.9) !important;
            box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.06), 0 4px 12px -2px rgba(0, 0, 0, 0.03) !important;
        }
        html.light .map-showroom-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12), 0 0 25px rgba(99, 102, 241, 0.12) !important;
        }
        html.light .map-card-title {
            color: #0f172a !important;
        }
        html.light .map-card-desc {
            color: #475569 !important;
        }

        /* 3D Model Viewport Pedestals */
        .map-viewport {
            position: relative;
            width: 100%;
            height: 440px;
            overflow: hidden;
            border-radius: 1.5rem 1.5rem 0 0;
            transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Cinematic Inner Vignette for Photographic Depth */
        .map-viewport::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 1.5rem 1.5rem 0 0;
            box-shadow: inset 0 0 65px rgba(0, 0, 0, 0.45);
            pointer-events: none;
            z-index: 3;
        }
        html.light .map-viewport::after {
            box-shadow: inset 0 0 45px rgba(15, 23, 42, 0.08);
        }

        /* CAD Drafting Floor Grid Perspective Reticle */
        .map-viewport::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                              linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
            background-size: 32px 32px;
            mask-image: radial-gradient(ellipse 80% 55% at 50% 72%, black 15%, transparent 75%);
            -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 72%, black 15%, transparent 75%);
            pointer-events: none;
            z-index: 1;
        }
        html.light .map-viewport::before {
            background-image: linear-gradient(to right, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
                              linear-gradient(to bottom, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
            mask-image: radial-gradient(ellipse 80% 55% at 50% 72%, black 15%, transparent 75%);
            -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 72%, black 15%, transparent 75%);
        }

        /* Atmospheric Scenery Lighting in Dark Mode */
        html.dark .map-viewport-circuit, html:not(.light) .map-viewport-circuit {
            background: 
                radial-gradient(ellipse 70% 35% at 50% 88%, rgba(239, 68, 68, 0.32) 0%, rgba(220, 38, 38, 0.10) 50%, transparent 75%),
                radial-gradient(ellipse 85% 50% at 50% 25%, rgba(249, 115, 22, 0.14) 0%, rgba(239, 68, 68, 0.06) 45%, transparent 75%),
                linear-gradient(180deg, #0b0f19 0%, #131b2e 40%, #1a1524 75%, #0d0f17 100%);
        }
        html.dark .map-viewport-sanctuary, html:not(.light) .map-viewport-sanctuary {
            background: 
                radial-gradient(ellipse 65% 35% at 50% 88%, rgba(245, 158, 11, 0.30) 0%, rgba(217, 119, 6, 0.10) 50%, transparent 75%),
                radial-gradient(ellipse 85% 55% at 50% 18%, rgba(168, 85, 247, 0.24) 0%, rgba(59, 130, 246, 0.12) 45%, transparent 80%),
                linear-gradient(180deg, #0c0f24 0%, #151838 45%, #18152e 75%, #0a0c1a 100%);
        }
        html.dark .map-viewport-stadium, html:not(.light) .map-viewport-stadium {
            background: 
                radial-gradient(ellipse 70% 35% at 50% 88%, rgba(16, 185, 129, 0.30) 0%, rgba(5, 150, 105, 0.10) 50%, transparent 75%),
                radial-gradient(ellipse 85% 50% at 50% 15%, rgba(14, 165, 233, 0.25) 0%, rgba(2, 132, 199, 0.10) 50%, transparent 80%),
                linear-gradient(180deg, #081626 0%, #0c233c 45%, #0a1f33 75%, #050e18 100%);
        }
        html.dark .map-viewport-arena, html:not(.light) .map-viewport-arena {
            background: 
                radial-gradient(ellipse 70% 35% at 50% 88%, rgba(6, 182, 212, 0.32) 0%, rgba(8, 145, 178, 0.12) 50%, transparent 75%),
                radial-gradient(ellipse 85% 50% at 50% 20%, rgba(6, 182, 212, 0.24) 0%, rgba(99, 102, 241, 0.12) 50%, transparent 80%),
                linear-gradient(180deg, #04121d 0%, #071f30 45%, #061928 75%, #030a10 100%);
        }

        /* Luminous Architectural Skies in Light Mode */
        html.light .map-viewport-circuit {
            background: 
                radial-gradient(ellipse 70% 30% at 50% 88%, rgba(239, 68, 68, 0.18) 0%, transparent 70%),
                linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 35%, #f8fafc 70%, #e2e8f0 100%) !important;
        }
        html.light .map-viewport-sanctuary {
            background: 
                radial-gradient(ellipse 70% 30% at 50% 88%, rgba(245, 158, 11, 0.18) 0%, transparent 70%),
                linear-gradient(180deg, #fdf4ff 0%, #fae8ff 30%, #f8fafc 70%, #f1f5f9 100%) !important;
        }
        html.light .map-viewport-stadium {
            background: 
                radial-gradient(ellipse 70% 30% at 50% 88%, rgba(16, 185, 129, 0.18) 0%, transparent 70%),
                linear-gradient(180deg, #e0f7fa 0%, #f0fdf4 35%, #f8fafc 70%, #e2e8f0 100%) !important;
        }
        html.light .map-viewport-arena {
            background: 
                radial-gradient(ellipse 70% 30% at 50% 88%, rgba(6, 182, 212, 0.18) 0%, transparent 70%),
                linear-gradient(180deg, #ecfeff 0%, #f0fdfa 35%, #f8fafc 70%, #e2e8f0 100%) !important;
        }

        .map-viewer {
            position: relative;
            z-index: 2;
            background: transparent !important;
            filter: saturate(1.22) contrast(1.06) brightness(1.03);
            transition: filter 0.3s ease;
        }

        /* Camera Director Toolbar Frosted Glass Dock */
        .cam-director-toolbar {
            position: absolute;
            bottom: 16px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            border-radius: 9999px;
            background: rgba(8, 11, 22, 0.82);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.16);
            box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
            max-width: 95%;
        }
        html.light .cam-director-toolbar {
            background: rgba(255, 255, 255, 0.90) !important;
            border: 1px solid rgba(203, 213, 225, 0.95) !important;
            box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
        }
        .cam-preset-btn {
            font-size: 11.5px;
            font-weight: 600;
            padding: 6px 13px;
            border-radius: 9999px;
            white-space: nowrap;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            color: #94a3b8;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid transparent;
            cursor: pointer;
        }
        .cam-preset-btn:hover {
            background: rgba(255, 255, 255, 0.15);
            color: #ffffff;
            transform: translateY(-1px);
        }
        .cam-preset-btn.active {
            background: #ffffff !important;
            color: #0b0f19 !important;
            font-weight: 700 !important;
            box-shadow: 0 4px 14px rgba(255, 255, 255, 0.35) !important;
            transform: translateY(-1px);
        }
        html.light .cam-preset-btn {
            color: #475569 !important;
            background: rgba(241, 245, 249, 0.9) !important;
        }
        html.light .cam-preset-btn:hover {
            background: rgba(226, 232, 240, 1) !important;
            color: #0f172a !important;
            transform: translateY(-1px);
        }
        html.light .cam-preset-btn.active {
            background: #0f172a !important;
            color: #ffffff !important;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25) !important;
            transform: translateY(-1px);
        }

        /* Reset View Icon Button */
        .map-hud-btn {
            position: absolute;
            top: 14px;
            right: 14px;
            z-index: 10;
            padding: 7px 13px;
            border-radius: 9999px;
            font-size: 11px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
            background: rgba(8, 11, 22, 0.80);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(255, 255, 255, 0.16);
            color: #cbd5e1;
            transition: all 0.25s ease;
            cursor: pointer;
        }
        .map-hud-btn:hover {
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
            transform: translateY(-1px);
        }
        html.light .map-hud-btn {
            background: rgba(255, 255, 255, 0.90) !important;
            border: 1px solid rgba(203, 213, 225, 0.95) !important;
            color: #334155 !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
        }
        html.light .map-hud-btn:hover {
            background: #ffffff !important;
            color: #0f172a !important;
            transform: translateY(-1px);
        }

        /* Clean Spec Pill Grid in Dark & Light Modes */
        .map-spec-grid {
            background: rgba(0, 0, 0, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.08);
            transition: background 0.3s ease, border-color 0.3s ease;
        }
        html.light .map-spec-grid {
            background: rgba(241, 245, 249, 0.9) !important;
            border: 1px solid rgba(203, 213, 225, 0.8) !important;
        }
        html.light .map-spec-grid span:first-child {
            color: #64748b !important;
        }

        /* Map Section Header in Light Mode */
        html.light .map-section-title {
            color: #0f172a !important;
        }
        html.light .map-section-desc {
            color: #475569 !important;
        }

        /* =========================================================================
           ROBLOX STUDIO IMPORT SCRIPT MODAL & BUTTONS
           ========================================================================= */
        @keyframes modalPopIn {
            0% {
                opacity: 0;
                transform: scale(0.96) translateY(12px);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .animate-modal-pop {
            animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        /* Script Button Glows */
        .btn-import-script {
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
        }
        .btn-import-script:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(234, 179, 8, 0.3);
        }
        .btn-import-script:active {
            transform: translateY(0) scale(0.98);
        }

        /* Light Mode for Script Modal */
        html.light #import-script-modal > div {
            background: #ffffff !important;
            border-color: rgba(203, 213, 225, 0.9) !important;
            box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.25), 0 0 30px rgba(234, 179, 8, 0.15) !important;
        }
        html.light #import-script-modal .border-gray-800 {
            border-color: #e2e8f0 !important;
        }
        html.light #import-script-modal .bg-\[\#080c14\] {
            background: #f8fafc !important;
        }
        html.light #import-script-modal .bg-\[\#070a10\] {
            background: #0f172a !important; /* Keep code container dark for high readability */
        }
        html.light #import-script-modal .bg-\[\#0b0f19\] {
            background: #1e293b !important;
        }
        html.light #import-script-modal h4 {
            color: #0f172a !important;
        }
        html.light #import-script-modal #script-modal-subtitle {
            color: #475569 !important;
        }
        html.light #import-script-modal #script-modal-subtitle strong {
            color: #0f172a !important;
        }
        html.light #import-script-modal .download-luau-btn {
            background: rgba(15, 23, 42, 0.08) !important;
            border-color: rgba(203, 213, 225, 0.9) !important;
            color: #0f172a !important;
        }
        html.light #import-script-modal .download-luau-btn:hover {
            background: rgba(15, 23, 42, 0.15) !important;
        }
        html.light #import-script-modal .studio-guide-banner {
            background: #f1f5f9 !important;
            border-color: #cbd5e1 !important;
            color: #1e293b !important;
        }
        html.light #import-script-modal .studio-guide-banner strong,
        html.light #import-script-modal .studio-guide-banner span {
            color: #0f172a !important;
        }
        html.light #import-script-modal .studio-guide-banner code {
            background: #e2e8f0 !important;
            border-color: #cbd5e1 !important;
            color: #b45309 !important;
        }
        html.light #import-script-modal #script-modal-badge {
            background: rgba(234, 179, 8, 0.2) !important;
            border-color: rgba(234, 179, 8, 0.5) !important;
            color: #854d0e !important;
        }
        html.light #import-script-modal .modal-footer-info {
            background: #f8fafc !important;
            color: #475569 !important;
        }
        html.light #import-script-modal .modal-footer-info span {
            color: #0f172a !important;
        }
        html.light #import-script-modal .modal-footer-info .footer-label {
            color: #64748b !important;
        }
        html.light #import-script-modal #tab-full-system:not(.bg-yellow-400) {
            color: #475569 !important;
        }
        html.light #import-script-modal #tab-full-system:not(.bg-yellow-400):hover {
            color: #0f172a !important;
        }

        /* Code Editor Scrollbar */
        #import-script-modal pre code {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        }
        #import-script-modal .overflow-auto::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        #import-script-modal .overflow-auto::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.3);
        }
        #import-script-modal .overflow-auto::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
        }
        #import-script-modal .overflow-auto::-webkit-scrollbar-thumb:hover {
            background: rgba(234, 179, 8, 0.6);
        }


/* ==========================================================================
   INTERACTIVE PAINT COMBAT & SCI-FI TACTICAL BRIEFING UI
   ========================================================================== */

/* 1. Global "PLAY NOW" Action Buttons across Portfolio */
.btn-play-combat {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: #030712;
    background: linear-gradient(135deg, #00f0ff 0%, #38bdf8 50%, #22c55e 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 0.875rem;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4), 0 0 12px rgba(34, 197, 94, 0.3);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-play-combat:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.7), 0 0 20px rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, #38bdf8 0%, #00f0ff 50%, #4ade80 100%);
}

.btn-play-combat:active {
    transform: translateY(0) scale(0.98);
}

.btn-play-combat .pulse-ring {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00f0ff;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* 2. Authentic Pastel Illustrated Tactical Briefing Console */
#paint-combat-briefing-dropdown {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(94vw, 840px);
    max-height: 85vh;
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: auto;
    filter: drop-shadow(0 20px 45px rgba(15, 23, 42, 0.45));
}

#paint-combat-briefing-dropdown.collapsed {
    transform: translateX(-50%) translateY(-120%);
    opacity: 0;
    pointer-events: none;
}

.pastel-briefing-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1536 / 1024;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.35);
    background: #fdf6ec;
}

.pastel-briefing-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.pastel-hotspot {
    position: absolute;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    outline: none;
    border-radius: 12px;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.pastel-hotspot:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

.pastel-hotspot:active {
    transform: scale(0.98);
}

.pastel-btn-minimize {
    top: 11.5%;
    right: 6.0%;
    width: 11.2%;
    height: 7.2%;
    border-radius: 8px;
}

.pastel-btn-resume {
    left: 7.0%;
    top: 77.8%;
    width: 32.2%;
    height: 10.3%;
    border-radius: 14px;
}

.pastel-btn-clear {
    left: 40.8%;
    top: 77.8%;
    width: 22.2%;
    height: 10.3%;
    border-radius: 14px;
}

.pastel-btn-exit {
    left: 64.9%;
    top: 77.8%;
    width: 28.2%;
    height: 10.3%;
    border-radius: 14px;
}

.briefing-panel {
    background: rgba(8, 12, 22, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 240, 255, 0.45);
    border-radius: 1.25rem;
    padding: 0.9rem 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.25);
    color: #f8fafc;
}

.briefing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.briefing-icon {
    font-size: 1.5rem;
    color: #00f0ff;
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.8));
}

.briefing-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin: 0;
}

.briefing-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: monospace;
    color: #34d399;
}

.status-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: dotPulse 2s infinite;
}

.briefing-btn-minimize {
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.briefing-btn-minimize:hover {
    background: rgba(0, 240, 255, 0.15);
    color: #00f0ff;
    border-color: rgba(0, 240, 255, 0.4);
}

.briefing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .briefing-grid {
        grid-template-columns: 1fr;
    }
}

.briefing-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-col;
    gap: 0.4rem;
    transition: all 0.2s ease;
}

.briefing-card:hover {
    border-color: rgba(0, 240, 255, 0.35);
    background: rgba(15, 23, 42, 0.85);
}

.briefing-card.highlight-card {
    border-color: rgba(0, 240, 255, 0.45);
    background: rgba(0, 240, 255, 0.08);
}

.card-tag {
    font-size: 0.65rem;
    font-weight: 800;
    font-family: monospace;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.keybind-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0;
}

.key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 0.35rem;
    border-radius: 0.4rem;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(0, 240, 255, 0.5);
    color: #00f0ff;
    font-family: monospace;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.key-badge-wide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 2px solid rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.75rem;
}

.key-badge-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.4rem;
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.5);
    color: #ffffff;
    font-family: monospace;
    font-weight: 800;
    font-size: 0.75rem;
    text-shadow: 0 0 6px rgba(0, 240, 255, 0.6);
}

.card-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    line-height: 1.35;
    margin: 0;
}

.briefing-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary-combat {
    padding: 0.5rem 1.25rem;
    border-radius: 0.6rem;
    background: #00f0ff;
    color: #030712;
    font-weight: 800;
    font-size: 0.75rem;
    border: none;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
    transition: all 0.2s ease;
}

.btn-primary-combat:hover {
    background: #38bdf8;
    transform: translateY(-1px);
}

.btn-secondary-combat {
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-secondary-combat:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.btn-danger-combat {
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-weight: 700;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-danger-combat:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

/* 3. Crosshair Reticle */
.crosshair-reticle {
    position: fixed;
    width: 28px;
    height: 28px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 55;
}

.reticle-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00f0ff;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px #00f0ff;
}

.reticle-line {
    position: absolute;
    background: rgba(0, 240, 255, 0.85);
}

.reticle-line.top {
    top: 0;
    left: 50%;
    width: 2px;
    height: 7px;
    transform: translateX(-50%);
}

.reticle-line.bottom {
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 7px;
    transform: translateX(-50%);
}

.reticle-line.left {
    top: 50%;
    left: 0;
    width: 7px;
    height: 2px;
    transform: translateY(-50%);
}

.reticle-line.right {
    top: 50%;
    right: 0;
    width: 7px;
    height: 2px;
    transform: translateY(-50%);
}

/* 4. Combat Heads-Up Display (HUD) */
#paint-combat-hud {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 55;
}

.hud-meters-panel {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 55;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
    width: 210px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.meter-row {
    margin-bottom: 0.5rem;
}

.meter-row:last-child {
    margin-bottom: 0;
}

.meter-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    font-family: monospace;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.meter-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.meter-fill.fuel {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #00f0ff);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
    transition: width 0.08s linear;
}

.meter-fill.ammo {
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #22c55e);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
    transition: width 0.08s linear;
}

.hud-actions-panel {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 55;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
}

.hud-color-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    padding: 0.4rem 0.85rem;
    color: #f8fafc;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-color-pill:hover {
    border-color: rgba(0, 240, 255, 0.5);
    transform: translateY(-1px);
}

.color-swatch-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

#hud-controls-btn {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(254, 215, 170, 0.95));
    color: #451a03;
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
    font-weight: 700;
}

#hud-controls-btn:hover {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
    color: #000000;
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
    transform: translateY(-2px) scale(1.03);
}

.hud-pill-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    padding: 0.4rem 0.85rem;
    color: #38bdf8;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-pill-btn:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-1px);
}

.hud-pill-btn.danger {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.hud-pill-btn.danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #ffffff;
}

/* 5. Right-Click Neon Color Palette Modal */
#paint-color-palette-modal {
    position: fixed;
    display: none;
    z-index: 70;
    width: 260px;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.5);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.3);
    color: #ffffff;
    pointer-events: auto;
}

.palette-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.75rem;
}

.palette-title {
    font-size: 0.75rem;
    font-weight: 800;
    font-family: monospace;
    color: #00f0ff;
    letter-spacing: 0.05em;
}

.palette-close {
    font-size: 0.85rem;
    color: #94a3b8;
    background: none;
    border: none;
    cursor: pointer;
}

.palette-close:hover {
    color: #ffffff;
}

.palette-swatches-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.palette-swatch-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.palette-swatch-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.palette-swatch-btn.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: #00f0ff;
    color: #00f0ff;
}

.swatch-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.palette-custom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-color-picker {
    width: 28px;
    height: 24px;
    border: none;
    border-radius: 0.35rem;
    background: none;
    cursor: pointer;
}

/* ==========================================================================
   PAINT COMBAT ACTIVE STATE (Clear Visibility Mode)
   ========================================================================== */
body.paint-combat-active #companion-canvas {
    z-index: 45 !important;
    pointer-events: none !important;
}

/* Dim foreground text during combat so the 3D boy, AK rifle & paint spray are 100% visible */
body.paint-combat-active #hero h1,
body.paint-combat-active #hero p,
body.paint-combat-active #hero .flex-wrap,
body.paint-combat-active #hero .inline-flex {
    opacity: 0.12 !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease;
}

body.paint-combat-active #hero {
    user-select: none;
}

/* ═══════════════════════════════════════════════════════════
   WEAPON MODULARIES — Cards, glows, backgrounds
═══════════════════════════════════════════════════════════ */

/* Base weapon cards */
.weapons-card {
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: grab;
}
.weapons-card:hover { transform: translateY(-4px) scale(1.02); }
.weapons-card:active { cursor: grabbing; }

.weapons-card-large {
  backdrop-filter: blur(16px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: grab;
}
.weapons-card-large:hover { transform: translateY(-6px) scale(1.015); }
.weapons-card-large:active { cursor: grabbing; }

/* Radial background glows per weapon */
.weapon-bg-glow {
  position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
}
.axe-glow     { background: radial-gradient(ellipse at 50% 20%, rgba(249,115,22,0.18) 0%, transparent 70%); }
.bostaff-glow { background: radial-gradient(ellipse at 50% 20%, rgba(234,179,8,0.15) 0%,  transparent 70%); }
.club-glow    { background: radial-gradient(ellipse at 50% 20%, rgba(245,158,11,0.15) 0%, transparent 70%); }
.dagger-glow  { background: radial-gradient(ellipse at 50% 20%, rgba(168,85,247,0.18) 0%, transparent 70%); }
.flail-glow   { background: radial-gradient(ellipse at 50% 20%, rgba(239,68,68,0.18) 0%,  transparent 70%); }
.halberd-glow { background: radial-gradient(ellipse at 50% 20%, rgba(20,184,166,0.18) 0%, transparent 70%); }
.katana-glow  { background: radial-gradient(ellipse at 50% 20%, rgba(59,130,246,0.20) 0%,  transparent 70%); }
.mace-glow    { background: radial-gradient(ellipse at 50% 20%, rgba(148,163,184,0.15) 0%, transparent 70%); }
.spear-glow   { background: radial-gradient(ellipse at 50% 20%, rgba(6,182,212,0.18) 0%,   transparent 70%); }
.sword-glow   { background: radial-gradient(ellipse at 50% 20%, rgba(99,102,241,0.20) 0%,  transparent 70%); }

/* model-viewer: hide default AR button */
.weapons-card model-viewer::part(default-ar-button),
.weapons-card-large model-viewer::part(default-ar-button) {
  display: none;
}

/* Subtle glowing background for the weapons section */
#weapons {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(8,9,13,0.92) 0%, rgba(8,9,13,0.65) 30%, rgba(8,9,13,0.65) 70%, rgba(8,9,13,0.95) 100%),
    url('assets/images/weapons_sunset_bg.avif');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}
