@font-face {
    font-family: 'GreenEnergy';
    src: url('../assets/GreenEnergy.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --text-shadow: 0 0 12px rgba(255, 255, 255, 1), 0 0 24px rgba(255, 255, 255, .8), 0 0 36px rgba(255, 255, 255, .6);
    --white: #fff;
    --pad: clamp(12px, 2vw, 24px);
}

* {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    cursor: none !important;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    color: var(--white);
    font-family: 'GreenEnergy', Arial, sans-serif;
    background: #000;
    scrollbar-color: var(--white) black;
}

/* BG */
.bg {
    position: fixed;
    inset: 0;
    z-index: -3;
}

.bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.backdrop {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .55) 65%, rgba(0, 0, 0, .9));
    pointer-events: none;
}

/* CRT EFFECT */
.crt-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 255, 255, .08), rgba(0, 0, 0, 0.3));
    mix-blend-mode: overlay;
    backdrop-filter: contrast(1.05) saturate(1.1);
    animation: crt-glitch 1s infinite linear alternate, crt-scanlines 0.05s infinite;
}

@keyframes crt-glitch {
    0% { transform: translate(0, 0) skew(0deg); filter: hue-rotate(0deg) brightness(1); }
    20% { transform: translate(-10px, 5px) skew(1deg); filter: hue-rotate(20deg) brightness(1.2); }
    40% { transform: translate(10px, -5px) skew(-1deg); filter: hue-rotate(-20deg) brightness(0.8); }
    60% { transform: translate(-15px, 8px) skew(1.5deg); filter: hue-rotate(30deg) brightness(1.3); }
    80% { transform: translate(15px, -8px) skew(-1.5deg); filter: hue-rotate(-30deg) brightness(0.7); }
    100% { transform: translate(0, 0) skew(0deg); filter: hue-rotate(0deg) brightness(1); }
}

@keyframes crt-scanlines {
    0% { background-image: linear-gradient(rgba(255, 0, 0, 0.2) 1px, transparent 1px); }
    50% { background-image: linear-gradient(rgba(0, 255, 0, 0.2) 1px, transparent 1px); }
    100% { background-image: linear-gradient(rgba(0, 0, 255, 0.2) 1px, transparent 1px); }
}

.fisheye {
    position: fixed;
    inset: 0;
    z-index: 3999;
    pointer-events: none;
    backdrop-filter: contrast(1.05);
    transform: scale(1.02);
    border-radius: 50% / 45%;
    overflow: hidden;
}

/* LAYOUT */
.stage {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo img {
    max-width: clamp(200px, 30vw, 420px);
    filter: drop-shadow(0 0 24px rgba(255, 255, 255, 1)) brightness(1.2);
}

/* NAV */
.nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: clamp(-6px, -1.8vh, -14px);
}

.nav a {
    font-size: clamp(22px, 3vw, 44px);
    text-decoration: none;
    color: var(--white);
    opacity: .92;
    text-shadow: var(--text-shadow);
    position: relative;
    display: inline-block;
    transition: transform .35s ease, color .35s ease, opacity .35s ease;
    animation: shake 2s infinite;
}

.nav a:hover::before {
    width: 100vw;
}

.nav a:hover {
    color: #000;
    opacity: 1;
    transform: scale(1.18);
}

/* Shake Effect */
@keyframes shake {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-1px, 1px) rotate(-0.5deg); }
    40% { transform: translate(-1px, -1px) rotate(0.5deg); }
    60% { transform: translate(1px, 1px) rotate(-0.5deg); }
    80% { transform: translate(1px, -1px) rotate(0.5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Checkout Form */
.checkout-container {
    width: min(92vw, 600px);
    background: rgba(0, 0, 0, .95);
    margin: clamp(16px, 3vh, 32px) 0 clamp(32px, 4vh, 64px) 0;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: 'GreenEnergy', Arial, sans-serif;
    color: var(--white);
}

.checkout-header {
    font-size: 3rem;
    text-align: center;
    text-shadow: var(--text-shadow);
    margin: 0;
}

.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #333;
    font-size: clamp(10px, 2vw, 20px);
}

.checkout-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.checkout-item-details p {
    margin: 0;
    text-align: end;
    font-size: clamp(14px, 2vw, 28px);
}

.checkout-total {
    font-size: clamp(14px, 2vw, 28px);
    text-align: right;
    margin: 0;
    text-shadow: var(--text-shadow);
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-form label {
    font-size: clamp(12px, 2vw, 20px);
    text-shadow: var(--text-shadow);
}

.checkout-form input {
    padding: 8px;
    font-size: clamp(12px, 2vw, 18px);
    font-family: Arial, sans-serif;
    background: #111;
    border: 1px solid #444;
    color: var(--white);
    border-radius: 4px;
}

.checkout-form #phone:invalid {
    color: red;
}

.checkout-form #email:invalid {
    color: red;
}

.checkout-form button {
    padding: 10px;
    font-size: clamp(14px, 2vw, 28px);
    font-family: 'GreenEnergy', Arial, sans-serif;
    background: #111;
    border: 1px solid #444;
    color: var(--white);
    cursor: pointer;
    text-shadow: var(--text-shadow);
}

.checkout-form button:hover {
    background: #222;
}

/* CROSSHAIR */
.crosshair {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.crosshair.shown {
    opacity: 1;
}

.crosshair-line {
    position: absolute;
    background: var(--white);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.crosshair-horizontal-top, .crosshair-horizontal-bottom {
    width: 100%;
    height: 2px;
}

.crosshair-vertical-left, .crosshair-vertical-right {
    height: 100%;
    width: 2px;
}

/* TV overlay (off on mobile) */
.tv-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    pointer-events: none;
    background: url('../assets/tv.png') no-repeat center;
    background-size: contain;
}

@media (max-width: 768px) {
    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .checkout-container {
        width: 92vw;
    }

    .tv-overlay {
        display: none;
    }

    .crosshair {
        display: none;
    }

    .crosshair.shown {
        display: none;
    }
}