@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800;900&family=Press+Start+2P&family=Silkscreen:wght@400;700&family=Space+Grotesk:wght@500;700;900&display=swap');

:root {
    --neon-cyan: #00f0ff;
    --neon-pink: #ff007f;
    --neon-yellow: #ffe600;
    --neon-purple: #9d4edd;
    --cosmic-dark: #070314;
}

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

body {
    background-color: var(--cosmic-dark);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#start-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

h1, h2, h3, .font-heading {
    font-family: 'Space Grotesk', sans-serif;
}

/* 3D Cubed Voxel Retro Arcade Title */
.voxel-title-retro {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(2.4rem, 7.5vw, 5.5rem);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff200;
    text-shadow: 
        3px 3px 0px #ff007f,
        6px 6px 0px #d9006c,
        9px 9px 0px #7928ca,
        12px 12px 0px #3b0764,
        15px 15px 25px rgba(0, 240, 255, 0.8),
        0 0 35px rgba(255, 242, 0, 0.6);
    animation: voxel-float 3s infinite ease-in-out alternate;
}

@keyframes voxel-float {
    0% {
        transform: translateY(0px) scale(1);
    }
    100% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(18, 10, 36, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel-modern {
    background: rgba(12, 6, 26, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.45), 0 0 30px rgba(0, 240, 255, 0.12);
}

.glass-pill {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-panel-glow {
    background: rgba(20, 10, 42, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2), inset 0 0 15px rgba(0, 240, 255, 0.1);
}

/* Domain Sale Glow Badge */
.sale-badge-glow {
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.2), rgba(0, 240, 255, 0.2));
    border: 1px solid rgba(255, 230, 0, 0.6);
    box-shadow: 0 0 18px rgba(255, 230, 0, 0.4), inset 0 0 10px rgba(255, 0, 127, 0.2);
    animation: badge-pulse 2.2s infinite ease-in-out;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 0 14px rgba(255, 230, 0, 0.4), inset 0 0 8px rgba(255, 0, 127, 0.3);
        border-color: rgba(255, 230, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 28px rgba(0, 240, 255, 0.7), inset 0 0 14px rgba(0, 240, 255, 0.5);
        border-color: rgba(0, 240, 255, 0.9);
    }
}

/* Neon Gradient Buttons */
.btn-neon-primary {
    background: linear-gradient(135deg, #ff007f, #7928ca);
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-neon-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 35px rgba(255, 0, 127, 0.8);
}

.btn-neon-primary:active {
    transform: translateY(1px) scale(0.98);
}

.btn-neon-cyan {
    background: linear-gradient(135deg, #00f0ff, #0072ff);
    color: #070314;
    font-weight: 800;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
    transition: all 0.2s ease;
}

.btn-neon-cyan:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 35px rgba(0, 240, 255, 0.8);
}

.btn-gold-glow {
    background: linear-gradient(135deg, #ffe600, #ff8c00);
    color: #070314;
    font-weight: 900;
    box-shadow: 0 0 25px rgba(255, 230, 0, 0.5);
}

.btn-gold-glow:hover {
    box-shadow: 0 0 35px rgba(255, 230, 0, 0.8);
}

.btn-domain-atom {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.45);
    font-weight: 800;
}

.btn-domain-atom:hover {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.7);
    transform: translateY(-1px) scale(1.01);
}

/* Salivate Rush Screen FX */
#hud-overlay.rush-active {
    box-shadow: inset 0 0 80px rgba(255, 0, 127, 0.4), inset 0 0 140px rgba(0, 240, 255, 0.3);
    animation: rush-border 1.5s infinite alternate;
}

@keyframes rush-border {
    0% {
        box-shadow: inset 0 0 60px rgba(255, 0, 127, 0.5), inset 0 0 120px rgba(0, 240, 255, 0.3);
    }
    100% {
        box-shadow: inset 0 0 90px rgba(255, 230, 0, 0.6), inset 0 0 160px rgba(255, 0, 127, 0.4);
    }
}

/* Floating Score Popups */
.floating-score {
    position: absolute;
    pointer-events: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    transform: translate(-50%, -50%);
    animation: float-up 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
    text-shadow: 0 0 15px currentColor;
    z-index: 40;
}

.tier-1 { color: #ff1e56; }
.tier-2 { color: #9b5de5; }
.tier-3 { color: #ffaa00; }
.tier-4 { color: #00d2ff; }
.tier-5 { color: #ff4500; }
.tier-6 { color: #d946ef; }
.tier-7 { color: #ffe600; font-size: 1.8rem; }
.tier-8 { color: #f43f5e; font-size: 2rem; text-shadow: 0 0 20px #f43f5e, 0 0 35px #ffe600; }

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.6);
    }
    30% {
        transform: translate(-50%, -80px) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -130px) scale(1.0);
    }
}

/* Phone Rotation Animation */
.phone-rotate-anim {
    animation: rotate-phone 2.4s infinite cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

@keyframes rotate-phone {
    0%, 15% {
        transform: rotate(0deg);
        border-color: #ff007f;
    }
    45%, 70% {
        transform: rotate(90deg);
        border-color: #00f0ff;
    }
    85%, 100% {
        transform: rotate(0deg);
        border-color: #ff007f;
    }
}

/* Mandatory Landscape Mode for Devices < 10 inches in Portrait */
@media screen and (max-width: 1024px) and (orientation: portrait), (max-device-width: 1024px) and (orientation: portrait) {
    #orientation-overlay {
        display: flex !important;
    }
    #game-container, #hud-overlay, #start-screen, #game-over-screen, #pause-screen, header {
        pointer-events: none !important;
    }
}

/* Mobile Landscape Layout Tuning (< 10 inches in Landscape) */
@media screen and (max-height: 540px) and (orientation: landscape) {
    header {
        padding: 0.5rem 1rem !important;
    }
    .voxel-title-retro {
        font-size: clamp(1.4rem, 4.8vw, 2.4rem) !important;
        letter-spacing: 2px !important;
        margin-bottom: 0.75rem !important;
        text-shadow: 
            2px 2px 0px #ff007f,
            4px 4px 0px #d9006c,
            6px 6px 0px #7928ca,
            8px 8px 15px rgba(0, 240, 255, 0.8),
            0 0 20px rgba(255, 242, 0, 0.5) !important;
    }
    #start-screen .btn-neon-primary,
    #start-screen .open-sale-modal {
        padding: 0.6rem 1.4rem !important;
        font-size: 0.85rem !important;
    }
    #start-screen .text-xs {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.85rem !important;
    }
    #hud-overlay {
        padding: 0.5rem 1rem !important;
    }
    #hud-overlay .mt-14 {
        margin-top: 0.25rem !important;
    }
    #hud-overlay .glass-panel {
        padding: 0.35rem 0.75rem !important;
        border-radius: 0.75rem !important;
    }
    #hud-score {
        font-size: 1.25rem !important;
    }
    #game-over-screen .glass-panel-modern {
        padding: 1rem 1.25rem !important;
        max-height: 94vh !important;
        overflow-y: auto !important;
    }
    #game-over-screen h2 {
        font-size: 1.5rem !important;
    }
    #game-over-screen .grid {
        margin-bottom: 0.6rem !important;
        gap: 0.4rem !important;
    }
    #game-over-screen .glass-panel {
        padding: 0.4rem 0.6rem !important;
    }
    #game-over-screen .text-xl {
        font-size: 1.1rem !important;
    }
    #sale-modal .glass-panel-glow {
        padding: 1rem !important;
        max-height: 94vh !important;
    }
}
