/* =========================================================
   LA POLLA L&P · Mundial 2026
   Estilo: Editorial premium · Imagen de fondo del estadio
   ========================================================= */

:root {
    /* MARCA L&P */
    --lp-red: #B30000;
    --lp-red-dark: #8B0000;
    --lp-red-soft: #F5E6E6;
    --lp-red-glow: rgba(179, 0, 0, 0.18);
    --lp-black: #0A0A0A;
    --lp-graphite: #1A1A1A;
    --lp-charcoal: #2B2B2B;
    --lp-gray: #747474;
    --lp-gray-light: #B5B5B5;
    --lp-gray-soft: #E5E0D8;

    /* FONDOS CLAROS */
    --bg-cream: #FAF8F5;
    --bg-white: #FFFFFF;
    --bg-paper: #F2EEE8;
    --line-soft: rgba(10, 10, 10, 0.08);
    --line-strong: rgba(10, 10, 10, 0.15);

    /* MUNDIAL */
    --field-green: #0F5132;
    --gold: #D4AF37;

    /* TIPOGRAFÍA */
    --font-display: 'Cinzel Decorative', 'Cinzel', serif;
    --font-serif: 'Cinzel', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* SOMBRAS */
    --shadow-xs: 0 1px 3px rgba(10, 10, 10, 0.04);
    --shadow-sm: 0 4px 12px rgba(10, 10, 10, 0.06);
    --shadow-md: 0 12px 32px rgba(10, 10, 10, 0.08);
    --shadow-lg: 0 24px 48px rgba(10, 10, 10, 0.12);
    --shadow-red: 0 12px 32px rgba(179, 0, 0, 0.20);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    color: var(--lp-black);
    background: var(--bg-cream);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
   LOGIN PAGE — IMAGEN DE FONDO DEL ESTADIO
   ========================================================= */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url('https://pollamundial.lozada.com.co/assets/hero-stadium.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(10, 10, 10, 0.55) 0%, rgba(179, 0, 0, 0.35) 100%);
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: fadeUp 0.7s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 32px; right: 32px;
    height: 3px;
    background: var(--lp-red);
    border-radius: 0 0 3px 3px;
}

.login-header {
    margin-bottom: 32px;
    text-align: center;
}

.brand-mark { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.brand-name {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--lp-black);
}
.brand-name .amp { color: var(--lp-red); font-style: italic; font-weight: 400; }
.brand-tag {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--lp-gray);
    text-transform: uppercase;
    margin-top: 4px;
}

.login-hero {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line-soft);
}

.overline {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.32em;
    color: var(--lp-red);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.display-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 56px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.01em;
    margin-bottom: 14px;
    color: var(--lp-black);
}

.display-title .accent-red { color: var(--lp-red); }

.subtitle {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--lp-gray);
}

/* FORM */
.login-form { margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lp-gray);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--lp-black);
    transition: var(--transition);
}

.form-group input::placeholder { color: var(--lp-gray-light); }

.form-group input:focus {
    outline: none;
    border-color: var(--lp-red);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--lp-red-glow);
}

.form-error {
    color: #DC2626;
    font-size: 13px;
    margin: 8px 0;
    min-height: 18px;
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 15px 24px;
    background: var(--lp-red);
    color: var(--bg-white);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: var(--shadow-red);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
    background: var(--lp-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(179, 0, 0, 0.32);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary svg { transition: transform var(--transition); }
.btn-primary:hover svg { transform: translateX(4px); }

.form-help {
    text-align: center;
    font-size: 12px;
    color: var(--lp-gray);
    margin-top: 16px;
}
.form-help a { color: var(--lp-red); font-weight: 600; }
.form-help a:hover { text-decoration: underline; }

/* COUNTDOWN */
.login-footer { padding-top: 24px; border-top: 1px solid var(--line-soft); }

.countdown { text-align: center; }

.cd-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--lp-gray);
    margin-bottom: 14px;
}

.cd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.cd-item {
    background: var(--bg-cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cd-item span {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--lp-red);
    line-height: 1;
}

.cd-item small {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--lp-gray);
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* =========================================================
   APP HEADER (dashboard, ranking)
   ========================================================= */

.main-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-soft);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--lp-black);
}
.amp-small { color: var(--lp-red); font-style: italic; }

.logo-divider {
    width: 1px; height: 18px;
    background: var(--line-strong);
}

.logo-event {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--lp-red);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: auto;
}

.nav-link {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lp-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover { color: var(--lp-black); background: rgba(10,10,10,0.04); }
.nav-link.active { color: var(--lp-black); }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 16px; right: 16px;
    height: 2px;
    background: var(--lp-red);
    border-radius: 2px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 6px 6px;
    background: var(--bg-white);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    box-shadow: var(--shadow-xs);
}

.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--lp-red);
    display: grid; place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--bg-white);
    letter-spacing: 0.04em;
}

.user-info { display: flex; flex-direction: column; gap: 0; line-height: 1.2; }
.user-name { font-size: 13px; font-weight: 600; color: var(--lp-black); }
.user-pts { font-size: 11px; color: var(--lp-gray); }
.user-pts strong { color: var(--lp-red); font-weight: 700; }

.logout-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    color: var(--lp-gray);
    display: grid; place-items: center;
    transition: var(--transition);
}
.logout-btn:hover { background: var(--lp-red-soft); color: var(--lp-red); }

.menu-toggle {
    display: none;
    width: 32px; height: 32px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.menu-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--lp-black);
    transition: var(--transition);
}

/* =========================================================
   HERO STATS
   ========================================================= */

.hero-stats {
    background: var(--bg-white);
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--line-soft);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--bg-cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-card.stat-primary {
    background: linear-gradient(135deg, var(--lp-red) 0%, var(--lp-red-dark) 100%);
    border-color: var(--lp-red);
    color: var(--bg-white);
}

.stat-card.stat-primary::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lp-gray);
    margin-bottom: 8px;
}

.stat-card.stat-primary .stat-label { color: rgba(255,255,255,0.9); }

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--lp-black);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card.stat-primary .stat-value { color: var(--bg-white); }

.stat-value-sm {
    display: block;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--lp-black);
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-card.stat-primary .stat-value-sm { color: var(--bg-white); }

.stat-value small { font-size: 22px; margin-left: 4px; }

.stat-meta {
    display: block;
    font-size: 12px;
    color: var(--lp-gray);
}
.stat-card.stat-primary .stat-meta { color: rgba(255,255,255,0.85); }

/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content { padding: 48px 24px 80px; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.overline-sm {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--lp-red);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--lp-black);
    letter-spacing: 0.01em;
}

.phase-tabs, .filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 4px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}

.tab {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lp-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover { color: var(--lp-black); }

.tab.active {
    background: var(--lp-red);
    color: var(--bg-white);
}

/* =========================================================
   GROUP HEADER (separadores por grupo del Mundial)
   ========================================================= */

.group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--lp-black);
}

.group-header:first-child { margin-top: 0; }

.group-letter {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--lp-red);
    line-height: 1;
}

.group-label {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lp-black);
}

/* =========================================================
   MATCH CARDS
   ========================================================= */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.match-card {
    background: var(--bg-white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--lp-red);
    opacity: 0;
    transition: opacity var(--transition);
}

.match-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.match-card:hover::before { opacity: 1; }

.match-card.locked { opacity: 0.7; }

.match-card.locked::after {
    content: '🔒 CERRADO';
    position: absolute;
    top: 12px; right: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--lp-gray);
    background: var(--bg-paper);
    padding: 4px 10px;
    border-radius: 999px;
}

.match-card.has-result {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-cream) 100%);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.match-meta {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--lp-gray);
    text-transform: uppercase;
}

.match-time {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--lp-red);
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.team-flag {
    font-size: 36px;
    line-height: 1;
}

.team-name {
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--lp-black);
    text-align: center;
    letter-spacing: 0.02em;
}

.vs-divider {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--lp-red);
    letter-spacing: 0.12em;
}

.score-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.score-input {
    width: 100%;
    height: 56px;
    background: var(--bg-cream);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    color: var(--lp-black);
    transition: var(--transition);
}

.score-input:focus {
    outline: none;
    border-color: var(--lp-red);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--lp-red-glow);
}

.score-input:disabled { opacity: 0.6; cursor: not-allowed; }

.score-dash {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--lp-gray-light);
}

.match-card .btn-save {
    width: 100%;
    padding: 11px 16px;
    background: transparent;
    color: var(--lp-red);
    border: 1px solid var(--lp-red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.match-card .btn-save:hover {
    background: var(--lp-red);
    color: var(--bg-white);
}

.match-result {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--lp-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.match-result strong { color: var(--lp-black); }
.match-result.hit { background: #DCFCE7; color: #15803D; }
.match-result.hit strong { color: #15803D; }
.match-result.exact { background: #FEF3C7; color: #92400E; }
.match-result.exact strong { color: #92400E; }
.match-result.miss { background: #FEE2E2; color: #DC2626; }
.match-result.miss strong { color: #DC2626; }

/* =========================================================
   PODIO
   ========================================================= */

.podium {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: end;
    gap: 12px;
    margin-bottom: 48px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.podium-spot {
    background: var(--bg-white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 22px 16px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.medal { font-size: 32px; margin-bottom: 8px; }
.medal.crown { font-size: 42px; }

.podium-name {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-black);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-pts {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--lp-red);
}

.spot-1 .podium-bar { height: 90px; background: linear-gradient(180deg, var(--lp-red) 0%, var(--lp-red-dark) 100%); }
.spot-2 .podium-bar { height: 60px; background: linear-gradient(180deg, #C0C0C0 0%, #909090 100%); }
.spot-3 .podium-bar { height: 40px; background: linear-gradient(180deg, #CD7F32 0%, #8B5A2B 100%); }

.podium-bar {
    margin: 16px -16px -22px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.spot-1 { transform: translateY(-12px); }
.spot-1 .podium-spot {
    border-color: var(--lp-red);
    box-shadow: 0 12px 32px rgba(179, 0, 0, 0.18);
}

/* =========================================================
   RANKING TABLE
   ========================================================= */

.ranking-table-wrap {
    background: var(--bg-white);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.ranking-table thead { background: var(--bg-cream); }

.ranking-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--lp-gray);
    text-transform: uppercase;
    border-bottom: 1px solid var(--line-soft);
}

.ranking-table th.th-num, .ranking-table th.th-rank { text-align: center; }
.ranking-table th.th-pts { text-align: right; }

.ranking-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    vertical-align: middle;
}

.ranking-table tr:last-child td { border-bottom: none; }
.ranking-table tr { transition: var(--transition); }
.ranking-table tr:hover { background: var(--bg-cream); }

.ranking-table .rank-cell {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: var(--lp-gray-light);
    width: 60px;
}

.rank-1 .rank-cell { color: var(--lp-red); }
.rank-2 .rank-cell { color: #909090; }
.rank-3 .rank-cell { color: #8B5A2B; }

.ranking-table .player-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--lp-red);
    display: grid; place-items: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--bg-white);
}

.player-name { font-weight: 600; color: var(--lp-black); }

.area-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--lp-red-soft);
    border: 1px solid rgba(179,0,0,0.2);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--lp-red);
    text-transform: uppercase;
}

.ranking-table .num-cell { text-align: center; color: var(--lp-gray); }
.ranking-table .pts-cell {
    text-align: right;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--lp-red);
}

.ranking-table tr.is-me {
    background: var(--lp-red-soft);
    border-left: 3px solid var(--lp-red);
}
.ranking-table tr.is-me td:first-child { padding-left: 13px; }
.ranking-table tr.is-me:hover { background: var(--lp-red-soft); }

/* =========================================================
   TOAST
   ========================================================= */

.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--lp-black);
    color: var(--bg-white);
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #15803D; }
.toast.error { background: #DC2626; }

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in { animation: fadeIn 0.5s ease-out; }
.fade-up { animation: fadeUp 0.6s cubic-bezier(0.2, 0.9, 0.3, 1); }

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--lp-gray);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line-strong);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
    .header-inner { gap: 12px; padding: 12px 20px; }
    .main-nav {
        position: fixed;
        top: 64px; left: 0; right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--line-soft);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px;
        margin: 0;
        transform: translateY(-120%);
        transition: transform 0.3s;
        gap: 0;
        box-shadow: var(--shadow-md);
    }
    .main-nav.open { transform: translateY(0); }
    .nav-link { padding: 14px 16px; font-size: 14px; }
    .nav-link.active::after { display: none; }
    .nav-link.active { background: var(--lp-red-soft); color: var(--lp-red); }
    .menu-toggle { display: flex; }

    .user-info { display: none; }

    .login-card { padding: 36px 24px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .section-header { align-items: flex-start; }
    .phase-tabs, .filter-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .tab { flex-shrink: 0; }

    .matches-grid { grid-template-columns: 1fr; gap: 16px; }
    .match-card { padding: 20px; }

    .podium { grid-template-columns: 1fr; gap: 12px; }
    .spot-1 { transform: none; order: -1; }
    .podium-bar { display: none; }
    .podium-spot { border-radius: var(--radius-lg); padding: 20px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .display-title { font-size: 40px; }
    .cd-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
    .cd-item { padding: 8px 4px; }
    .cd-item span { font-size: 20px; }
    .ranking-table { font-size: 13px; }
    .ranking-table th, .ranking-table td { padding: 10px 8px; }
    .th-area, .area-cell { display: none; }
}
