﻿/* Import a bold, modern sports-style font */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #0c0d10;
    --card-bg: #16181e;
    --card-border: #21242c;
    --accent: #57caff;
    --accent-soft: rgba(87, 202, 255, 0.12);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --winner: #3bff8c;
    --radius: 14px;
    --max-width: 1100px;
    --gap: 16px;
    --shadow: 0 0 14px rgba(0,0,0,0.55);
    --card-padding-vertical: 12px;
    --card-padding-horizontal: 14px;
    --team-name-size: 0.85rem;
    --team-score-size: 1.3rem;
    --match-title-size: 0.9rem;
    --winner-badge-size: 0.75rem;
    --status-label-size: 0.72rem;
}

/* ---------- PAGE STYLE ---------- */

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-main);
    font-family: "Inter", sans-serif;
    min-height: 100vh;
}

header {
    width: 100%;
    padding: 26px 0 18px;
    text-align: center;
    color: var(--text-main);
    font-family: "Anton", sans-serif;
    font-size: 2.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #0c0d10 80%, rgba(12,13,16,0) 100%);
}

/* Optional subtitle */
header .subtitle {
    font-family: "Inter";
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---------- MATCHES LAYOUT ---------- */

#matches {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* ---------- MATCH CARD ---------- */

#matches > div {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

/* If finished, reduce brightness */
#matches > div.finished {
    opacity: 0.75;
}

/* ---------- TEAMS SECTION ---------- */

.match-teams {
    display: flex;
    align-items: center;
    gap: 20px;
}

.team {
    text-align: center;
    min-width: 100px;
}

.team .name {
    font-weight: 700;
    font-size: var(--team-name-size);
    color: var(--text-main);
    text-transform: uppercase;
}

.team .score {
    font-family: "Anton", sans-serif;
    font-size: var(--team-score-size);
    margin-top: 4px;
    color: var(--accent);
}

/* VS text */
.vs {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- META SECTION ---------- */

.match-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 4px;
}

.map {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Winner badge */
.winner-badge {
    background: var(--accent-soft);
    color: var(--winner);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--winner-badge-size);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Finished label */
.finished-label {
    background: #3a2c00;
    color: #ffd369;
    font-size: var(--status-label-size);
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 680px) {
    #matches > div {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 14px;
    }

    .match-meta {
        text-align: center;
    }

    .team {
        min-width: 0;
    }
}
/* Make the card layout vertical instead of horizontal */
#matches > div {
    display: flex;
    flex-direction: column;   /* <-- THIS forces title on its own row */
    padding: var(--card-padding-vertical) var(--card-padding-horizontal);
    border-radius: 10px;
    gap: 10px;
    font-size: 0.9rem;
}

/* Title always on top, full width */
.match-header {
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--card-border);
}

/* Title styling */
.match-title {
    font-family: "Anton", sans-serif;
    font-size: var(--match-title-size);
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* The lower content stays grouped */
.match-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Pending = no scores yet */
.pending-label {
    background: #433d27;
    color: #ffd369;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* In Progress = match started */
.inprogress-label {
    background: #182c36;
    color: #57caff;
    font-size: var(--status-label-size);
    padding: 3px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.xmas-letter {
    display: inline-block;
    font-family: "Anton", sans-serif;
    font-size: 2.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: xmasColors 4s linear infinite;
    animation-delay: calc(var(--i) * 0.1s); /* stagger letters */
}

/* keyframes cycle through Christmas colors smoothly */
@keyframes xmasColors {
    0%   { color: #ff4d4d; } /* red */
    25%  { color: #1ed760; } /* green */
    50%  { color: #ffd700; } /* gold */
    75%  { color: #1ed760; } /* green again */
    100% { color: #ff4d4d; } /* back to red */
}

/* Snow container covers entire screen */
.snow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* clicks pass through */
    z-index: 0; /* behind all content */
    overflow: hidden;
}

/* Each snowflake */
.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 8px;
    opacity: 0.8;
    user-select: none;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Falling animation */
@keyframes fall {
    0% { transform: translateY(0) translateX(0); opacity: 0.8; }
    100% { transform: translateY(110vh) translateX(30px); opacity: 0.2; }
}

#countdown {
    font-family: "Inter", sans-serif;
    font-size: 1.2rem;
    color: #ffd700; /* golden color for visibility */
    margin-top: 8px;
    text-align: center;
    letter-spacing: 1px;
}