@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,800&family=Barlow:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #030f1a;
    --panel: rgba(6, 20, 32, 0.92);
    --panel-strong: rgba(8, 26, 42, 0.98);
    --text: #eef8ff;
    --muted: #7fa4bc;
    --line: rgba(255, 255, 255, 0.1);
    --green: #00d46a;
    --gold: #ffc107;
    --red: #ff3d5a;
    --blue: #38b6ff;

    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: #030f1a;
    min-height: 100vh;
}

/* ── FONDO ESTADIO ───────────────────────────────────────── */
.stadium-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    /* Iluminación de arcos de estadio */
    background:
        radial-gradient(ellipse 90% 55% at 50% -8%, rgba(0, 180, 80, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 35% 30% at 10% 50%, rgba(0, 140, 60, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse 35% 30% at 90% 50%, rgba(0, 140, 60, 0.10) 0%, transparent 50%),
        linear-gradient(180deg, #040f1c 0%, #020b14 60%, #010810 100%);
    opacity: 1;
}

/* Franjas de césped */
.stadium-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 44px,
        rgba(0, 160, 60, 0.04) 44px,
        rgba(0, 160, 60, 0.04) 88px
    );
}

/* Textura de ruido muy sutil */
.stadium-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero,
.layout { position: relative; z-index: 1; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    padding: 30px;
    align-items: stretch;
}

.hero section,
.qr-card,
.scoreboard-panel,
.register-card,
.install-box {
    border: 1px solid rgba(0, 200, 80, 0.18);
    background: var(--panel);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03) inset,
        0 20px 70px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 24px;
}

.hero section {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 3px solid var(--green);
    background: linear-gradient(135deg, rgba(0,180,70,0.07) 0%, var(--panel) 40%);
}

/* ── EYEBROW ──────────────────────────────────────────────── */
.eyebrow {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 2px;
    background: var(--green);
    border-radius: 2px;
}

/* ── TÍTULOS ──────────────────────────────────────────────── */
h1, h2, h3, p { margin-top: 0; }

h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.88;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    /* Gradiente blanco → verde → dorado */
    background: linear-gradient(160deg, #ffffff 20%, #a8ffcc 60%, #ffc107 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

h3 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-copy {
    max-width: 680px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* ── BOTONES ACCIONES ─────────────────────────────────────── */
.hero-actions,
.install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.btn {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 999px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.06);
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.35); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn.primary {
    background: linear-gradient(135deg, #007a33, #00d46a);
    color: #001a0b;
    border-color: transparent;
    box-shadow: 0 6px 24px rgba(0, 180, 80, 0.35);
}
.btn.primary:hover { box-shadow: 0 0 36px rgba(0, 210, 100, 0.5); }

.btn.success {
    background: linear-gradient(135deg, #005fa3, #38b6ff);
    color: #001624;
    border-color: transparent;
    box-shadow: 0 6px 22px rgba(0, 120, 200, 0.3);
}

.btn.gold {
    background: linear-gradient(135deg, #b37800, #ffc107);
    color: #1a0e00;
    border-color: transparent;
    box-shadow: 0 6px 22px rgba(255, 180, 0, 0.3);
}

.btn.danger {
    background: linear-gradient(135deg, #8b0000, #ff3d5a);
    color: #fff0f0;
    border-color: transparent;
    box-shadow: 0 6px 22px rgba(200, 0, 40, 0.28);
}

.btn.full { width: 100%; }

/* ── QR CARD ─────────────────────────────────────────────── */
.qr-card {
    padding: 24px;
    text-align: center;
    border-color: rgba(255, 193, 7, 0.22);
    background: linear-gradient(160deg, rgba(255,193,7,0.06) 0%, var(--panel) 50%);
}

.qr-card h2 {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 6px;
}

.qr-card img {
    width: 220px;
    height: 220px;
    border-radius: 18px;
    background: white;
    padding: 10px;
    margin: 8px auto 14px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 0 28px rgba(255, 193, 7, 0.15);
    display: block;
}

.qr-card p { color: var(--muted); word-break: break-all; font-size: 0.82rem; }

/* ── LAYOUT ───────────────────────────────────────────────── */
.layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    padding: 0 30px 34px;
}

/* ── PANEL SCOREBOARD ─────────────────────────────────────── */
.scoreboard-panel {
    padding: 20px;
    min-width: 0;
    border-color: rgba(0, 180, 80, 0.14);
}

.groups-panel,
.matches-panel { grid-column: 1 / -1; }

/* ── PANEL TITLE ──────────────────────────────────────────── */
.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 180, 80, 0.15);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.panel-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: var(--green);
    border-radius: 2px;
    margin-right: -10px;
    flex-shrink: 0;
}

.panel-title strong { color: var(--gold); }

/* ── PARTIDO EN VIVO ──────────────────────────────────────── */
.live-match {
    min-height: 280px;
    border-radius: 20px;
    background:
        radial-gradient(ellipse 80% 60% at 50% 30%, rgba(0, 180, 70, 0.14), transparent 70%),
        linear-gradient(160deg, rgba(0,100,40,0.12) 0%, rgba(0,20,40,0.12) 100%);
    border: 1px solid rgba(0, 200, 80, 0.18);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.live-match.empty { color: var(--muted); text-align: center; }

.live-phase {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.live-phase::before, .live-phase::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(255,193,7,0.4));
}
.live-phase::after { background: linear-gradient(270deg, transparent, rgba(255,193,7,0.4)); }

.live-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
    text-align: center;
}

.live-teams strong {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    color: var(--gold);
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px rgba(255,193,7,0.4);
    line-height: 1;
}

.big-flag { font-size: 3.2rem; display: block; margin-bottom: 8px; }

.live-teams h2 {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    margin: 4px 0 4px;
    line-height: 1.2;
}

.live-teams p { color: var(--muted); margin-bottom: 0; font-size: 0.85rem; }

.minute-bar {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 22px;
}

.minute-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--gold));
    border-radius: inherit;
    transition: width 0.08s linear;
}

.minute-text,
.final-result {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-align: center;
    margin: 10px 0 0;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.final-result {
    color: var(--gold);
    font-size: 1rem;
    margin-top: 12px;
}

/* ── PARTICIPANTES ────────────────────────────────────────── */
.participants { display: grid; gap: 10px; }

.participant-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    transition: background 0.2s, transform 0.2s;
}

.participant-card:hover {
    background: rgba(0,200,80,0.06);
    transform: translateX(3px);
}

.participant-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

.participant-card p { margin-bottom: 0; color: var(--muted); font-size: 0.85rem; }

.rank {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.1rem;
    background: rgba(255, 193, 7, 0.12);
    color: var(--gold);
    border: 1px solid rgba(255,193,7,0.25);
}

/* ── GRUPOS ───────────────────────────────────────────────── */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.group-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0,180,70,0.15);
    border-radius: 18px;
    padding: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.group-card:hover { border-color: rgba(0,200,80,0.3); }

.group-card h3 {
    margin-bottom: 14px;
    color: var(--green);
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,200,80,0.15);
}

table { width: 100%; border-collapse: collapse; }

th, td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
    font-size: 0.88rem;
}

th {
    font-family: var(--font-display);
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

td:nth-child(3),
td:nth-child(4),
th:nth-child(3),
th:nth-child(4) { text-align: center; }

.flag { margin-right: 6px; }

tr.qualified td:first-child { color: var(--green); font-weight: 800; }
tr.third td:first-child { color: var(--gold); font-weight: 800; }

/* ── PARTIDOS ─────────────────────────────────────────────── */
.matches-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.match-row {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 14px;
    transition: background 0.2s;
}

.match-row:hover { background: rgba(255,255,255,0.07); }

.phase-pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #001a0b;
    background: var(--green);
    margin-bottom: 10px;
}

.match-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
}

.match-score strong {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.3rem;
    color: var(--gold);
    text-align: center;
    letter-spacing: -0.01em;
}

.match-row small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.8rem;
}

/* ── CAMPEÓN ──────────────────────────────────────────────── */
.champion-box {
    min-height: 160px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 20px;
    border: 1px solid rgba(255, 193, 7, 0.4);
    background:
        radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255,193,7,0.18), transparent 70%),
        rgba(20, 10, 0, 0.5);
    padding: 24px;
    box-shadow: 0 0 40px rgba(255,193,7,0.1) inset;
}

.champion-box.empty,
.empty-state { color: var(--muted); }

.champion-flag {
    font-size: 4.5rem;
    display: block;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.champion-box h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--gold);
    text-shadow: 0 0 24px rgba(255,193,7,0.4);
}

/* ── TOAST ────────────────────────────────────────────────── */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 20;
    padding: 14px 20px;
    border-radius: 999px;
    background: var(--panel-strong);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 14px 48px rgba(0,0,0,0.4);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok { border-color: rgba(0, 200, 80, 0.7); color: var(--green); }
.toast.error { border-color: rgba(255, 60, 90, 0.7); color: var(--red); }

/* ── REGISTER PAGE ────────────────────────────────────────── */
.register-page {
    display: grid;
    place-items: center;
    padding: 24px;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -5%, rgba(0,170,70,0.18) 0%, transparent 55%),
        linear-gradient(180deg, #030f1a 0%, #020810 100%);
}

.register-card,
.install-box {
    width: min(100%, 500px);
    padding: 32px;
    text-align: center;
    position: relative;
    z-index: 1;
    border-color: rgba(0,200,80,0.2);
    background: linear-gradient(160deg, rgba(0,180,70,0.07) 0%, rgba(6,20,32,0.95) 40%);
}

/* Banda de color superior */
.register-card::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--green), #a8ffcc, var(--gold));
    border-radius: 24px 24px 0 0;
    margin: -32px -32px 28px;
}

.ball-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    font-size: 2.4rem;
    background: radial-gradient(circle at 35% 30%, rgba(0,200,80,0.2), rgba(0,200,80,0.05));
    border: 1px solid rgba(0,200,80,0.25);
    box-shadow: 0 0 28px rgba(0,200,80,0.12);
}

.register-card h1 {
    font-size: clamp(1.8rem, 6vw, 2.8rem);
}

.register-card p { color: var(--muted); line-height: 1.7; }

.register-form {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    text-align: left;
}

.register-form label {
    display: grid;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.register-form input {
    width: 100%;
    border: 1px solid rgba(0,200,80,0.2);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.register-form input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,200,80,0.12);
}

.register-form input::placeholder { color: #3d6680; }

.register-response {
    margin-top: 16px;
    min-height: 24px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.register-response.ok { color: var(--green); }
.register-response.error { color: var(--red); }

.back-link {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    margin-top: 18px;
    transition: color 0.2s;
}

.back-link:hover { color: var(--green); }

.install-box { margin: 10vh auto; }

/* ── OWNER FUN ────────────────────────────────────────────── */
.owner-fun {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.owner-fun-card {
    min-height: 110px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.owner-fun-card::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    right: -22px;
    bottom: -28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
}

.owner-fun-card span { font-size: 1.7rem; }

.owner-fun-card strong {
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.owner-fun-card p { margin: 0; color: rgba(255,255,255,0.88); font-weight: 700; line-height: 1.35; font-size: 0.92rem; }

.fun-gold { background: linear-gradient(135deg, rgba(255,193,7,0.18), rgba(255,255,255,0.04)); border-color: rgba(255,193,7,0.28); }
.fun-blue { background: linear-gradient(135deg, rgba(56,182,255,0.18), rgba(255,255,255,0.04)); border-color: rgba(56,182,255,0.28); }
.fun-green { background: linear-gradient(135deg, rgba(0,212,106,0.18), rgba(255,255,255,0.04)); border-color: rgba(0,212,106,0.28); }
.fun-red { background: linear-gradient(135deg, rgba(255,61,90,0.15), rgba(255,255,255,0.04)); border-color: rgba(255,61,90,0.28); }

.empty-fun {
    grid-column: 1 / -1;
    min-height: 74px;
    color: var(--muted);
    background: rgba(255,255,255,0.04);
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── BADGES ───────────────────────────────────────────────── */
.participant-card.leader {
    border-color: rgba(255,193,7,0.4);
    background: linear-gradient(135deg, rgba(255,193,7,0.09), rgba(255,255,255,0.04));
}

.mini-badge {
    display: inline-flex;
    vertical-align: middle;
    margin-left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,193,7,0.2);
    color: var(--gold);
}

.green-mini { background: rgba(0,200,80,0.18); color: var(--green); }
.danger-mini { background: rgba(255,61,90,0.18); color: var(--red); }

/* ── CANCHA ANIMADA ───────────────────────────────────────── */
.pitch {
    position: relative;
    min-height: 240px;
    margin-top: 20px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.28);
    background:
        repeating-linear-gradient(90deg,
            rgba(0, 140, 55, 0.82) 0 9%,
            rgba(0, 115, 45, 0.82) 9% 18%
        ),
        linear-gradient(160deg, rgba(0,180,70,0.8), rgba(0,90,35,0.9));
    box-shadow:
        inset 0 0 60px rgba(0,0,0,0.3),
        0 20px 50px rgba(0,0,0,0.25);
}

.pitch::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 2px solid rgba(255,255,255,0.32);
    border-radius: 14px;
}

.pitch-line,
.pitch-circle,
.box,
.goal { position: absolute; pointer-events: none; }

.center-line {
    left: 50%;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(255,255,255,0.32);
}

.pitch-circle {
    left: 50%;
    top: 50%;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255,255,255,0.32);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.box {
    top: 28%;
    width: 17%;
    height: 44%;
    border: 2px solid rgba(255,255,255,0.32);
}

.box-left { left: 10px; border-left: 0; }
.box-right { right: 10px; border-right: 0; }

.goal {
    top: 41%;
    width: 11px;
    height: 18%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.32);
}

.goal-left { left: 0; border-left: 0; }
.goal-right { right: 0; border-right: 0; }

.player-dot {
    position: absolute;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.2), 0 6px 14px rgba(0,0,0,0.35);
    animation: playerPulse 0.9s ease-in-out infinite alternate;
    z-index: 3;
}

.team-a-dot { background: #f0f4ff; border: 2px solid #1a56db; }
.team-b-dot { background: #0f1320; border: 2px solid #ffc107; }

.ball-dot {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 5;
    font-size: 1.3rem;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5));
    animation: ballSpin 0.75s linear infinite;
}

.pitch-minute {
    position: absolute;
    right: 12px;
    top: 10px;
    z-index: 6;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.18);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
}

/* ── PANTALLA GANADOR ─────────────────────────────────────── */
.winner-mode {
    min-height: 520px;
    align-items: center;
}

.winner-card {
    width: min(100%, 640px);
    margin: auto;
    text-align: center;
    border-radius: 24px;
    border: 1px solid rgba(255,193,7,0.5);
    background:
        radial-gradient(ellipse 70% 50% at 50% 20%, rgba(255,193,7,0.22), transparent 55%),
        radial-gradient(ellipse 60% 50% at 50% 80%, rgba(0,200,80,0.16), transparent 55%),
        rgba(4, 14, 24, 0.85);
    padding: 32px;
    box-shadow:
        0 0 60px rgba(255,193,7,0.12),
        0 28px 80px rgba(0,0,0,0.4);
    animation: winnerPop 0.45s ease-out both;
}

.winner-confetti { font-size: 2.2rem; margin-bottom: 10px; animation: confettiDance 0.9s ease-in-out infinite alternate; }

.winner-label {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
}

.winner-flag { font-size: clamp(4rem, 9vw, 7rem); margin: 8px 0; display: block; }

.winner-card h2 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    margin-bottom: 8px;
    color: var(--text);
    text-shadow: 0 0 30px rgba(255,193,7,0.3);
}

.winner-score { color: var(--muted); font-weight: 700; }

/* ── ANIMACIONES ──────────────────────────────────────────── */
@keyframes playerPulse {
    from { scale: 0.9; }
    to { scale: 1.18; }
}

@keyframes ballSpin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

@keyframes winnerPop {
    from { transform: translateY(20px) scale(0.94); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes confettiDance {
    from { transform: translateY(0) rotate(-5deg); }
    to { transform: translateY(-8px) rotate(5deg); }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .hero, .layout { grid-template-columns: 1fr; }
    .groups-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .hero, .layout { padding: 16px; }
    .hero section, .scoreboard-panel, .qr-card { border-radius: 18px; padding: 16px; }
    .groups-grid, .matches-list { grid-template-columns: 1fr; }
    .live-teams, .match-score { grid-template-columns: 1fr; }
    .owner-fun { grid-template-columns: 1fr; }
    .pitch { min-height: 200px; }
    .winner-mode { min-height: 420px; }
    h1 { font-size: clamp(2.4rem, 12vw, 4rem); }
}