/* ========== RESET & BASE ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --nice-red: #b10f1d;
    --nice-dark: #0a0a0a;
    --nice-gold: #d4a843;
    --green: #27ae60;
    --field: #1e6b3a;
    --field-line: rgba(255, 255, 255, 0.15);
    --surface: #141414;
    --text: #f0f0f0;
    --text-dim: #888;
    --danger: #e74c3c;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--nice-dark);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

/* ========== SCREENS ========== */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* ========== BUTTONS ========== */
.btn-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 3px;
    padding: 16px 50px;
    border: 2px solid var(--nice-red);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 30px;
}

.btn-main:hover {
    background: var(--nice-red);
    box-shadow: 0 0 30px rgba(177, 15, 29, 0.5);
}

/* ========== INTRO ========== */
.intro-overlay {
    text-align: center;
    padding: 40px;
}

.intro-overlay h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 6rem;
    color: var(--nice-red);
    line-height: 1;
    margin-bottom: 5px;
}

.intro-overlay h2 {
    font-size: 1.5rem;
    color: var(--text-dim);
    font-weight: 400;
}

.subtitle {
    margin-top: 5px;
    color: var(--nice-gold);
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: hidden;
}

.glitch::before {
    animation: glitch1 2.5s infinite linear alternate-reverse;
    color: #0ff;
    clip-path: inset(0 0 70% 0);
}

.glitch::after {
    animation: glitch2 2.5s infinite linear alternate-reverse;
    color: #f0f;
    clip-path: inset(70% 0 0 0);
}

@keyframes glitch1 {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(3px, -3px);
    }

    60% {
        transform: translate(-2px, 1px);
    }

    80% {
        transform: translate(2px, -1px);
    }

    100% {
        transform: translate(0);
    }
}

@keyframes glitch2 {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(3px, -3px);
    }

    40% {
        transform: translate(-3px, 3px);
    }

    60% {
        transform: translate(2px, -1px);
    }

    80% {
        transform: translate(-2px, 1px);
    }

    100% {
        transform: translate(0);
    }
}

/* Standings Preview */
.standings-preview {
    margin: 30px auto 0;
    max-width: 350px;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.standing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.95rem;
    border-bottom: 1px solid #222;
    background: var(--surface);
}

.standing-row.nice {
    background: rgba(177, 15, 29, 0.25);
    border-left: 3px solid var(--nice-red);
    font-weight: 700;
}

.standing-row:last-child {
    border-bottom: none;
}

.pts {
    color: var(--nice-gold);
    font-weight: 700;
}

/* ========== CALENDAR ========== */
.calendar-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
    color: var(--nice-red);
}

#match-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
}

.match-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 14px 20px;
    border-radius: 8px;
    border-left: 4px solid #333;
    cursor: default;
    transition: all 0.3s;
}

.match-card.current {
    border-left-color: var(--nice-red);
    box-shadow: 0 0 15px rgba(177, 15, 29, 0.3);
    cursor: pointer;
}

.match-card.current:hover {
    transform: translateX(5px);
}

.match-card.played {
    opacity: 0.6;
}

.match-card .mc-teams {
    font-weight: 600;
    font-size: 1.05rem;
}

.match-card .mc-info {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.match-card .mc-result {
    font-weight: 900;
    font-size: 1.2rem;
}

.mc-result.win {
    color: var(--green);
}

.mc-result.draw {
    color: var(--nice-gold);
}

.mc-result.loss {
    color: var(--danger);
}

.match-card.cup {
    border-left-color: var(--nice-gold);
    background: linear-gradient(90deg, rgba(212, 168, 67, 0.1), var(--surface));
}

.mc-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--nice-gold);
    color: #000;
    font-weight: 700;
    margin-left: 8px;
}

/* ========== MATCH SCREEN ========== */
#match-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    width: 100%;
    background: linear-gradient(180deg, rgba(177, 15, 29, 0.3), transparent);
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.3rem;
    min-width: 120px;
}

.team-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.score-board {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
}

.score-sep {
    color: var(--text-dim);
    font-size: 2rem;
}

#match-timer {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--nice-gold);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

#match-field {
    flex-grow: 1;
    width: 100%;
    max-width: 700px;
    background: var(--field);
    border: 2px solid #2a8a4a;
    border-radius: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 50% 50%, transparent 80px, var(--field-line) 80px, var(--field-line) 82px, transparent 82px),
        linear-gradient(to bottom, var(--field-line) 1px, transparent 1px);
    background-size: 100% 100%, 100% 50%;
}

.ball {
    font-size: 3rem;
    position: absolute;
    transition: all 0.4s ease;
}

#action-zone {
    text-align: center;
    z-index: 5;
}

#action-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    margin-bottom: 20px;
}

/* QTE Bar */
#qte-container {
    width: 300px;
    margin: 0 auto;
}

#qte-bar {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#qte-target {
    position: absolute;
    height: 100%;
    width: 60px;
    background: rgba(39, 174, 96, 0.5);
    border-left: 2px solid var(--green);
    border-right: 2px solid var(--green);
    left: 50%;
    transform: translateX(-50%);
}

#qte-cursor {
    position: absolute;
    height: 100%;
    width: 6px;
    background: white;
    border-radius: 3px;
    left: 0;
    box-shadow: 0 0 10px white;
    transition: none;
}

.qte-hint {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.qte-hint kbd {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Choice Buttons */
#choice-container {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.choice-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

/* Commentary */
#match-commentary {
    width: 100%;
    max-width: 700px;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-dim);
    text-align: center;
    min-height: 40px;
}

/* ========== RESULT SCREEN ========== */
.result-card {
    text-align: center;
    background: var(--surface);
    padding: 40px 50px;
    border-radius: 12px;
    min-width: 400px;
    border: 1px solid #333;
}

.result-card h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--nice-gold);
    margin-bottom: 15px;
}

.result-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

#result-events {
    text-align: left;
    margin: 15px 0;
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.event-goal {
    color: var(--green);
}

.event-bad {
    color: var(--danger);
}

/* Mini Standing */
#result-standing h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 2px;
    margin: 20px 0 10px;
    color: var(--text-dim);
}

#mini-standing {
    font-size: 0.9rem;
}

.ms-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 4px;
}

.ms-row.nice-row {
    background: rgba(177, 15, 29, 0.25);
    font-weight: 700;
}

.ms-row.relegated {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
}

/* ========== FINALE CINEMATIC ========== */
.finale-cinematic {
    text-align: center;
    padding: 40px;
}

#finale-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    line-height: 1.6;
    max-width: 700px;
    color: var(--text);
}

#finale-text .highlight-red {
    color: var(--danger);
}

#finale-text .highlight-gold {
    color: var(--nice-gold);
}

/* ========== END SCREEN ========== */
.end-card {
    text-align: center;
    padding: 50px;
    max-width: 600px;
}

.end-card h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--nice-red);
    margin-bottom: 10px;
}

.end-card #end-subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin-bottom: 25px;
}

#end-details {
    text-align: left;
    font-size: 1rem;
    line-height: 2;
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--nice-red);
}

/* Flash animation for goals */
.goal-flash {
    animation: goalFlash 0.6s ease;
}

@keyframes goalFlash {
    0% {
        background-color: transparent;
    }

    30% {
        background-color: rgba(255, 255, 255, 0.3);
    }

    100% {
        background-color: transparent;
    }
}

/* Shake for conceded goals */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-4px);
    }
}

/* Typewriter for finale */
.typewriter-line {
    opacity: 0;
    animation: fadeInLine 0.8s ease forwards;
    margin-bottom: 12px;
}

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}