:root {
    --tape: #07060A;
    --bone: #E8E4DA;
    --lime: #B6FF1B;
    --magenta: #FF1E8E;
    --orange: #FF5A1F;
    --violet: #6A2BFF;
    --cyan: #1BE7FF;
}

body {
    background-color: var(--tape);
    background-image:
        radial-gradient(ellipse at 12% 8%, rgba(106, 43, 255, 0.16), transparent 36rem),
        radial-gradient(ellipse at 88% 24%, rgba(27, 231, 255, 0.1), transparent 32rem),
        radial-gradient(ellipse at 52% 92%, rgba(255, 30, 142, 0.09), transparent 38rem),
        linear-gradient(rgba(232, 228, 218, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 228, 218, 0.025) 1px, transparent 1px);
    background-size: auto, auto, auto, 48px 48px, 48px 48px;
    background-attachment: fixed;
    color: var(--bone);
    font-family: 'Space Mono', monospace;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.brand-logo-lockup {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.brand-logo-image {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 0 var(--magenta)) drop-shadow(0 0 10px rgba(27, 231, 255, 0.35));
}

.discipline-header {
    background: rgba(7, 6, 10, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px clamp(16px, 4vw, 40px);
}

.discipline-header .brand-logo-image {
    width: 44px;
    height: 44px;
}

.discipline-header > a:last-child {
    font-family: 'VT323', monospace;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    border: 1px solid rgba(232, 228, 218, 0.3);
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.discipline-header > a:last-child:hover {
    color: var(--lime) !important;
    border-color: var(--lime);
    box-shadow: 3px 3px 0 var(--magenta);
}

@media (max-width: 520px) {
    .brand-logo-image {
        width: 38px;
        height: 38px;
    }

    .discipline-header .brand-logo-image {
        width: 38px;
        height: 38px;
    }

    .discipline-header .logo {
        font-size: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1200px) {
    #live-time {
        display: none;
    }

    header nav a {
        white-space: nowrap;
    }
}

/* VHS Scanlines effect */
.scanlines {
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.5)
    );
    background-size: 100% 4px;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

/* Bottoni storti in stile sticker (Animazione non infinita: fa uno scatto e si ferma) */
.crazy-btn {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
    position: relative;
    cursor: pointer;
}
.crazy-btn:nth-child(1) { transform: rotate(-2deg); }
.crazy-btn:nth-child(2) { transform: rotate(1.5deg); }
.crazy-btn:nth-child(3) { transform: rotate(-1deg); }
.crazy-btn:nth-child(4) { transform: rotate(2deg); }

.crazy-btn:hover {
    animation: button-jitter 0.35s ease-in-out forwards;
    box-shadow: 6px 6px 0px #07060A, 8px 8px 0px var(--cyan);
    z-index: 10;
}

@keyframes button-jitter {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-4px, -3px) rotate(-4deg) scale(1.04); }
    40% { transform: translate(3px, 3px) rotate(3deg) scale(0.98); }
    60% { transform: translate(-2px, 1px) rotate(-2deg) scale(1.02); }
    80% { transform: translate(1px, -1px) rotate(1deg) scale(1.01); }
    100% { transform: translate(-2px, -2px) rotate(-1.5deg) scale(1.02); }
}

/* Glitch text effect */
.glitch {
    position: relative;
    display: inline-block;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyan);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--magenta), 0 2px var(--lime);
    clip: rect(85px, 450px, 140px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(11px, 9999px, 33px, 0); }
    40% { clip: rect(65px, 9999px, 12px, 0); }
    60% { clip: rect(81px, 9999px, 52px, 0); }
    80% { clip: rect(22px, 9999px, 78px, 0); }
    100% { clip: rect(45px, 9999px, 99px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(76px, 9999px, 11px, 0); }
    20% { clip: rect(25px, 9999px, 89px, 0); }
    40% { clip: rect(92px, 9999px, 45px, 0); }
    60% { clip: rect(15px, 9999px, 63px, 0); }
    80% { clip: rect(55px, 9999px, 21px, 0); }
    100% { clip: rect(5px, 9999px, 80px, 0); }
}

.interactive-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.interactive-btn:hover {
    transform: translate(-3px, -3px);
    box-shadow: 4px 4px 0px var(--magenta);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #07060A; }
::-webkit-scrollbar-thumb { background: #FF1E8E; }