/* ============================================
   QUINIELA MUNDIAL 2026 - ESTILOS
   Mobile-first, temático, app-like
   ============================================ */

:root {
    /* Paleta inspirada en Mundial 2026 (USA/CAN/MEX) */
    --navy: #0a1f3d;
    --navy-dark: #061229;
    --navy-light: #142d52;
    --red: #e63946;
    --red-bright: #ff4554;
    --green: #06d6a0;
    --gold: #ffb627;
    --gold-bright: #ffd60a;
    --white: #f8f9fc;
    --gray-100: #f1f3f8;
    --gray-200: #e1e5ed;
    --gray-400: #98a0b3;
    --gray-600: #5a6478;
    --gray-800: #2a3142;

    --bg: var(--white);
    --surface: #ffffff;
    --surface-2: #f4f6fa;
    --text: var(--navy-dark);
    --text-soft: var(--gray-600);
    --border: var(--gray-200);

    --shadow-sm: 0 1px 2px rgba(10, 31, 61, 0.05);
    --shadow: 0 4px 14px rgba(10, 31, 61, 0.08);
    --shadow-lg: 0 12px 32px rgba(10, 31, 61, 0.12);

    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-display: 'Bebas Neue', 'Impact', sans-serif;
    --font-body: 'Outfit', system-ui, -apple-system, sans-serif;

    --header-h: 56px;
    --bottom-nav-h: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    background: var(--navy);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
}

body.no-nav { padding-bottom: 0; }

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    min-height: var(--header-h);
    box-sizing: content-box;
    padding: 0 16px;
    padding-top: env(safe-area-inset-top, 0px);
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.topbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red) 0%, var(--gold) 50%, var(--green) 100%);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
}

.brand-icon {
    font-size: 24px;
    animation: ballSpin 8s linear infinite;
    display: inline-block;
}

@keyframes ballSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-text {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 2px;
    line-height: 1;
}

.brand-text em {
    color: var(--gold);
    font-style: normal;
}

.user-points {
    background: rgba(255, 182, 39, 0.18);
    border: 1px solid rgba(255, 182, 39, 0.4);
    color: var(--gold);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.user-points small { font-weight: 400; opacity: 0.8; font-size: 11px; }

/* ============================================
   LAYOUT BASE
   ============================================ */
.main-content {
    padding: 16px;
    max-width: 720px;
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--navy);
    margin-bottom: 4px;
    line-height: 1;
}

.page-subtitle {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ============================================
   BOTTOM NAV (app-style)
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    box-sizing: content-box;
    height: var(--bottom-nav-h);
    padding-bottom: var(--safe-bottom);
    box-shadow: 0 -4px 20px rgba(10, 31, 61, 0.06);
}

.nav-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    padding: 0 2px;
}

.nav-item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item svg {
    width: 21px;
    height: 21px;
}

.nav-item.active {
    color: var(--red);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: var(--red);
    border-radius: 0 0 3px 3px;
}

/* ============================================
   CARDS DE PARTIDOS
   ============================================ */
.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}

.match-card:active {
    transform: scale(0.98);
}

.match-card.locked {
    background: linear-gradient(180deg, #fff 0%, #fef9f0 100%);
    border-color: rgba(255, 182, 39, 0.4);
}

.match-card.live {
    background: linear-gradient(135deg, #fff 0%, #f0fdf9 100%);
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green), var(--shadow);
}

.match-card.finished {
    opacity: 0.92;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-soft);
    font-weight: 600;
}

.match-phase-badge {
    background: var(--navy);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
}

.match-phase-badge.group { background: var(--navy); }
.match-phase-badge.knockout { background: var(--red); }

.live-badge {
    background: var(--red);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

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

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

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

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

.team-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    line-height: 1.2;
}

.match-vs {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--gray-400);
    letter-spacing: 1px;
}

.match-score {
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--navy);
    line-height: 1;
}

.match-score.live { color: var(--green); }

/* ============================================
   PREDICCIÓN (inputs)
   ============================================ */
.prediction-box {
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 14px;
    margin-top: 12px;
}

.prediction-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.prediction-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
}

.score-input {
    width: 100%;
    height: 56px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: white;
    font-family: var(--font-display);
    font-size: 28px;
    text-align: center;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s, transform 0.1s;
    -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input:focus {
    outline: none;
    border-color: var(--red);
    transform: scale(1.05);
}

.score-input:disabled {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
}

.score-dash {
    color: var(--gray-400);
    font-family: var(--font-display);
    font-size: 28px;
}

.prediction-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    padding: 0 18px;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--red);
    color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--red-bright); }

.btn-secondary {
    background: var(--navy);
    color: white;
}

.btn-ghost {
    background: var(--surface-2);
    color: var(--navy);
    border: 1px solid var(--border);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: var(--navy-dark);
}

.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 15px; }
.btn-sm { height: 36px; font-size: 13px; padding: 0 12px; }

.btn-icon { padding: 0; width: 44px; flex: none; }

/* Status / Toast de predicción */
.pred-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    display: none;
}
.pred-status.success { background: rgba(6, 214, 160, 0.12); color: #047857; display: block; }
.pred-status.error { background: rgba(230, 57, 70, 0.12); color: #b91c1c; display: block; }

/* ============================================
   LOCKED VIEW (predicciones de otros visibles)
   ============================================ */
.locked-banner {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: var(--navy-dark);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.all-predictions {
    margin-top: 14px;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 12px;
}

.all-predictions h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-soft);
    margin-bottom: 10px;
    font-weight: 700;
}

.pred-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.pred-row:last-child { border-bottom: none; }

.pred-row .pred-user { font-weight: 500; color: var(--navy); }
.pred-row .pred-score {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--navy);
    letter-spacing: 1px;
    background: white;
    padding: 2px 10px;
    border-radius: 6px;
}
.pred-row .pred-points {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    background: rgba(6, 214, 160, 0.12);
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
}
.pred-row .pred-points.zero { color: var(--gray-400); background: var(--gray-100); }

/* ============================================
   PHASE FILTER TABS
   ============================================ */
.phase-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.phase-tabs::-webkit-scrollbar { display: none; }

.phase-tab {
    flex: 0 0 auto;
    background: var(--surface-2);
    color: var(--text-soft);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
}

.phase-tab.active {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

/* ============================================
   STANDINGS (tabla de posiciones)
   ============================================ */
.standings-podium {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 8px;
    align-items: end;
    margin: 24px 0 20px;
}

.podium-spot {
    background: white;
    border-radius: var(--radius);
    padding: 14px 8px 16px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
}

.podium-spot.first {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: var(--navy-dark);
    transform: translateY(-12px);
}
.podium-spot.second { background: linear-gradient(180deg, #d9dde4 0%, #f1f3f8 100%); }
.podium-spot.third { background: linear-gradient(180deg, #e8a368 0%, #f5c397 100%); color: white; }

.podium-medal { font-size: 28px; margin-bottom: 4px; }
.podium-name { font-weight: 700; font-size: 14px; line-height: 1.2; }
.podium-pts { font-family: var(--font-display); font-size: 28px; letter-spacing: 1px; line-height: 1; margin-top: 6px; }
.podium-pts small { font-size: 12px; opacity: 0.7; font-family: var(--font-body); }

.standings-list {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.standings-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}
.standings-row:last-child { border-bottom: none; }
.standings-row.me { background: rgba(255, 182, 39, 0.08); }

.standings-rank {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--gray-400);
    text-align: center;
}
.standings-row.me .standings-rank { color: var(--gold); }

.standings-name { font-weight: 600; color: var(--navy); }
.standings-name small { display: block; font-weight: 400; font-size: 12px; color: var(--text-soft); }

.standings-pts {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--red);
    letter-spacing: 1px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1a3a6b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '⚽';
    position: absolute;
    top: 8%;
    right: -10%;
    font-size: 280px;
    opacity: 0.04;
    animation: ballSpin 30s linear infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--red) 0%, transparent 60%);
    opacity: 0.2;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--gold) 50%, var(--green) 100%);
    border-radius: 0 0 4px 4px;
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo .ball {
    font-size: 48px;
    display: inline-block;
    animation: ballSpin 6s linear infinite;
}

.login-logo h1 {
    font-family: var(--font-display);
    font-size: 36px;
    letter-spacing: 3px;
    color: var(--navy);
    margin-top: 8px;
    line-height: 1;
}

.login-logo p {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-soft);
    margin-top: 6px;
    font-weight: 600;
}

.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--surface-2);
    color: var(--navy);
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--red);
    background: white;
}

.form-error {
    background: rgba(230, 57, 70, 0.1);
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: white;
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.profile-hero::after {
    content: '⚽';
    position: absolute;
    right: -20px;
    top: -20px;
    font-size: 120px;
    opacity: 0.08;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--red) 0%, var(--gold) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-family: var(--font-display);
    font-size: 32px;
    color: white;
    letter-spacing: 1px;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 2px;
    line-height: 1;
}

.profile-handle { font-size: 13px; opacity: 0.7; margin-top: 4px; }

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 18px;
    position: relative;
    z-index: 2;
}

.profile-stat {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 6px;
}
.profile-stat-num {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--gold);
    letter-spacing: 1px;
    line-height: 1;
}
.profile-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-top: 4px;
}

.section-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.section-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 1.5px;
    color: var(--navy);
    margin-bottom: 14px;
}

/* ============================================
   ADMIN
   ============================================ */
.admin-page { background: var(--gray-100); min-height: 100vh; }

.admin-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 16px;
}

.admin-tile {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--navy);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.admin-tile .icon { font-size: 28px; margin-bottom: 6px; display: block; }
.admin-tile .label { font-weight: 600; font-size: 13px; }

table.admin-table {
    width: 100%;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border-collapse: collapse;
    box-shadow: var(--shadow-sm);
    font-size: 13px;
}
.admin-table th, .admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.admin-table th { background: var(--navy); color: white; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .row-actions { display: flex; gap: 6px; }

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

/* ============================================
   UTILIDADES
   ============================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-soft);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.badge.green { background: rgba(6, 214, 160, 0.15); color: #047857; }
.badge.red { background: rgba(230, 57, 70, 0.15); color: #b91c1c; }
.badge.gold { background: rgba(255, 182, 39, 0.15); color: #92651a; }
.badge.gray { background: var(--gray-100); color: var(--gray-600); }

.text-center { text-align: center; }
.text-muted { color: var(--text-soft); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.flex { display: flex; gap: 8px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.hidden { display: none !important; }

/* Day separator */
.day-separator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 10px;
    font-family: var(--font-display);
    letter-spacing: 2px;
    color: var(--navy);
    font-size: 16px;
}
.day-separator::before, .day-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

@media (min-width: 640px) {
    .main-content { padding: 24px; }
    .page-title { font-size: 40px; }
    .match-score { font-size: 40px; }
    .score-input { height: 64px; font-size: 32px; }
}

/* ============================================
   REFRESCO (animación icono) + PALMARÉS + CONFETI
   ============================================ */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Botón palmarés */
.palmares-trigger {
    width: 100%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: var(--navy-dark);
    border: none;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.1s;
}
.palmares-trigger:active { transform: scale(0.98); }

/* Modal palmarés */
.palmares-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 18, 41, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.palmares-overlay.open { display: flex; }

.palmares-modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: modalPop 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.palmares-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--gold) 50%, var(--green) 100%);
    border-radius: 0 0 4px 4px;
}

.palmares-title {
    font-family: var(--font-display);
    font-size: 30px;
    letter-spacing: 2px;
    color: var(--navy);
    text-align: center;
    line-height: 1;
    margin-bottom: 4px;
}
.palmares-subtitle {
    text-align: center;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-soft);
    margin-bottom: 20px;
}

.palmares-list { display: flex; flex-direction: column; gap: 8px; }

.palmares-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-2);
    border-radius: 12px;
    border-left: 3px solid var(--gold);
}
.palmares-trophy { font-size: 22px; flex: none; }
.palmares-info { flex: 1; line-height: 1.3; }
.palmares-event { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.palmares-winner { font-weight: 700; color: var(--navy); font-size: 15px; }

.palmares-close {
    width: 100%;
    margin-top: 18px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* Confeti */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -20px;
    z-index: 300;
    pointer-events: none;
    will-change: transform;
}
@keyframes confettiFall {
    0% { transform: translateY(-20px) rotateZ(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotateZ(720deg); opacity: 0.9; }
}

/* ============================================
   BOTÓN HOY Y MAÑANA (destacado, junto al título)
   ============================================ */
.hoy-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: var(--navy-dark);
    border: none;
    border-radius: 16px;
    padding: 10px 14px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.05;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 182, 39, 0.45);
    transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
    margin-top: 4px;
    white-space: nowrap;
}
.hoy-btn:active { transform: scale(0.96); }

.hoy-btn-icon {
    font-size: 20px;
    line-height: 1;
}

/* Estado inactivo: cuando NO está seleccionado, se ve apagado */
.hoy-btn:not(.active) {
    background: var(--surface-2);
    color: var(--gray-600);
    box-shadow: none;
    border: 1px solid var(--border);
}

/* Estado activo: pulso sutil para llamar la atención */
.hoy-btn.active {
    animation: hoyPulse 2.2s ease-in-out infinite;
}
@keyframes hoyPulse {
    0%, 100% { box-shadow: 0 6px 18px rgba(255, 182, 39, 0.45); }
    50% { box-shadow: 0 6px 26px rgba(255, 182, 39, 0.75); }
}
