/* ProFútbolBase Mundial — Brand Design System */
:root {
    --pfb-navy: #201E40;
    --pfb-navy-dark: #1a1835;
    --pfb-navy-light: #2a2854;
    --pfb-yellow: #F4E600;
    --pfb-yellow-hover: #e6d900;
    --pfb-green: #00b87b;
    --pfb-blue: #1e7df7;

    --bg: var(--pfb-navy);
    --bg-elevated: var(--pfb-navy-dark);
    --surface: var(--pfb-navy-light);
    --surface-hover: #32305f;
    --text: #f3f3f3;
    --text-muted: #c5c3dc;
    --text-dim: #8f8db0;
    --accent: var(--pfb-yellow);
    --accent-hover: var(--pfb-yellow-hover);
    --accent-dim: rgba(244, 230, 0, 0.12);
    --accent-on: var(--pfb-navy);
    --border: rgba(243, 243, 243, 0.1);
    --border-strong: rgba(243, 243, 243, 0.18);
    --success: var(--pfb-green);
    --warning: #f2e500;
    --error: #e05c5c;
    --info: var(--pfb-blue);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --font-sans: 'Montserrat', system-ui, sans-serif;
    --font-display: 'Montserrat', system-ui, sans-serif;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --transition: 0.2s ease;
    --container-gutter: clamp(1rem, 4vw, 3rem);
    --btn-gradient: linear-gradient(110deg, var(--pfb-navy) 86%, var(--pfb-yellow) 0%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

.container {
    width: 100%;
    max-width: none;
    padding-inline: var(--container-gutter);
    margin-inline: auto;
    box-sizing: border-box;
}
.container.narrow {
    max-width: none;
    width: 100%;
}

.tabular { font-variant-numeric: tabular-nums; }

/* Top bar + Header */
.site-topbar {
    background: #ffffff;
    color: var(--pfb-navy);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: right;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(32, 30, 64, 0.08);
}
.site-topbar a {
    color: var(--pfb-navy);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.site-topbar a:hover { color: var(--pfb-blue); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(32, 30, 64, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--pfb-yellow);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
}

.logo:hover { color: var(--text); }

.logo-img {
    height: 38px;
    width: auto;
    max-width: min(220px, 42vw);
    object-fit: contain;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text small {
    font-size: 0.68rem;
    color: var(--pfb-yellow);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-logo {
    height: 42px;
    width: auto;
    max-width: 200px;
    margin-bottom: 1rem;
}

.footer-pfb-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pfb-yellow);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.footer-pfb-link:hover { color: #ffffff; }

/* v2.4 improvements */
.auth-shield {
    width: min(140px, 35vw);
    height: auto;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}
.auth-forgot {
    text-align: right;
    margin: -0.25rem 0 1rem;
    font-size: 0.82rem;
}
.auth-forgot a { color: var(--pfb-blue); }
.dynamic-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition);
}
.dynamic-card-link:hover {
    color: inherit;
    transform: translateY(-3px);
    border-color: rgba(244, 230, 0, 0.35);
}
.dynamic-go {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pfb-yellow);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.predict-filters { margin-bottom: 1.5rem; flex-wrap: wrap; }
.predict-empty { padding: 2rem; text-align: center; }
.match-highlight {
    outline: 2px solid var(--pfb-yellow);
    outline-offset: 4px;
    animation: matchPulse 2s ease;
}
@keyframes matchPulse {
    0%, 100% { outline-color: var(--pfb-yellow); }
    50% { outline-color: transparent; }
}
.timeline-body { display: grid; gap: 0.35rem; }
.timeline-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.calendar-match {
    grid-template-columns: 100px 1fr auto;
}
.calendar-match-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}
.calendar-pred {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}
.badge-finished { background: rgba(143, 141, 176, 0.2); color: var(--text-dim); }
.badge-closed { background: rgba(224, 92, 92, 0.15); color: var(--error); }
.form-check .checkbox-label { align-items: flex-start; }
.instagram-embed-wrap {
    margin-top: 1rem;
    max-width: 400px;
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.instagram-embed-wrap iframe {
    width: 100%;
    min-height: 480px;
    border: 0;
}
@media (max-width: 900px) {
    .calendar-match { grid-template-columns: 1fr; }
    .calendar-match-status { align-items: flex-start; }
}

/* v2.5 */
.verify-shield { margin: 0 auto 1rem; display: block; }
.verify-pending-box {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: var(--radius);
    text-align: center;
}
.verify-pending-box p { color: var(--text-muted); margin: 1rem 0; }
.verify-pending-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.row-review { background: rgba(244, 230, 0, 0.04); }
.admin-alert-text { color: var(--pfb-yellow); font-size: 0.9rem; margin-top: 0.35rem; }
.admin-stat-alert { border-color: rgba(244, 230, 0, 0.35); }
.admin-stat-link {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--pfb-yellow);
    text-transform: uppercase;
}
.admin-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.admin-inline-form { display: inline; }
.profile-alert {
    padding: 1.25rem;
    background: rgba(244, 230, 0, 0.08);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.profile-alert p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.92rem; }
.profile-alert-info { background: var(--surface); border-color: var(--border); }
.prize-zone-box {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(244, 230, 0, 0.12), rgba(32, 30, 64, 0.5));
    border: 1px solid rgba(244, 230, 0, 0.3);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.prize-zone-box h2 { font-size: 1.25rem; margin: 0.25rem 0 0.5rem; color: var(--pfb-yellow); }
.prize-zone-box p { color: var(--text-muted); font-size: 0.92rem; }
.profile-stats-compact { margin-bottom: 0; }
.profile-activity { max-width: none; }
.error-page { text-align: center; }
.error-page .auth-shield { margin-inline: auto; }
.error-page .hero-cta { justify-content: center; }

.main-nav { display: flex; gap: 1.75rem; justify-content: center; }
.main-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--pfb-yellow); }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-image: var(--btn-gradient);
    color: #ffffff;
    border-color: var(--pfb-navy);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 0;
}
.btn-primary:hover {
    filter: brightness(1.08);
    color: #ffffff;
    border-color: var(--pfb-yellow);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: transparent;
}
.btn-ghost:hover { color: var(--text); }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Flash messages */
.flash {
    padding: 0.85rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}
.flash-success { background: rgba(76, 175, 122, 0.15); color: var(--success); }
.flash-error { background: rgba(224, 92, 92, 0.15); color: var(--error); }
.flash-warning { background: rgba(232, 168, 56, 0.15); color: var(--warning); }
.flash-info { background: rgba(92, 159, 212, 0.15); color: var(--info); }

/* Hero */
.hero {
    position: relative;
    min-height: min(100dvh, 900px);
    display: grid;
    align-items: end;
    overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--pfb-navy) 0%,
        rgba(32, 30, 64, 0.88) 45%,
        rgba(32, 30, 64, 0.55) 100%
    );
}

.hero-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
    padding: 4rem 0 5rem;
}

.hero-content {
    position: relative;
    max-width: 680px;
}

.hero-shield {
    width: min(220px, 28vw);
    height: auto;
    opacity: 0.95;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.4));
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: var(--accent-dim);
    color: var(--pfb-yellow);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 0;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--pfb-yellow);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}
.hero-title .hero-highlight { color: var(--pfb-yellow); }
.hero-title em { font-style: normal; color: var(--pfb-yellow); }

.hero-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 52ch;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; }
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.25rem;
}

/* Sections */
.section { padding: 5rem 0; }
.section-header { margin-bottom: 3rem; max-width: none; }
.section-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}
.section-desc { color: var(--text-muted); max-width: 55ch; }

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step-card {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}
.step-card:hover { border-color: var(--border-strong); }

.step-num {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.step-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.step-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1rem; }
.step-link { font-size: 0.88rem; font-weight: 600; }

/* Dynamics grid */
.dynamics-grid, .dynamics-play-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.dynamic-card, .play-card {
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.dynamic-card:hover, .play-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.play-card.locked { opacity: 0.65; }
.play-card.active { border-color: rgba(244, 230, 0, 0.25); }

.dynamic-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    margin-bottom: 1rem;
    position: relative;
}
.dynamic-icon::after {
    content: '';
    position: absolute;
    inset: 10px;
    border: 2px solid var(--accent);
    border-radius: 4px;
}
.icon-target::after { border-radius: 50%; }
.icon-brain::after { border-radius: 50% 50% 4px 4px; }
.icon-users::after { border-radius: 2px; width: 60%; left: 20%; }
.icon-flame::after { border-radius: 50% 50% 2px 2px; border-bottom: none; }
.icon-camera::after { border-radius: 4px; }
.icon-gift::after { border-radius: 4px 4px 2px 2px; width: 55%; left: 22.5%; }

.referral-banner {
    background: rgba(0, 184, 123, 0.12);
    border: 1px solid rgba(0, 184, 123, 0.35);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.referral-banner p { margin: 6px 0 0; font-size: 0.92rem; }
.referral-banner-warn {
    background: rgba(244, 230, 0, 0.12);
    border-color: rgba(244, 230, 0, 0.45);
}

.referral-invite-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}
.referral-code-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 12px;
}
.referral-code-label { font-size: 0.85rem; color: var(--text-muted); }
.referral-code {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--pfb-navy);
    background: rgba(244, 230, 0, 0.25);
    padding: 6px 12px;
    border-radius: 8px;
}
.referral-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.referral-link-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--bg);
}
.referral-share-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.referral-rules {
    margin-bottom: 24px;
}
.referral-rules ol {
    margin: 12px 0 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}
.referral-rules li { margin-bottom: 8px; }
.referral-list-panel h3 { margin-bottom: 12px; }
.referral-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.referral-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.referral-list-date {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.referral-empty { text-align: center; padding: 24px 0; }

.dynamic-card h3, .play-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.dynamic-card p, .play-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.dynamic-meta, .play-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.points { font-size: 0.8rem; font-weight: 600; color: var(--accent); }

.play-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 100px;
}
.badge-active { background: rgba(76, 175, 122, 0.15); color: var(--success); }
.badge-soon { background: rgba(168, 181, 168, 0.1); color: var(--text-dim); }
.badge-warning { background: rgba(232, 168, 56, 0.15); color: var(--warning); }

.locked-label { font-size: 0.82rem; color: var(--text-dim); }

/* Ranking */
.ranking-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}
.ranking-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}
.ranking-intro p { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 45ch; }

.ranking-table-wrap, .ranking-full-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th {
    text-align: left;
    padding: 0.85rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}
.ranking-table td {
    padding: 0.85rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.ranking-table tr:last-child td { border-bottom: none; }
.ranking-table tr:hover td { background: var(--surface-hover); }
.ranking-table tr.top-1 td { background: rgba(244, 230, 0, 0.08); }
.ranking-table tr.top-2 td { background: rgba(192, 192, 192, 0.05); }
.ranking-table tr.top-3 td { background: rgba(205, 127, 50, 0.05); }
.ranking-table tr.is-me td { background: rgba(92, 159, 212, 0.08); }

.rank-cell { font-weight: 700; color: var(--text-dim); width: 50px; }
.score-cell { font-weight: 600; color: var(--accent); }
.prize-cell { color: var(--text-muted); font-size: 0.85rem; }
.empty-row { text-align: center; color: var(--text-dim); padding: 2rem !important; }
.me-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 4px;
    vertical-align: middle;
}

/* CTA */
.cta-final { padding: 3rem 0 6rem; }
.cta-box {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.cta-box h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 0.75rem;
}
.cta-box p { color: var(--text-muted); margin-bottom: 2rem; }

/* Page hero compact */
.page-hero {
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border);
}
.page-hero-compact { padding: 3rem 0 2rem; }
.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.5rem;
}
.page-hero p { color: var(--text-muted); max-width: 55ch; }

.back-link {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}
.back-link:hover { color: var(--accent); }

.user-score-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.user-score-item { display: flex; flex-direction: column; }
.user-score-item .label { font-size: 0.72rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.user-score-item .value { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.user-score-item.highlight .value { font-size: 2rem; }

/* Auth */
.auth-page { padding: 3rem 0 5rem; }
.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.auth-grid-narrow { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }

.auth-info h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}
.auth-info > p { color: var(--text-muted); margin-bottom: 2rem; }

.auth-checklist {
    list-style: none;
    margin-bottom: 2rem;
}
.auth-checklist li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.auth-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.social-follow-box {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.social-follow-box h3 { font-size: 0.95rem; margin-bottom: 1rem; }
.social-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); }

.auth-form {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.auth-form h2 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.form-intro { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color var(--transition);
}
.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group small { display: block; margin-top: 0.35rem; font-size: 0.78rem; color: var(--text-dim); }

.checkbox-label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.checkbox-label input { margin-top: 0.2rem; accent-color: var(--accent); }

.auth-alt {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-dim);
}

/* Verify */
.verify-box {
    padding: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.verify-box h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 0.75rem;
}
.verify-box > p { color: var(--text-muted); margin-bottom: 2rem; }

.verify-steps { margin-bottom: 2rem; }
.verify-step {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.verify-step:last-child { border-bottom: none; }
.verify-step .step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
}
.verify-step h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.verify-step p { color: var(--text-muted); font-size: 0.88rem; }

.social-links-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }

.verify-form { margin-top: 1.5rem; }
.verify-form .checkbox-label { margin-bottom: 1.5rem; }

/* Prizes */
.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 4rem;
}

.prize-card {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}
.prize-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
}
.prize-tier-1::before { background: #c0c0c0; }
.prize-tier-2::before { background: #cd7f32; }

.prize-position {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}
.prize-card h2 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.prize-card p { color: var(--text-muted); font-size: 0.88rem; }

.prizes-rules {
    padding: 2.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.prizes-rules h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.prizes-rules ul {
    list-style: none;
    margin-bottom: 2rem;
}
.prizes-rules li {
    padding: 0.5rem 0 0.5rem 1.25rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.prizes-rules li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Profile */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.profile-stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.profile-stat .value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.profile-stat .label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.profile-info {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.profile-info h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.profile-info dl { display: grid; gap: 1rem; }
.profile-info dt { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.profile-info dd { font-size: 0.95rem; }

.profile-actions { display: flex; gap: 1rem; }

/* Matches / Predictions */
.scoring-info {
    padding: 1.5rem;
    background: var(--accent-dim);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.scoring-info h3 { font-size: 0.95rem; margin-bottom: 0.75rem; }
.scoring-info ul { list-style: none; }
.scoring-info li { font-size: 0.88rem; color: var(--text-muted); padding: 0.25rem 0; }

.matches-list { display: grid; gap: 1rem; }

.match-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.match-card.finished { opacity: 0.7; }

.match-meta { display: flex; gap: 1rem; margin-bottom: 0.5rem; }
.match-group { font-size: 0.75rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; }
.match-date { font-size: 0.78rem; color: var(--text-dim); }

.match-teams { display: flex; align-items: center; gap: 0.75rem; }
.team { font-weight: 600; font-size: 1rem; }
.vs { font-size: 0.78rem; color: var(--text-dim); }

.prediction-form { display: flex; align-items: center; gap: 1rem; }
.score-inputs { display: flex; align-items: center; gap: 0.5rem; }
.score-inputs input {
    width: 56px;
    padding: 0.6rem;
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-sans);
}
.score-inputs input:focus { outline: none; border-color: var(--accent); }
.score-sep { color: var(--text-dim); }

.match-result { text-align: right; }
.final-score { font-size: 1.25rem; font-weight: 700; display: block; }
.points-earned { font-size: 0.82rem; color: var(--success); font-weight: 600; }

/* Trivia */
.trivia-list { display: grid; gap: 1.25rem; }

.trivia-card {
    padding: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.trivia-card.correct { border-color: rgba(76, 175, 122, 0.3); }
.trivia-card.wrong { border-color: rgba(224, 92, 92, 0.2); }

.trivia-num { font-size: 0.72rem; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.trivia-card h3 { font-size: 1.05rem; margin: 0.5rem 0 1.25rem; line-height: 1.4; }

.trivia-options { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.trivia-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition);
    font-size: 0.92rem;
}
.trivia-option:hover { border-color: var(--border-strong); }
.trivia-option input { accent-color: var(--accent); }

.trivia-result p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.correct-answer { font-size: 0.85rem; color: var(--success); }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 0;
    margin-top: 2rem;
    background: var(--bg-elevated);
}
.footer-cta {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(244, 230, 0, 0.08) 0%, rgba(32, 30, 64, 0.4) 55%, transparent 100%);
}
.footer-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-block: 1.75rem;
    flex-wrap: wrap;
}
.footer-mundial-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    margin-bottom: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-on);
    background: var(--accent);
    border-radius: 100px;
}
.footer-cta-text {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 52ch;
    margin: 0;
}
.footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-block: 3rem;
}
.footer-brand .logo-mark { margin-bottom: 1rem; }
.footer-brand-logo { display: inline-block; }
.footer-brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 38ch;
    line-height: 1.55;
    margin-top: 0.25rem;
}
.footer-links h4, .footer-social h4 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 1rem;
}
.footer-links ul {
    list-style: none;
    display: grid;
    gap: 0.15rem;
}
.footer-links a {
    display: inline-block;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 0.28rem 0;
    transition: color var(--transition), transform var(--transition);
}
.footer-links a:hover {
    color: var(--text);
    transform: translateX(2px);
}
.footer-social-links {
    display: grid;
    gap: 0.55rem;
}
.footer-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.footer-social-btn:hover {
    color: var(--text);
    border-color: rgba(244, 230, 0, 0.25);
    background: rgba(244, 230, 0, 0.06);
}
.footer-social-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}
.footer-social-icon-ig {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='2' width='20' height='20' rx='5'/%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Cline x1='17.5' y1='6.5' x2='17.51' y2='6.5'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='2' width='20' height='20' rx='5'/%3E%3Cpath d='M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z'/%3E%3Cline x1='17.5' y1='6.5' x2='17.51' y2='6.5'/%3E%3C/svg%3E");
}
.footer-social-icon-tiktok {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16.6 5.82s.51.5 2.2.67v2.08a5.87 5.87 0 0 1-2.2-.36v6.35a4.23 4.23 0 1 1-4.24-4.23v2.08a2.15 2.15 0 1 0 1.52 2.06V2h2.08a3.62 3.62 0 0 0 1.9 3.82z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M16.6 5.82s.51.5 2.2.67v2.08a5.87 5.87 0 0 1-2.2-.36v6.35a4.23 4.23 0 1 1-4.24-4.23v2.08a2.15 2.15 0 1 0 1.52 2.06V2h2.08a3.62 3.62 0 0 0 1.9 3.82z'/%3E%3C/svg%3E");
}
.footer-social-icon-yt {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22.54 6.42a2.78 2.78 0 0 0-1.95-2C18.88 4 12 4 12 4s-6.88 0-8.59.42a2.78 2.78 0 0 0-1.95 2 29 29 0 0 0-.46 5.58 29 29 0 0 0 .46 5.58 2.78 2.78 0 0 0 1.95 2C5.12 20 12 20 12 20s6.88 0 8.59-.42a2.78 2.78 0 0 0 1.95-2 29 29 0 0 0 .46-5.58 29 29 0 0 0-.46-5.58z'/%3E%3Cpolygon points='9.75 15.02 15.5 12 9.75 8.98 9.75 15.02'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22.54 6.42a2.78 2.78 0 0 0-1.95-2C18.88 4 12 4 12 4s-6.88 0-8.59.42a2.78 2.78 0 0 0-1.95 2 29 29 0 0 0-.46 5.58 29 29 0 0 0 .46 5.58 2.78 2.78 0 0 0 1.95 2C5.12 20 12 20 12 20s6.88 0 8.59-.42a2.78 2.78 0 0 0 1.95-2 29 29 0 0 0 .46-5.58 29 29 0 0 0-.46-5.58z'/%3E%3Cpolygon points='9.75 15.02 15.5 12 9.75 8.98 9.75 15.02'/%3E%3C/svg%3E");
}
.footer-social-note {
    margin-top: 0.85rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.45;
    max-width: 28ch;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.35rem 0 1.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-dim);
}
.footer-bottom-meta {
    display: grid;
    gap: 0.35rem;
    max-width: 60ch;
}
.footer-disclaimer {
    color: var(--text-dim);
    font-size: 0.72rem;
    line-height: 1.4;
}
.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-bottom-links a {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.footer-bottom-links a:hover { color: var(--text); }
.footer-version {
    font-size: 0.72rem;
    color: var(--text-dim);
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 900px) {
    .header-inner { grid-template-columns: auto 1fr auto; }
    .main-nav { display: none; }
    .header-actions .btn-ghost { display: none; }
    .nav-toggle { display: flex; }
    .hide-mobile { display: none !important; }

    .steps-grid { grid-template-columns: 1fr; }
    .ranking-split { grid-template-columns: 1fr; }
    .auth-grid { grid-template-columns: 1fr; gap: 2rem; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-social { grid-column: 1 / -1; }
    .match-card { grid-template-columns: 1fr; }
    .prediction-form { flex-wrap: wrap; }
}

/* Progress */
.section-compact { padding: 2.5rem 0; }
.progress-title { font-size: 1.1rem; margin-bottom: 1.25rem; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.progress-card { padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.progress-card-header { display: flex; justify-content: space-between; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.75rem; }
.progress-bar { height: 6px; background: var(--bg); border-radius: 100px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 100px; transition: width 0.6s ease; }
.progress-fill.fill-trivia { background: var(--success); }
.progress-fill.fill-retos { background: var(--info); }
.progress-label { font-size: 0.75rem; color: var(--text-dim); }

/* Profile breakdown */
.profile-breakdown { padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 2rem; }
.profile-breakdown h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.breakdown-bars { display: grid; gap: 1rem; }
.breakdown-label { display: flex; justify-content: space-between; font-size: 0.88rem; margin-bottom: 0.4rem; }
.highlight-stat { border-color: rgba(244, 230, 0, 0.3); }

/* Activity feed */
.activity-feed { display: grid; gap: 0.75rem; max-width: none; }
.activity-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.activity-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; margin-top: 0.5rem; flex-shrink: 0; }
.activity-action { color: var(--text-muted); margin-left: 0.25rem; }
.activity-time { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 0.15rem; }

/* Rules */
.rules-content { display: grid; gap: 2.5rem; }
.rule-block h2 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 1rem; }
.rule-block h3 { font-size: 1rem; margin: 1.25rem 0 0.5rem; color: var(--accent); }
.rule-block ul { list-style: none; }
.rule-block li { padding: 0.4rem 0 0.4rem 1.25rem; position: relative; color: var(--text-muted); font-size: 0.92rem; }
.rule-block li::before { content: ''; position: absolute; left: 0; top: 0.85rem; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.rule-block p { color: var(--text-muted); font-size: 0.92rem; }

/* Weekly challenges */
.weekly-card-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.weekly-desc { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 0.5rem; }
.weekly-closes { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 1rem; }

/* Admin */
.admin-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.admin-nav-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.admin-nav-pills a {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
}
.admin-nav-pills a:hover, .admin-nav-pills a.active { color: var(--text); border-color: var(--accent); }
.admin-nav-pills .pill-danger { color: var(--error); }
.admin-nav-pills .pill-danger:hover { border-color: var(--error); }

.admin-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.admin-stat-card { padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.admin-stat-value { display: block; font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.admin-stat-label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.admin-panel { padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; }
.admin-panel h2 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.admin-two-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem; }

.admin-match-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.admin-meta { font-size: 0.78rem; color: var(--text-dim); display: block; margin-top: 0.5rem; }
.admin-result-form, .admin-result-display { display: flex; align-items: center; gap: 1rem; }
.admin-actions { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.inline-form { display: inline; }

.filter-tabs { display: flex; gap: 0.5rem; margin-top: 1rem; }
.filter-tabs a {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
}
.filter-tabs a.active, .filter-tabs a:hover { color: var(--text); border-color: var(--accent); }

.admin-form .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.admin-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
    resize: vertical;
}
.admin-form select {
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-sans);
}
.mt-sm { margin-top: 0.5rem; }

.admin-question-list { display: grid; gap: 1rem; max-height: 600px; overflow-y: auto; }
.admin-question-item { padding: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.admin-question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.admin-options-list { list-style: none; margin-top: 0.5rem; }
.admin-options-list li { font-size: 0.85rem; color: var(--text-muted); padding: 0.2rem 0; }
.admin-options-list .correct-opt { color: var(--success); font-weight: 600; }
.admin-resolve-form { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.btn-danger-text { color: var(--error) !important; }
.btn-danger-text:hover { color: #ff7b7b !important; }

@media (max-width: 900px) {
    .admin-two-col { grid-template-columns: 1fr; }
    .admin-match-card { grid-template-columns: 1fr; }
    .admin-header-row { flex-direction: column; }
}

/* Header score */
.header-score {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--accent-dim);
    border: 1px solid rgba(244, 230, 0, 0.28);
    border-radius: 100px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}
.header-score:hover { color: var(--accent-hover); border-color: var(--accent); }

/* Upcoming matches */
.upcoming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.upcoming-card {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.upcoming-meta { display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.section-cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.countdown-label { display: block; font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-top: 0.5rem; }

/* Calendar */
.group-block { margin-bottom: 2.5rem; }
.group-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.group-matches { display: grid; gap: 0.5rem; }
.calendar-match {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.calendar-match-date { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-direction: column; }
.calendar-match-teams { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.calendar-score { color: var(--accent); font-weight: 700; }
.matches-timeline { display: grid; gap: 1rem; }
.timeline-match {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.timeline-date { text-align: center; }
.timeline-day { display: block; font-weight: 700; color: var(--accent); }
.timeline-time { font-size: 0.82rem; color: var(--text-dim); }

/* Podium */
.podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 1rem;
    align-items: end;
    max-width: 700px;
    margin: 0 auto;
}
.podium-place {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.podium-gold { padding: 2rem 1rem; border-color: rgba(244, 230, 0, 0.4); background: rgba(244, 230, 0, 0.06); }
.podium-silver { border-color: rgba(192, 192, 192, 0.2); }
.podium-bronze { border-color: rgba(205, 127, 50, 0.2); }
.podium-rank { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent); margin-bottom: 0.25rem; }
.podium-name { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.podium-score { display: block; font-size: 0.9rem; color: var(--text-muted); }
.podium-prize { display: block; font-size: 0.72rem; color: var(--accent); margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* Pending actions */
.pending-box {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: var(--radius);
}
.pending-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.pending-header h2 { font-size: 1.1rem; margin: 0; }
.pending-count {
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
}
.pending-list { list-style: none; display: grid; gap: 0.5rem; }
.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}
.pending-date { display: block; font-size: 0.75rem; color: var(--text-dim); margin-top: 0.15rem; }

/* Profile extras */
.share-box {
    padding: 1.25rem;
    background: var(--accent-dim);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.share-box p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.profile-panel {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.profile-panel h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.auth-form-inline .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 900px) {
    .podium { grid-template-columns: 1fr; }
    .podium-gold { order: -1; }
    .calendar-match { grid-template-columns: 1fr; }
    .header-score { display: none; }
}

/* Lineup picker */
.lineup-form { max-width: 900px; }
.lineup-counter {
    position: sticky;
    top: 70px;
    z-index: 10;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.formation-hint { font-size: 0.82rem; color: var(--text-muted); font-weight: 400; margin-left: 0.5rem; }
.lineup-group { margin-bottom: 2rem; }
.lineup-group h3 { font-size: 1rem; margin-bottom: 0.75rem; display: flex; justify-content: space-between; }
.pos-count { color: var(--accent); font-size: 0.85rem; }
.lineup-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; }
.lineup-player { cursor: pointer; }
.lineup-player input { display: none; }
.player-card {
    display: block;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.player-card strong { display: block; font-size: 0.9rem; }
.player-card small { color: var(--text-dim); font-size: 0.75rem; }
.lineup-player input:checked + .player-card {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.lineup-player input:disabled + .player-card { opacity: 0.4; cursor: not-allowed; }

/* Social submissions */
.submissions-list { margin-top: 2rem; }
.submissions-list h2 { font-size: 1.1rem; margin-bottom: 1rem; }
.submission-card {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}
.submission-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.5rem; }
.submission-card a { font-size: 0.88rem; word-break: break-all; }
.admin-note { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.5rem; font-style: italic; }

/* Admin scorers */
.scorer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 1.5rem; }
.scorer-group h4 { font-size: 0.82rem; color: var(--accent); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.scorer-check { display: block; font-size: 0.85rem; padding: 0.25rem 0; cursor: pointer; }
.scorer-check small { color: var(--text-dim); }
.admin-actions-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; align-items: center; }
.admin-approve-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.pts-input { width: 60px; padding: 0.4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text); }

/* FAQ */
.faq-list { display: grid; gap: 0.5rem; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.faq-item summary {
    padding: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1.25rem 1.25rem; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.faq-cta { text-align: center; margin-top: 3rem; }
.faq-cta p { color: var(--text-muted); margin-bottom: 1rem; }

/* Admin extras v2.2 */
.admin-round-item,
.admin-dynamic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.admin-status-form { display: flex; align-items: center; gap: 0.5rem; }
.admin-dynamic-icon { width: 32px; height: 32px; margin-bottom: 0.35rem; }
.admin-players-table .row-inactive { opacity: 0.55; }
.admin-activity-feed { max-height: 520px; overflow-y: auto; }
.activity-detail { display: block; font-size: 0.78rem; color: var(--text-dim); }
.auth-form-closed { padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.auth-form-closed p { color: var(--text-muted); margin-bottom: 1.25rem; }
.your-prediction { font-size: 0.88rem; color: var(--text-muted); }
.pill-danger { color: var(--error) !important; border-color: rgba(224, 92, 92, 0.3) !important; }

@media (max-width: 900px) {
    .hero-layout { grid-template-columns: 1fr; }
    .hero-shield { display: none; }
}

@media (max-width: 480px) {
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .pending-item { flex-direction: column; align-items: flex-start; }
    .auth-form-inline .form-row { grid-template-columns: 1fr; }
    .lineup-players { grid-template-columns: 1fr; }
    .dashboard-stats { grid-template-columns: repeat(3, 1fr); }
    .dash-value { font-size: 1.35rem; }
}

/* Utilities */
.hide-mobile { display: inline-flex; }

/* Mobile navigation drawer */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}
.mobile-nav.open {
    pointer-events: auto;
    visibility: visible;
}
.mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-nav.open .mobile-nav-backdrop { opacity: 1; }
.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100%;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-user {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.mobile-nav-user strong { font-size: 1.05rem; }
.mobile-nav-user span { font-size: 0.85rem; color: var(--accent); }
.mobile-nav-user a { font-size: 0.85rem; }
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.mobile-nav-links a {
    display: block;
    padding: 0.85rem 0.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition);
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--text);
    background: var(--surface);
}
.mobile-nav-cta {
    margin-top: 0.5rem;
    text-align: center;
    background: var(--accent) !important;
    color: var(--bg) !important;
    border-radius: var(--radius-sm) !important;
}
body.nav-locked { overflow: hidden; }

/* Mobile bottom play bar */
.mobile-play-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(32, 30, 64, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, 1fr);
}
body.user-logged-in .mobile-play-bar { display: grid; }
body.user-logged-in main { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
.mobile-play-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem 0.25rem;
    color: var(--text-dim);
    font-size: 0.68rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}
.mobile-play-bar a:hover,
.mobile-play-bar a.active { color: var(--accent); }
.bar-icon {
    display: block;
    width: 22px;
    height: 22px;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}
.bar-icon-play {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E");
}
.bar-icon-predict {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 20V10M18 20V4M6 20v-4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 20V10M18 20V4M6 20v-4'/%3E%3C/svg%3E");
}
.bar-icon-rank {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6M18 9h1.5a2.5 2.5 0 0 0 0-5H18M4 22h16M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20 7 22M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20 17 22M12 2v7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6M18 9h1.5a2.5 2.5 0 0 0 0-5H18M4 22h16M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20 7 22M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20 17 22M12 2v7'/%3E%3C/svg%3E");
}
.bar-icon-user {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* User dashboard (home) */
.user-dashboard { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
.dashboard-welcome h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0.25rem 0 0.5rem;
}
.dashboard-welcome p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 1rem; }
.dashboard-quick { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.dash-stat {
    text-align: center;
    padding: 1.25rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.dash-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.dash-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}
.dashboard-pending {
    grid-column: 1 / -1;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid rgba(244, 230, 0, 0.15);
    border-radius: var(--radius);
}
.dashboard-pending h3 { font-size: 0.9rem; margin-bottom: 0.75rem; }
.dashboard-pending ul { list-style: none; display: grid; gap: 0.4rem; }
.dashboard-pending a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-decoration: none;
}
.dashboard-pending a:hover { color: var(--accent); }

/* Play card inline progress */
.play-card-progress { margin: 0.75rem 0; }
.play-card-progress .progress-bar { margin-bottom: 0.35rem; }
.play-card-progress .progress-label { font-size: 0.72rem; }

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.revealed,
.no-js .reveal {
    opacity: 1;
    transform: none;
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-stats { order: -1; }
    .mobile-play-bar { display: grid; }
}

@media (min-width: 901px) {
    .mobile-play-bar { display: none !important; }
    body.user-logged-in main { padding-bottom: 0; }
}

/* Tournament stats */
.stats-hero-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.stat-card-lg {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stat-card-lg .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}
.stat-card-lg .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}
.stats-list {
    list-style: none;
    display: grid;
    gap: 0.6rem;
}
.stats-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}
.stats-list li strong { color: var(--text); }
.stats-leaders {
    display: grid;
    gap: 0.5rem;
}
.stats-leader-item {
    display: grid;
    grid-template-columns: 2.5rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.stats-leader-rank {
    font-weight: 700;
    color: var(--accent);
}
.player-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.player-link:hover { color: var(--accent); }
.ranking-table .player-link { font-weight: 500; }
.player-since {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Prizes live preview */
.prizes-live {
    margin: 2.5rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.prizes-live h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}
.prizes-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.prize-live-card {
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.prize-live-card h3 {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.prize-live-card ul {
    list-style: none;
    display: grid;
    gap: 0.4rem;
}
.prize-live-card li {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.prize-live-card a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prize-live-card a:hover { color: var(--accent); }

/* Admin points adjust */
.points-adjust-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.pts-input {
    width: 4rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.82rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.pts-reason {
    width: 6rem;
    padding: 0.3rem 0.4rem;
    font-size: 0.82rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

@media (max-width: 768px) {
    .stats-hero-grid { grid-template-columns: repeat(2, 1fr); }
    .prizes-live-grid { grid-template-columns: 1fr; }
    .points-adjust-form { max-width: 140px; }
    .pts-reason { width: 100%; }
}

/* Admin quick links */
.admin-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.admin-quick-link {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.admin-quick-link:hover {
    color: var(--accent);
    border-color: rgba(244, 230, 0, 0.3);
}

/* Once Ideal activate form */
.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-right: 0.35rem;
}
.activate-round-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Profile actions */
.profile-public-link { margin-bottom: 1rem; }
.profile-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Progress cards as links */
.progress-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, transform 0.2s;
}
.progress-card-link:hover {
    border-color: rgba(244, 230, 0, 0.35);
    transform: translateY(-2px);
}

/* Partidos group nav */
.group-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    position: sticky;
    top: 0.5rem;
    z-index: 10;
    padding: 0.75rem 0;
    background: linear-gradient(to bottom, var(--bg) 70%, transparent);
}
.group-nav-pill {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.group-nav-pill:hover {
    color: var(--accent);
    border-color: rgba(244, 230, 0, 0.3);
}

/* Trivia pending hint */
.trivia-pending-hint { margin-bottom: 0.75rem; }

/* Prediction history (profile) */
.pred-history-list { display: grid; gap: 0.65rem; margin-bottom: 1rem; }
.pred-history-item {
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.pred-history-match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
}
.pred-history-match span:first-child { text-align: right; }
.pred-history-match span:last-child { text-align: left; }
.pred-history-score {
    font-size: 0.95rem;
    color: var(--accent);
    white-space: nowrap;
}
.pred-history-score small {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}
.pred-history-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.lineup-history-panel { margin-top: 2rem; }

/* Ranking live note */
.ranking-live-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}
.ranking-me-separator {
    text-align: center;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    padding: 0.75rem !important;
    background: var(--surface);
    border-top: 1px dashed var(--border);
}
.ranking-me-outside td { border-bottom: none; }

/* Admin compact stats */
.admin-stats-grid-compact {
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1rem;
}
.admin-tournament-summary { margin-bottom: 1.5rem; }

/* Deadline banner */
.deadline-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: var(--radius);
}
.deadline-banner strong { flex: 1; min-width: 10rem; }
.deadline-banner .countdown-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Admin alert panel */
.admin-alert-panel {
    border-color: rgba(244, 230, 0, 0.25);
    margin-bottom: 1rem;
}
.admin-alert-panel p { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }

/* Password toggle */
.password-field {
    position: relative;
    display: flex;
    align-items: stretch;
}
.password-field input { flex: 1; padding-right: 3.5rem; }
.password-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    background: transparent;
    border: none;
    cursor: pointer;
}
.password-toggle:hover { color: var(--accent); }

.auth-legal-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0.5rem 0 1rem;
    line-height: 1.5;
}
.auth-legal-note a { color: var(--text-muted); }

.admin-date-cell {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Nav pending badge */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    margin-left: 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--bg);
    background: var(--accent);
    border-radius: 999px;
    vertical-align: middle;
}
.main-nav a { position: relative; }
.mobile-nav-links .nav-badge {
    margin-left: auto;
}

@media (max-width: 768px) {
    .pred-history-match { grid-template-columns: 1fr; text-align: center; }
    .pred-history-match span:first-child,
    .pred-history-match span:last-child { text-align: center; }
    .admin-stats-grid-compact { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   v3.0 — UX/UI overhaul: accesibilidad, touch, navegación
   ═══════════════════════════════════════════════════════════ */

:root {
    --focus-ring: 0 0 0 3px rgba(244, 230, 0, 0.45);
    --header-offset: 5.5rem;
    --touch-min: 44px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: 0.65rem 1.1rem;
    background: var(--accent);
    color: var(--accent-on);
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.15s ease;
}
.skip-link:focus {
    top: 0.75rem;
    outline: none;
    box-shadow: var(--focus-ring);
}

:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

#main-content:focus { outline: none; }

/* Flash mejorado */
.flash {
    position: sticky;
    top: var(--header-offset);
    z-index: 80;
    padding: 0;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.flash-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}
.flash-text { flex: 1; line-height: 1.45; }
.flash-dismiss {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    margin: -0.35rem -0.5rem -0.35rem 0;
    font-size: 1.35rem;
    line-height: 1;
    color: inherit;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.75;
    transition: opacity var(--transition), background var(--transition);
}
.flash-dismiss:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

/* Nav dropdown desktop */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition);
}
.nav-dropdown-trigger::after {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--transition);
}
.nav-dropdown.open .nav-dropdown-trigger::after { transform: rotate(-135deg) translateY(1px); }
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active,
.nav-dropdown.open .nav-dropdown-trigger { color: var(--accent); }
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 11rem;
    padding: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.nav-dropdown-menu a {
    display: block;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Mobile nav labels + touch */
.mobile-nav-label {
    display: block;
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.mobile-nav-links a {
    display: flex;
    align-items: center;
    min-height: var(--touch-min);
    padding: 0.65rem 1.25rem;
}

/* Barra inferior: badge + touch */
.mobile-play-bar a { position: relative; min-height: var(--touch-min); }
.bar-badge {
    position: absolute;
    top: 0.15rem;
    right: calc(50% - 1.6rem);
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    font-size: 0.6rem;
    font-weight: 800;
    line-height: 1rem;
    text-align: center;
    color: var(--accent-on);
    background: var(--accent);
    border-radius: 999px;
}

/* Tipografía más legible */
.hero-title { text-transform: none; }
.section-header h2,
.page-hero h1 { text-transform: none; letter-spacing: -0.02em; }

/* Touch targets globales */
.btn { min-height: var(--touch-min); }
.btn-sm { min-height: 2.25rem; }
.main-nav a { min-height: var(--touch-min); display: inline-flex; align-items: center; }
.nav-toggle { min-width: var(--touch-min); min-height: var(--touch-min); }

/* Formularios táctiles */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    min-height: var(--touch-min);
    font-size: 1rem;
}
.password-toggle {
    min-width: 2.75rem;
    min-height: 2.25rem;
}

/* Filtros sticky en pronósticos */
.predict-filters,
.filter-tabs.predict-filters {
    position: sticky;
    top: var(--header-offset);
    z-index: 50;
    padding: 0.75rem 0;
    margin-top: 0;
    background: linear-gradient(var(--bg) 70%, transparent);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.predict-filters::-webkit-scrollbar { display: none; }
.filter-tabs a {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* Tarjetas de juego: alturas uniformes */
.play-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.play-card-footer {
    margin-top: auto;
    padding-top: 1rem;
}

/* Anclas con header sticky */
.group-block,
.calendar-match,
[id^="match-"],
[id^="dynamic-"],
[id^="round-"] {
    scroll-margin-top: calc(var(--header-offset) + 1rem);
}

/* Ranking: scroll horizontal en móvil */
.ranking-full-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}
.ranking-table-full { min-width: 32rem; }

/* Trivia / opciones táctiles */
.trivia-option,
.challenge-option,
.lineup-player label {
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
}

/* FAQ más usable */
.faq-item summary {
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem 1.25rem;
}
.faq-item summary::after { float: none; flex-shrink: 0; }

/* Contenedor móvil */
@media (max-width: 768px) {
    :root { --container-gutter: clamp(0.85rem, 4vw, 1.25rem); }
    .section { padding: 3.5rem 0; }
    .page-hero { padding: 2.5rem 0 1.75rem; }
    .page-hero-compact { padding: 2rem 0 1.5rem; }
    .hero { min-height: min(88dvh, 720px); }
    .hero-cta .btn { width: 100%; }
    .play-card-footer .btn { width: 100%; }
    .nav-dropdown { display: none; }
    .pending-item { flex-direction: column; align-items: stretch; text-align: left; }
    .pending-item .btn { width: 100%; }
    .deadline-banner { flex-direction: column; align-items: stretch; text-align: center; }
    .deadline-banner .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal, .play-card, .dynamic-card { transition: none !important; }
    .match-highlight { animation: none; box-shadow: 0 0 0 2px rgba(244, 230, 0, 0.4); }
}

/* ═══════════════════════════════════════════════════════════
   v3.1 — Mejoras dinámicas
   ═══════════════════════════════════════════════════════════ */

.pending-item-body { flex: 1; min-width: 0; }
.pending-type {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.2rem;
}
.pending-item.type-pronostico .pending-type { color: var(--info); }
.pending-item.type-trivia .pending-type { color: var(--pfb-green); }
.pending-item.type-reto .pending-type { color: var(--warning); }
.pending-item.type-once .pending-type { color: #c9a0ff; }
.pending-item.type-foto .pending-type { color: #ff9ec8; }

.play-card-pending-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-left: 0.35rem;
    background: var(--accent);
    border-radius: 50%;
    vertical-align: middle;
    animation: pendingPulse 2s ease infinite;
}
@keyframes pendingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.trivia-card.pending {
    border-color: rgba(244, 230, 0, 0.35);
    box-shadow: inset 3px 0 0 var(--accent);
}
.trivia-week-block { margin-bottom: 2.5rem; }
.trivia-week-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.trivia-week-banner { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.trivia-locked-block {
    margin-top: 2rem;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}
.trivia-locked-list { list-style: none; display: grid; gap: 0.5rem; margin-top: 0.75rem; }
.trivia-locked-list li { display: flex; align-items: center; gap: 0.75rem; color: var(--text-muted); font-size: 0.9rem; }

.dynamic-quick-tip {
    padding: 0.85rem 1rem;
    margin-bottom: 1.5rem;
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-muted);
}
.dynamic-quick-tip strong { color: var(--text); }

/* Once Ideal: campo + búsqueda */
.lineup-pitch {
    max-width: 520px;
    margin: 0 auto 1.5rem;
}
.pitch-grass {
    aspect-ratio: 3 / 4;
    max-height: 340px;
    padding: 1rem 0.75rem;
    background: linear-gradient(180deg, #1a5c38 0%, #1e7044 50%, #1a5c38 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}
.pitch-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.pitch-slot {
    min-width: 4.5rem;
    max-width: 6.5rem;
    padding: 0.35rem 0.4rem;
    font-size: 0.62rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pitch-slot.filled {
    color: #fff;
    background: rgba(32, 30, 64, 0.75);
    border-style: solid;
    border-color: var(--accent);
}

.lineup-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.lineup-search {
    flex: 1;
    min-width: 12rem;
    max-width: 280px;
    padding: 0.65rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
}
.lineup-search:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: var(--focus-ring);
}
.lineup-player.lineup-hidden { display: none; }
.lineup-group.lineup-group-hidden { display: none; }

[id^="q-"],
[id^="reto-"] {
    scroll-margin-top: calc(var(--header-offset, 5.5rem) + 1rem);
}

@media (max-width: 768px) {
    .lineup-toolbar { flex-direction: column; align-items: stretch; }
    .lineup-search { max-width: none; }
    .pitch-slot { min-width: 3.5rem; font-size: 0.58rem; }
}

/* ═══════════════════════════════════════════════════════════
   v3.2 — Mejoras de juego y conversión
   ═══════════════════════════════════════════════════════════ */

.pending-dropdown { position: relative; }
.pending-dropdown-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}
.pending-dropdown-link:hover,
.pending-dropdown-link.active { color: var(--pfb-yellow); }
.pending-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 16rem;
    max-width: 22rem;
    padding: 0.4rem;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 110;
}
.pending-dropdown-menu a {
    display: block;
    padding: 0.6rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    line-height: 1.35;
}
.pending-dropdown-menu a:hover { color: var(--accent); background: var(--accent-dim); }
.pending-dropdown-all {
    margin-top: 0.25rem;
    padding-top: 0.65rem !important;
    border-top: 1px solid var(--border);
    font-weight: 700;
    color: var(--accent) !important;
}

.ranking-motivation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.ranking-motivation strong { color: var(--accent); }

.dashboard-breakdown {
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.dashboard-breakdown h3 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}
.breakdown-bars-compact .breakdown-item { margin-bottom: 0.5rem; }
.breakdown-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-sm);
    padding: 0.25rem 0;
    transition: background var(--transition);
}
.breakdown-item-link:hover { background: var(--accent-dim); }
.dashboard-more-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.score-quick-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0.75rem;
}
.score-quick-btn {
    padding: 0.3rem 0.55rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.score-quick-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.match-countdown {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.trivia-filters { margin-bottom: 1.25rem; }
.trivia-empty-done {
    padding: 1.5rem;
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.trivia-empty-done p { margin-top: 0.75rem; color: var(--text-muted); }

.lineup-idle-panel {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.lineup-idle-panel h2 { margin-bottom: 0.5rem; }
.lineup-idle-panel p { color: var(--text-muted); margin-bottom: 1rem; }
.lineup-next-round {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
}
.lineup-hint {
    margin: 0.75rem 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}
#lineup-submit:disabled { opacity: 0.45; cursor: not-allowed; }

.profile-stats { flex-wrap: wrap; }

/* Trivia v3.3 */
.trivia-rules { margin-bottom: 1.5rem; }
.trivia-rules ul { margin-top: 0.5rem; }
.trivia-explanation {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-left: 3px solid var(--info);
    border-radius: var(--radius-sm);
    line-height: 1.5;
}
.trivia-once-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin: 0.5rem 0 0.75rem;
}
.trivia-card.wrong .trivia-result .badge-warning { margin-right: 0.5rem; }
.user-score-bar-wrap { flex-wrap: wrap; }
.admin-question-invalid { border-color: rgba(224, 92, 92, 0.35) !important; }
.admin-sanitize-form { margin-bottom: 1rem; }

/* v3.4 — Dinámicas */
.juego-motivation { margin: 0; }
.juego-breakdown .progress-title { margin-bottom: 1rem; font-size: 1.1rem; }
.weekly-card.waiting { border-color: rgba(92, 159, 212, 0.25); }
.weekly-state-waiting .badge-soon { color: var(--info); }
.countdown-expired { color: var(--warning) !important; font-weight: 600; }
.countdown-expired-note { margin-top: 0.5rem; }
.foto-preview { margin: 1rem 0; }
.foto-preview-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.foto-preview .instagram-embed-wrap iframe { min-height: 420px; }

@media (max-width: 768px) {
    .pending-dropdown-menu { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   v3.6 — Renovación visual global
   ═══════════════════════════════════════════════════════════ */

:root {
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.38);
    --shadow-glow: 0 0 28px rgba(244, 230, 0, 0.14);
    --surface-gradient: linear-gradient(158deg, rgba(58, 56, 102, 0.92) 0%, rgba(32, 30, 64, 0.98) 100%);
    --card-border: rgba(243, 243, 243, 0.09);
    --card-border-hover: rgba(244, 230, 0, 0.32);
    --btn-gradient: linear-gradient(118deg, #2a2854 0%, #201E40 72%, #3d3a1a 100%);
}

html { scroll-padding-top: calc(var(--header-offset, 5.5rem) + 1rem); }

::selection {
    background: rgba(244, 230, 0, 0.35);
    color: #fff;
}

body {
    background:
        radial-gradient(ellipse 90% 55% at 50% -8%, rgba(244, 230, 0, 0.09), transparent 58%),
        radial-gradient(ellipse 45% 35% at 100% 12%, rgba(0, 184, 123, 0.07), transparent 52%),
        radial-gradient(ellipse 40% 30% at 0% 88%, rgba(30, 125, 247, 0.06), transparent 50%),
        var(--bg);
    background-attachment: fixed;
}

/* Superficies y tarjetas */
.dynamic-card,
.play-card,
.step-card,
.match-card,
.trivia-card,
.auth-form,
.dash-stat,
.progress-card,
.progress-card-link,
.stat-card-lg,
.ranking-table-wrap,
.ranking-full-wrap,
.profile-breakdown,
.pending-box,
.deadline-banner,
.cta-box,
.social-follow-box,
.referral-invite-box,
.dashboard-pending,
.verify-pending-box,
.prize-zone-box,
.admin-panel,
.admin-stat-card {
    background: var(--surface-gradient);
    border-color: var(--card-border);
    box-shadow: var(--shadow-sm);
}

.dynamic-card,
.play-card,
.step-card,
.match-card,
.trivia-card,
.progress-card,
.progress-card-link,
.stat-card-lg {
    border-radius: var(--radius-lg);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.dynamic-card:hover,
.play-card:hover,
.step-card:hover,
.match-card:hover,
.trivia-card:hover,
.progress-card-link:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-3px);
}

.play-card.active {
    border-color: rgba(244, 230, 0, 0.38);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(244, 230, 0, 0.12);
}
.play-card.active:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Cabecera y navegación */
.site-header {
    background: rgba(26, 24, 53, 0.92);
    border-bottom-width: 2px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.main-nav a.active::after,
.pending-dropdown-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35rem;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.header-score {
    background: rgba(244, 230, 0, 0.1);
    border: 1px solid rgba(244, 230, 0, 0.28);
    border-radius: 100px;
    padding: 0.35rem 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.header-score:hover {
    background: rgba(244, 230, 0, 0.16);
    box-shadow: var(--shadow-glow);
}

/* Botones */
.btn {
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}
.btn-primary {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32), var(--shadow-glow);
    filter: none;
}
.btn-outline:hover {
    background: rgba(244, 230, 0, 0.06);
}
.btn:active { transform: translateY(0); }

/* Héroes de página */
.page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(42, 40, 84, 0.55) 0%, transparent 100%);
    border-bottom-color: rgba(243, 243, 243, 0.06);
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 90% at 0% 0%, rgba(244, 230, 0, 0.1), transparent 58%),
        radial-gradient(ellipse 40% 60% at 100% 20%, rgba(0, 184, 123, 0.06), transparent 55%);
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
    background: linear-gradient(135deg, #fff 0%, rgba(243, 243, 243, 0.88) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-hero .section-eyebrow {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
    margin-bottom: 0.85rem;
}

.user-score-bar {
    gap: 0.75rem;
    margin-top: 1.75rem;
}
.user-score-item {
    padding: 0.65rem 1rem;
    background: rgba(32, 30, 64, 0.65);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    min-width: 6.5rem;
}
.user-score-item .value {
    font-size: 1.35rem;
    line-height: 1.1;
}

/* Home hero */
.hero-overlay {
    background: linear-gradient(
        to top,
        var(--pfb-navy) 0%,
        rgba(32, 30, 64, 0.92) 40%,
        rgba(32, 30, 64, 0.65) 100%
    );
}
.hero-stats {
    gap: 1rem;
    flex-wrap: wrap;
    border-top: none;
    padding-top: 0;
}
.hero-stats .stat {
    padding: 0.85rem 1.15rem;
    background: rgba(32, 30, 64, 0.72);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    min-width: 7rem;
}
.hero-badge {
    border-radius: var(--radius-sm);
}

/* Dashboard */
.user-dashboard {
    background: linear-gradient(180deg, rgba(26, 24, 53, 0.85) 0%, rgba(32, 30, 64, 0.4) 100%);
}
.dashboard-grid {
    gap: 1.25rem;
}
.dash-stat {
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.dash-stat:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-sm);
}
.dashboard-pending {
    background: linear-gradient(135deg, rgba(244, 230, 0, 0.08), rgba(32, 30, 64, 0.5));
    border-radius: var(--radius-lg);
}

/* Formularios */
.auth-form,
.auth-form-closed {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(26, 24, 53, 0.75);
    border-color: var(--card-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(244, 230, 0, 0.55);
    box-shadow: var(--focus-ring);
}

/* Barras de progreso */
.progress-bar {
    height: 8px;
    background: rgba(26, 24, 53, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.progress-fill {
    background: linear-gradient(90deg, #c9b800, var(--accent));
    box-shadow: 0 0 10px rgba(244, 230, 0, 0.35);
}
.progress-fill.fill-trivia {
    background: linear-gradient(90deg, #009966, var(--success));
    box-shadow: 0 0 10px rgba(0, 184, 123, 0.3);
}
.progress-fill.fill-retos {
    background: linear-gradient(90deg, #1565d8, var(--info));
    box-shadow: 0 0 10px rgba(30, 125, 247, 0.3);
}

/* Ranking */
.ranking-table tr.top-1 td {
    background: linear-gradient(90deg, rgba(244, 230, 0, 0.14), rgba(244, 230, 0, 0.04));
}
.ranking-table tr.top-2 td {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent);
}
.ranking-table tr.top-3 td {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent);
}
.ranking-table tr.is-me td {
    box-shadow: inset 3px 0 0 var(--info);
}

/* Trivia y opciones */
.trivia-option {
    border-radius: var(--radius-sm);
}
.trivia-option:hover {
    background: rgba(244, 230, 0, 0.05);
    border-color: var(--card-border-hover);
    transform: translateX(2px);
}
.trivia-card.correct {
    box-shadow: inset 3px 0 0 var(--success), var(--shadow-sm);
}
.trivia-card.wrong {
    box-shadow: inset 3px 0 0 var(--error), var(--shadow-sm);
}

/* Pendientes y avisos */
.pending-box,
.deadline-banner {
    border-radius: var(--radius-lg);
}
.deadline-banner {
    background: linear-gradient(135deg, rgba(244, 230, 0, 0.1), rgba(32, 30, 64, 0.6));
    border-color: rgba(244, 230, 0, 0.25);
}
.pending-item {
    border-radius: var(--radius);
    transition: background var(--transition);
}
.pending-item:hover {
    background: rgba(244, 230, 0, 0.04);
}

/* Flash */
.flash-success { border-bottom-color: rgba(0, 184, 123, 0.25); }
.flash-error { border-bottom-color: rgba(224, 92, 92, 0.25); }
.flash-warning { border-bottom-color: rgba(244, 230, 0, 0.25); }
.flash-info { border-bottom-color: rgba(30, 125, 247, 0.25); }

/* Footer — acento de marca */
.site-footer {
    background: linear-gradient(180deg, rgba(26, 24, 53, 0.55) 0%, var(--bg-elevated) 100%);
    border-top: 2px solid rgba(244, 230, 0, 0.2);
    margin-top: 3rem;
}
.footer-bottom {
    color: var(--text-muted);
}

/* Barra móvil inferior */
.mobile-play-bar {
    background: rgba(22, 20, 45, 0.96);
    border-top: 2px solid rgba(244, 230, 0, 0.15);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}
.mobile-play-bar a.active {
    color: var(--accent);
}
.mobile-play-bar a.active .bar-icon {
    filter: drop-shadow(0 0 6px rgba(244, 230, 0, 0.45));
}

/* Iconos dinámicas */
.dynamic-icon {
    border-radius: var(--radius);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.play-card.active .dynamic-icon {
    background: rgba(244, 230, 0, 0.18);
}

/* CTA y premios */
.cta-box {
    background: linear-gradient(145deg, rgba(244, 230, 0, 0.1), rgba(32, 30, 64, 0.85));
    border-color: rgba(244, 230, 0, 0.28);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-radius: var(--radius-xl);
}

/* Estados vacíos */
.empty-state,
.trivia-empty-done,
.predict-empty {
    padding: 2.5rem 1.5rem;
    background: var(--surface-gradient);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

/* Badges */
.badge {
    font-weight: 700;
    letter-spacing: 0.05em;
}
.badge-active {
    background: rgba(0, 184, 123, 0.18);
    border: 1px solid rgba(0, 184, 123, 0.35);
}

/* Filtros */
.filter-tabs a.active {
    background: var(--accent-dim);
    border-color: rgba(244, 230, 0, 0.45);
    color: var(--accent);
}

/* Auth info panel */
.auth-info h1 {
    letter-spacing: -0.02em;
}
.auth-checklist li::before {
    border-radius: 2px;
    width: 6px;
    height: 10px;
    background: transparent;
    border: 2px solid var(--accent);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    top: 0.7rem;
}

/* Referidos */
.referral-code {
    color: var(--pfb-navy);
    border: 1px solid rgba(244, 230, 0, 0.4);
}
.referral-invite-box {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

/* Actividad */
.activity-item {
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition);
}
.activity-item:hover {
    border-color: var(--card-border-hover);
    transform: translateX(3px);
}

/* Perfil */
.profile-stat {
    border-radius: var(--radius-lg);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.profile-stat:hover {
    border-color: var(--card-border-hover);
}
.highlight-stat {
    background: linear-gradient(145deg, rgba(244, 230, 0, 0.08), rgba(32, 30, 64, 0.5));
}

.upcoming-card {
    background: var(--surface-gradient);
    border-color: var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}
.upcoming-card:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.section-header .section-eyebrow {
    color: var(--accent);
}

.mobile-nav-panel {
    background: linear-gradient(180deg, #2d2b52 0%, #1a1835 100%);
    border-left: 3px solid var(--accent);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}

.site-header.scrolled {
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.38);
}

/* v3.6.1 — Layout full width */
.hero,
.page-hero,
.section,
.site-footer,
.site-header .container,
.site-topbar .container,
.flash .container {
    width: 100%;
    max-width: none;
}

.hero .container,
.hero-layout {
    width: 100%;
    max-width: none;
    padding-inline: var(--container-gutter);
}

.hero-layout {
    grid-template-columns: 1fr auto;
    gap: clamp(1.5rem, 5vw, 4rem);
}

.dynamics-grid,
.dynamics-play-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

.progress-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.upcoming-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.steps-grid {
    grid-template-columns: 1fr;
}
@media (min-width: 700px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ranking-split {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
    gap: clamp(2rem, 5vw, 4rem);
}

.stats-hero-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.auth-grid {
    gap: clamp(2rem, 6vw, 5rem);
    max-width: none;
}

.auth-grid-narrow {
    max-width: min(100%, 520px);
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.footer-grid {
    grid-template-columns: 2fr repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 4rem);
}

.matches-list {
    grid-template-columns: 1fr;
}

@media (min-width: 1100px) {
    .dynamics-play-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    .dashboard-grid {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    }
}

@media (min-width: 1400px) {
    .dynamics-play-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.podium {
    max-width: none;
    width: 100%;
    margin: 0;
}

.lineup-form,
.trivia-list,
.weekly-list,
.matches-list,
.ranking-full-wrap,
.ranking-table-wrap {
    max-width: none;
    width: 100%;
}

.profile-stats {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
}

/* v3.7 — Funcionalidades */
.game-summary-box {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface-gradient);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.game-summary-main {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}
.game-summary-stat .label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.game-summary-stat .value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--accent);
}
.game-summary-next {
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}
.game-summary-next-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}
.game-summary-next-link {
    display: inline-block;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 0.25rem;
}
.game-summary-next-link:hover { color: var(--accent); }

.calendar-predict-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.score-inputs-compact input {
    width: 44px;
    padding: 0.45rem 0.35rem;
    font-size: 0.95rem;
}
.calendar-match-status .calendar-predict-form { width: 100%; justify-content: flex-end; }

.pending-item.type-invita .pending-type { color: var(--pfb-green); }

.profile-referral-panel p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .calendar-match-status .calendar-predict-form { justify-content: flex-start; }
    .game-summary-main { flex-direction: column; gap: 0.75rem; }
}

/* ═══════════════════════════════════════════════════════════
   v3.8 — Refinamiento visual
   ═══════════════════════════════════════════════════════════ */

:root {
    --glass: rgba(32, 30, 64, 0.72);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-line: linear-gradient(90deg, var(--pfb-yellow), var(--pfb-green));
    --section-band: linear-gradient(180deg, rgba(26, 24, 53, 0.55) 0%, rgba(32, 30, 64, 0.2) 100%);
}

body {
    line-height: 1.65;
    position: relative;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0);
    background-size: 28px 28px;
}

main {
    position: relative;
    z-index: 1;
}

/* Topbar y cabecera */
.site-topbar {
    background: linear-gradient(90deg, #fff 0%, #f8f8fc 100%);
    box-shadow: 0 1px 0 rgba(32, 30, 64, 0.06);
}
.site-header {
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.logo-text small {
    text-shadow: 0 0 20px rgba(244, 230, 0, 0.25);
}

/* Secciones con bandas alternas (home y hubs) */
.how-it-works,
.upcoming-section,
.dynamics-preview,
.ranking-preview,
.activity-section {
    background: var(--section-band);
    border-block: 1px solid rgba(243, 243, 243, 0.05);
}

.section-header .section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: var(--accent-dim);
    border: 1px solid rgba(244, 230, 0, 0.2);
    border-radius: 100px;
    letter-spacing: 0.08em;
}

/* Hero home */
.hero-title {
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.35);
}
.hero-title .hero-highlight {
    background: linear-gradient(120deg, var(--pfb-yellow) 0%, #fff6a0 50%, var(--pfb-yellow) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-shield {
    animation: heroShieldFloat 5s ease-in-out infinite;
    filter: drop-shadow(0 16px 48px rgba(244, 230, 0, 0.15));
}
@keyframes heroShieldFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.hero-stats .stat {
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-stats .stat:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-md);
}

/* Botones premium */
.btn-primary {
    position: relative;
    overflow: hidden;
    border-color: rgba(244, 230, 0, 0.4) !important;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(244, 230, 0, 0.08) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.btn-primary:hover::before {
    transform: translateX(100%);
}
.btn-lg {
    padding: 0.95rem 2.25rem;
    font-size: 1.02rem;
}

/* Tarjetas con línea de acento */
.play-card,
.dynamic-card-link {
    position: relative;
    overflow: hidden;
}
.play-card.active::before,
.dynamic-card-link.status-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-line);
    z-index: 1;
}
.dynamic-go {
    transition: transform var(--transition), color var(--transition);
}
.dynamic-card-link:hover .dynamic-go {
    transform: translateX(4px);
}

/* Panel resumen juego */
.game-summary-box {
    border-left: 4px solid var(--pfb-yellow);
    background:
        linear-gradient(135deg, rgba(244, 230, 0, 0.06) 0%, transparent 45%),
        var(--surface-gradient);
    padding: 1.5rem 1.75rem;
}
.game-summary-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.game-summary-stat {
    padding: 0.85rem 1rem;
    background: rgba(26, 24, 53, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}
.game-summary-stat .value {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Pendientes */
.pending-box {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border-color: rgba(244, 230, 0, 0.15);
}
.pending-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.pending-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.6rem;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-on);
    background: var(--accent);
    border-radius: 100px;
}
.pending-list {
    display: grid;
    gap: 0.65rem;
}
.pending-item {
    padding: 1rem 1.15rem;
    background: rgba(26, 24, 53, 0.45);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}

/* Filtros tipo segment control */
.filter-tabs,
.predict-filters {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    background: rgba(26, 24, 53, 0.65);
    border: 1px solid var(--card-border);
    border-radius: 100px;
    margin-bottom: 1.5rem;
}
.filter-tabs a {
    border: none;
    border-radius: 100px;
    padding: 0.5rem 1.1rem;
    background: transparent;
    transition: background var(--transition), color var(--transition);
}
.filter-tabs a.active {
    background: var(--accent);
    color: var(--accent-on);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.filter-tabs a:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}
.predict-filters,
.filter-tabs.predict-filters {
    position: sticky;
    top: var(--header-offset, 5.5rem);
    z-index: 50;
    width: 100%;
    max-width: 100%;
    background: rgba(26, 24, 53, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem;
    margin-top: 0;
}

/* Calendario y timeline */
.calendar-match,
.timeline-match {
    border-radius: var(--radius-lg);
    background: var(--surface-gradient);
    border-color: var(--card-border);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.calendar-match:hover,
.timeline-match:hover {
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-md);
}
.group-nav-pill {
    background: var(--glass);
    backdrop-filter: blur(8px);
    border-color: var(--glass-border);
}
.group-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.group-title::before {
    content: '';
    width: 4px;
    height: 1.25rem;
    background: var(--accent-line);
    border-radius: 2px;
}

/* Dashboard home */
.dashboard-welcome {
    padding: 0.25rem 0;
}
.dash-stat {
    background: var(--surface-gradient);
}
.dashboard-pending {
    border-left: 3px solid var(--pfb-yellow);
}

/* Perfil */
.profile-panel {
    background: var(--surface-gradient);
    border-color: var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.profile-panel h2 {
    font-size: 1.15rem;
    font-weight: 700;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.15rem;
}
.profile-referral-panel {
    border-left: 4px solid var(--pfb-green);
}
.profile-stat {
    background: var(--surface-gradient);
}

/* Ranking */
.ranking-table th {
    background: rgba(26, 24, 53, 0.9);
    backdrop-filter: blur(8px);
    position: sticky;
    top: var(--header-offset, 5.5rem);
    z-index: 2;
    border-bottom: 2px solid rgba(244, 230, 0, 0.2);
}
.ranking-table .rank-cell {
    font-weight: 800;
    color: var(--text-dim);
}
.ranking-table tr.top-1 .rank-cell { color: var(--accent); }

/* CTA final */
.cta-final {
    padding: 4rem 0 7rem;
}
.cta-box {
    position: relative;
    overflow: hidden;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 3rem);
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 50%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(244, 230, 0, 0.12), transparent 70%);
    pointer-events: none;
}

/* Actividad */
.activity-feed {
    gap: 0.65rem;
}
.activity-item {
    background: var(--surface-gradient);
    border-color: var(--card-border);
}
.activity-dot {
    width: 10px;
    height: 10px;
    margin-top: 0.4rem;
    box-shadow: 0 0 10px rgba(244, 230, 0, 0.45);
}

/* Auth */
.auth-form {
    border-radius: var(--radius-xl);
}
.auth-info h1 {
    line-height: 1.2;
}
.social-follow-box {
    border-radius: var(--radius-lg);
    border-color: rgba(244, 230, 0, 0.15);
}

/* Flash más visible */
.flash-success { background: rgba(0, 184, 123, 0.12); }
.flash-error { background: rgba(224, 92, 92, 0.12); }
.flash-warning { background: rgba(244, 230, 0, 0.1); }

/* Barra móvil */
.mobile-nav-cta {
    margin: 0.75rem 1.25rem 1rem;
    padding: 0.85rem 1rem !important;
    text-align: center;
    font-weight: 700 !important;
    color: var(--accent-on) !important;
    background: var(--accent) !important;
    border-radius: var(--radius) !important;
}

/* Inputs score pronósticos */
.score-inputs input {
    font-weight: 700;
    color: var(--accent);
    border-color: rgba(244, 230, 0, 0.2);
}
.score-inputs input:focus {
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

@media (max-width: 900px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }
    .hero-shield {
        display: none;
    }
    .filter-tabs,
    .predict-filters {
        border-radius: var(--radius-lg);
        width: 100%;
        justify-content: flex-start;
    }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
    .dynamic-card:hover,
    .play-card:hover,
    .step-card:hover,
    .match-card:hover,
    .trivia-card:hover,
    .progress-card-link:hover,
    .btn-primary:hover,
    .trivia-option:hover,
    .activity-item:hover {
        transform: none;
    }
    .hero-shield {
        animation: none;
    }
    .btn-primary::before {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   v3.8.1 — Validación y correcciones móvil
   ═══════════════════════════════════════════════════════════ */

html {
    overflow-x: clip;
    max-width: 100%;
}

body {
    overflow-x: clip;
    max-width: 100%;
}

/* Evita scroll horizontal por el drawer cerrado */
.mobile-nav {
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    right: 0;
    left: 0;
}

.mobile-nav:not(.open) .mobile-nav-panel {
    pointer-events: none;
}

.mobile-nav-links a.active {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Cabecera compacta */
@media (max-width: 900px) {
    .header-inner {
        gap: 0.65rem;
        padding: 0.65rem 0;
    }
    .logo-img {
        height: 34px;
        max-width: min(180px, 48vw);
    }
    .site-topbar {
        font-size: 0.72rem;
        padding: 0.3rem 0;
    }
}

/* Hero móvil */
@media (max-width: 768px) {
    .hero-layout {
        padding-bottom: 2.5rem;
    }
    .hero-title {
        font-size: clamp(1.65rem, 8vw, 2.35rem);
        line-height: 1.12;
        color: #fff;
        -webkit-text-fill-color: #fff;
        background: none;
    }
    .hero-title .hero-highlight {
        color: var(--pfb-yellow);
        -webkit-text-fill-color: var(--pfb-yellow);
        background: none;
    }
    .hero-lead {
        font-size: 1rem;
        max-width: none;
    }
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }
    .hero-stats .stat {
        min-width: 0;
        width: 100%;
        padding: 0.75rem 0.65rem;
    }
    .stat-value {
        font-size: 1.45rem;
    }
    .page-hero h1 {
        font-size: clamp(1.55rem, 7vw, 2.1rem);
        color: #fff;
        -webkit-text-fill-color: #fff;
        background: none;
    }
}

/* Filtros y navegación horizontal con scroll */
@media (max-width: 768px) {
    .filter-tabs,
    .predict-filters {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.35rem;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: var(--radius-lg);
    }
    .filter-tabs::-webkit-scrollbar,
    .predict-filters::-webkit-scrollbar,
    .group-nav::-webkit-scrollbar {
        display: none;
    }
    .filter-tabs a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .group-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: calc(var(--container-gutter) * -0.15);
        margin-right: calc(var(--container-gutter) * -0.15);
        padding-left: var(--container-gutter);
        padding-right: var(--container-gutter);
        scrollbar-width: none;
    }
    .group-nav-pill {
        flex-shrink: 0;
    }
}

/* Partidos: timeline y calendario */
@media (max-width: 600px) {
    .timeline-match {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem 1.1rem;
    }
    .timeline-date {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        gap: 0.65rem;
        text-align: left;
    }
    .timeline-body .match-teams {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    .timeline-body .match-teams .vs {
        font-size: 0.72rem;
        margin: 0.1rem 0;
    }
    .timeline-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .timeline-actions .btn {
        width: 100%;
    }
    .calendar-match {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem 1.1rem;
    }
    .calendar-match-date {
        flex-direction: row;
        gap: 0.5rem;
        align-items: baseline;
    }
    .calendar-match-teams {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }
    .calendar-match-status {
        align-items: stretch;
        width: 100%;
    }
    .calendar-predict-form {
        width: 100%;
        justify-content: flex-start;
    }
    .calendar-predict-form .btn {
        flex: 1 1 100%;
    }
}

/* Tarjetas de juego y dinámicas */
@media (max-width: 768px) {
    .play-card-footer,
    .dynamic-meta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .play-card-footer .points,
    .dynamic-meta .points {
        order: -1;
    }
    .play-card-footer .btn,
    .dynamic-meta .btn {
        width: 100%;
    }
    .dynamics-play-grid,
    .dynamics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .pending-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .pending-item .btn {
        width: 100%;
    }
    .deadline-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 0.75rem;
    }
    .deadline-banner .btn {
        width: 100%;
    }
}

/* Resumen juego y referidos */
@media (max-width: 768px) {
    .game-summary-main {
        grid-template-columns: 1fr;
    }
    .game-summary-next-link {
        display: block;
        line-height: 1.4;
    }
    .referral-link-row {
        flex-direction: column;
        align-items: stretch;
    }
    .referral-link-row .btn,
    .referral-link-input {
        width: 100%;
    }
    .user-score-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .user-score-item {
        width: 100%;
        min-width: 0;
    }
}

/* Auth en móvil */
@media (max-width: 900px) {
    .auth-page {
        padding: 2rem 0 4rem;
    }
    .auth-form {
        padding: 1.35rem;
    }
    .auth-form-inline .form-row {
        grid-template-columns: 1fr;
    }
    .social-follow-box .social-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0.35rem 0 0;
    }
}

/* Ranking tabla deslizable */
@media (max-width: 768px) {
    .ranking-full-wrap,
    .ranking-table-wrap {
        margin-left: calc(var(--container-gutter) * -0.5);
        margin-right: calc(var(--container-gutter) * -0.5);
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .ranking-table th {
        top: calc(var(--header-offset, 5.5rem) - 0.25rem);
        font-size: 0.68rem;
        padding: 0.65rem 0.85rem;
    }
    .ranking-table td {
        padding: 0.75rem 0.85rem;
        font-size: 0.88rem;
    }
}

/* Dashboard home */
@media (max-width: 768px) {
    .dashboard-quick {
        flex-direction: column;
    }
    .dashboard-quick .btn {
        width: 100%;
    }
    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }
    .dash-stat {
        padding: 0.85rem 0.4rem;
    }
    .dash-value {
        font-size: 1.35rem;
    }
    .dash-label {
        font-size: 0.62rem;
    }
}

/* Secciones más compactas en pantallas pequeñas */
@media (max-width: 480px) {
    :root {
        --container-gutter: 1rem;
    }
    .section {
        padding: 2.75rem 0;
    }
    .section-compact {
        padding: 1.75rem 0;
    }
    .section-header {
        margin-bottom: 2rem;
    }
    .footer-grid {
        gap: 1.5rem;
        padding-block: 2.25rem;
    }
    .footer-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        padding-block: 1.35rem;
    }
    .footer-cta-actions {
        width: 100%;
    }
    .footer-cta-actions .btn {
        flex: 1 1 auto;
        min-width: min(100%, 160px);
    }
    .footer-bottom {
        flex-direction: column;
        padding-bottom: 1.25rem;
    }
    .footer-bottom-links {
        width: 100%;
        justify-content: flex-start;
    }
    body.user-logged-in .site-footer {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
    .cta-box {
        padding: 2rem 1.25rem;
    }
    .btn {
        white-space: normal;
        text-align: center;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Barra inferior: safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-play-bar {
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    }
    body.user-logged-in main {
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
    }
}
