/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #0b0f1a;
    color: #e2e8f0;
    min-height: 100vh;
}
a { color: #60a5fa; text-decoration: none; transition: color 0.2s; }
a:hover { color: #93c5fd; text-decoration: none; }

/* ── Top Bar ── */
.topbar {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar a { color: #94a3b8; margin-right: 1rem; font-size: 0.9rem; font-weight: 500; }
.topbar a:hover { color: #f8fafc; }
.logo { font-weight: 800; font-size: 1.15rem; color: #f8fafc !important; letter-spacing: -0.02em; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 0.25rem; }
.username { margin-right: 1rem; color: #64748b; font-size: 0.85rem; }
.bell { position: relative; font-size: 1.2rem; }
.badge {
    position: absolute; top: -6px; right: -8px;
    background: #ef4444; color: #fff; font-size: 0.65rem;
    padding: 1px 5px; border-radius: 10px; font-weight: 700;
}

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Flash Messages ── */
.flash {
    padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem;
    font-size: 0.9rem; animation: slideDown 0.3s ease;
}
.flash.success { background: rgba(22, 163, 74, 0.15); color: #4ade80; border: 1px solid rgba(22, 163, 74, 0.3); }
.flash.error { background: rgba(220, 38, 38, 0.15); color: #f87171; border: 1px solid rgba(220, 38, 38, 0.3); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Hero / Video Background ── */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: -2rem -1.5rem;
    margin-bottom: 0;
}
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(11, 15, 26, 0.85) 0%, rgba(11, 15, 26, 0.4) 50%, rgba(11, 15, 26, 0.85) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 720px;
    padding: 2rem;
    animation: fadeUp 1s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.hero-content h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, #facc15, #f97316, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: none;
}
.hero-content .subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Hero Showcase Section (below hero) ── */
.showcase-section {
    padding: 3rem 0;
}
.showcase-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
}
.showcase-section .section-sub {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ── Match Showcase Cards ── */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}
.match-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, border-color 0.2s;
}
.match-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); }
.match-card .match-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}
.match-badge.upcoming { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.match-badge.live { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.match-badge.pending { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.match-card .match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.match-card .team-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.match-card .team-display .emoji { font-size: 2rem; }
.match-card .team-display .name { font-weight: 600; font-size: 0.9rem; }
.match-card .vs { font-size: 1.5rem; font-weight: 800; color: #475569; }
.match-card .match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.match-card .match-meta span { display: flex; align-items: center; gap: 0.35rem; }
.match-card .score { font-size: 1.5rem; font-weight: 800; color: #f1f5f9; }

/* ── Buttons ── */
.btn {
    display: inline-block; padding: 0.65rem 1.4rem; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: #e2e8f0;
    font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
    font-weight: 500;
}
.btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #ea580c, #dc2626); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; border-radius: 8px; }
.btn-secondary { border-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: #94a3b8; }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.15); color: #e2e8f0; }

/* ── Forms ── */
.form { max-width: 500px; }
.form label { display: block; margin-bottom: 1rem; font-size: 0.85rem; color: #94a3b8; }
.form input[type="text"], .form input[type="email"], .form input[type="password"],
.form input[type="datetime-local"], .form textarea, .form select {
    display: block; width: 100%; padding: 0.65rem 0.85rem;
    background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; margin-top: 0.3rem; font-size: 0.9rem;
    color: #e2e8f0; outline: none; transition: border-color 0.2s;
}
.form input:focus, .form textarea:focus, .form select:focus {
    border-color: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
.form textarea { resize: vertical; }
.form-row { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.form-row label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #cbd5e1; cursor: pointer; }
.form-inline { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.form-inline input { flex: 1; padding: 0.5rem 0.75rem; background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: #e2e8f0; }
.form-footer { margin-top: 1rem; font-size: 0.9rem; color: #64748b; }
.inline-form { display: inline-flex; gap: 0.3rem; margin-left: 0.5rem; }

/* ── Sections ── */
.section { margin: 2rem 0; }
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Cards ── */
.card-list { list-style: none; }
.card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    transition: border-color 0.2s, background 0.2s;
    backdrop-filter: blur(4px);
}
.card:hover { border-color: rgba(255,255,255,0.12); }
.card a { font-weight: 600; }

/* ── Stats Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.stat-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: #facc15; }
.stat-card .stat-label { font-size: 0.8rem; color: #64748b; margin-top: 0.25rem; }

/* ── Team Cards (for team list) ── */
.team-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.team-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.team-card .team-avatar {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; flex-shrink: 0;
}
.team-card .team-info h3 { font-size: 1.1rem; font-weight: 700; color: #f1f5f9; }
.team-card .team-info p { font-size: 0.8rem; color: #64748b; margin-top: 0.15rem; }

/* ── Role Badges ── */
.role-badge { font-size: 0.7rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.role-badge.captain { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.role-badge.co_captain { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.role-badge.player { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }
.member-count { font-size: 0.8rem; color: #64748b; }

/* ── Invite Code ── */
.invite-code { margin-bottom: 1rem; }
.invite-code code {
    background: rgba(15, 23, 42, 0.8); color: #facc15;
    padding: 0.35rem 0.85rem; border-radius: 8px; font-family: 'SF Mono', monospace;
    font-size: 1rem; border: 1px solid rgba(250, 204, 21, 0.2);
}

/* ── Roster ── */
.roster { list-style: none; }
.roster-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.roster-item:last-child { border-bottom: none; }
.roster-item .player-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ef4444);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ── Chat ── */
.chat-box {
    background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 0.75rem; max-height: 300px;
    overflow-y: auto; margin-bottom: 0.5rem;
}
.chat-msg { margin-bottom: 0.75rem; padding: 0.5rem; border-radius: 8px; }
.chat-msg:nth-child(odd) { background: rgba(255,255,255,0.02); }
.chat-msg strong { font-size: 0.85rem; color: #f1f5f9; }
.chat-time { color: #475569; font-size: 0.7rem; margin-left: 0.5rem; }
.chat-msg p { font-size: 0.88rem; margin-top: 0.15rem; color: #cbd5e1; }

/* ── Status Badges ── */
.status { font-size: 0.7rem; padding: 3px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.status.pending { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.status.accepted { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.status.declined { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.status.completed { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* ── Courts Grid ── */
.court-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 1rem; }
.court-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 1.25rem;
    backdrop-filter: blur(4px);
}
.court-card h3 { margin-bottom: 0.25rem; color: #f1f5f9; }
.court-address { color: #64748b; font-size: 0.85rem; margin-bottom: 0.5rem; }
.court-notes { color: #475569; font-size: 0.85rem; margin-top: 0.5rem; }
.court-tags { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.tag {
    display: inline-block; font-size: 0.7rem; padding: 3px 10px;
    border-radius: 20px; background: rgba(100, 116, 139, 0.15); color: #94a3b8;
}

/* ── Notifications ── */
.notif-list { list-style: none; }
.notif {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.85rem 1rem; margin-bottom: 0.5rem;
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}
.notif.unread { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.2); font-weight: 500; }
.notif small { color: #475569; font-size: 0.8rem; }

/* ── Page Headers ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f1f5f9;
}
.page-header .subtitle { color: #64748b; font-size: 0.9rem; }

/* ── Activity Feed ── */
.activity-feed { margin: 1rem 0; }
.activity-item {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.65rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.activity-text { font-size: 0.88rem; color: #94a3b8; }
.activity-text strong { color: #e2e8f0; }
.activity-time { font-size: 0.7rem; color: #475569; }

/* ── Match History Table ── */
.match-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.match-table th {
    text-align: left; padding: 0.65rem 0.75rem;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: #64748b; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.match-table td {
    padding: 0.65rem 0.75rem; font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #cbd5e1;
}
.match-table .win { color: #4ade80; font-weight: 600; }
.match-table .lose { color: #f87171; font-weight: 600; }

/* ── Checkbox styling ── */
input[type="checkbox"] {
    appearance: none; width: 18px; height: 18px;
    border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
    background: rgba(30, 41, 59, 0.6); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
input[type="checkbox"]:checked {
    background: #f97316; border-color: #f97316;
}
input[type="checkbox"]:checked::after {
    content: "✓"; color: #fff; font-size: 12px; font-weight: 700;
}

/* ── Countdown Badge ── */
.countdown {
    display: inline-block;
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { color: #94a3b8; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.3); border-radius: 3px; }

/* ── RSVP Bar ── */
.rsvp-bar {
    display: flex; gap: 0.5rem; margin: 0.5rem 0;
}
.rsvp-bar .segment {
    height: 6px; border-radius: 3px; transition: width 0.3s;
}
.rsvp-bar .yes { background: #4ade80; }
.rsvp-bar .no { background: #f87171; }
.rsvp-bar .maybe { background: #facc15; }

/* ── Match Result Card (Team Detail) ── */
.match-result {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}
.match-result .teams { display: flex; align-items: center; gap: 0.75rem; }
.match-result .result-score { font-size: 1.25rem; font-weight: 800; }
.match-result .win { color: #4ade80; }
.match-result .lose { color: #f87171; }

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE — Apple-style scroll & animation
   ═══════════════════════════════════════════════════════════════ */

/* ── Scroll Progress Bar (fixed top) ── */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #facc15, #f97316, #ef4444);
    z-index: 250;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.55);
    pointer-events: none;
}

/* ── Topbar compacts on scroll ── */
.topbar {
    transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.topbar.scrolled {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    background: rgba(11, 15, 26, 0.78);
    border-bottom-color: rgba(255,255,255,0.04);
}

/* ── Hero scroll-cue indicator ── */
.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #94a3b8;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.scroll-cue .cue-arrow {
    width: 22px; height: 36px;
    border: 2px solid rgba(148, 163, 184, 0.6);
    border-radius: 12px;
    position: relative;
}
.scroll-cue .cue-arrow::after {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    width: 4px; height: 8px;
    margin-left: -2px;
    background: #facc15;
    border-radius: 2px;
    animation: cueBounce 1.6s ease-in-out infinite;
}
@keyframes cueBounce {
    0%   { transform: translateY(0);    opacity: 1; }
    60%  { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0);    opacity: 0; }
}

/* ── Reveal on scroll ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ── Staggered children (grid items fade in one by one) ── */
.stagger > * {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}
.stagger.in-view > * {
    opacity: 1;
    transform: translateY(0);
}
.stagger.in-view > *:nth-child(1) { transition-delay: 0.00s; }
.stagger.in-view > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.in-view > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.in-view > *:nth-child(4) { transition-delay: 0.24s; }
.stagger.in-view > *:nth-child(5) { transition-delay: 0.32s; }
.stagger.in-view > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.in-view > *:nth-child(7) { transition-delay: 0.48s; }
.stagger.in-view > *:nth-child(8) { transition-delay: 0.56s; }

/* ── Enhanced feature cards (CTA) ── */
.feature-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s, box-shadow 0.3s;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--card-glow, radial-gradient(circle at 50% 0%, rgba(249,115,22,0.12), transparent 70%));
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 16px 40px -10px rgba(0,0,0,0.4);
}
.feature-card:hover::before { opacity: 1; }
.feature-card .feature-icon {
    font-size: 2.8rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.4));
}
.feature-card:hover .feature-icon { transform: scale(1.12) translateY(-3px); }
.feature-card h3 {
    color: #f1f5f9;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.feature-card p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 220px;
}
.feature-card.c-orange { --card-glow: radial-gradient(circle at 50% 0%, rgba(249,115,22,0.18), transparent 70%); }
.feature-card.c-red    { --card-glow: radial-gradient(circle at 50% 0%, rgba(239,68,68,0.18), transparent 70%); }
.feature-card.c-blue   { --card-glow: radial-gradient(circle at 50% 0%, rgba(96,165,250,0.18), transparent 70%); }
.feature-card.c-green  { --card-glow: radial-gradient(circle at 50% 0%, rgba(52,211,153,0.18), transparent 70%); }

/* ═══════════════════════════════════════════════════════════════
   BENTO GRID — Live community (replaces pinned scroll story)
   ═══════════════════════════════════════════════════════════════ */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 170px;
    gap: 1rem;
}
.bento-tile {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.25rem 1.4rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s,
                box-shadow 0.3s;
    cursor: pointer;
    min-width: 0; /* allow flex children to shrink */
}
.bento-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--tile-glow, transparent);
    opacity: 0.45;
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 0;
}
.bento-tile > * { position: relative; z-index: 1; }
.bento-tile:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
}
.bento-tile:hover::before { opacity: 0.7; }

.bento-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.bento-big {
    font-size: 1.4rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.02em;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bento-sub {
    font-size: 0.8rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bento-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: auto;
    padding-top: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bento-empty {
    color: #64748b;
    font-size: 0.85rem;
    margin: auto 0;
    font-style: italic;
}

/* Hero tile: 2x2 */
.bento-hero { grid-column: span 2; grid-row: span 2; padding: 1.5rem 1.75rem; }
.bento-hero .bento-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: auto 0;
}
.bento-hero .bento-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}
.bento-hero .bento-team .emoji { font-size: 2.5rem; }
.bento-hero .bento-team .name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.bento-hero .bento-digits {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    color: #f1f5f9;
}
.bento-hero .bento-digits .big {
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: -0.05em;
}
.bento-hero .bento-digits .dash {
    font-size: 1.8rem;
    color: #475569;
    font-weight: 600;
}

/* Up Next tile: team emojis inline */
.bento-match {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: auto 0;
}
.bento-match .vs-mini {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Hot Training bar */
.bento-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}
.bento-bar-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #fbbf24, #f97316, #ef4444);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-bar-label {
    position: absolute;
    right: 0;
    top: 0.3rem;
    font-size: 0.7rem;
    color: #cbd5e1;
    font-weight: 600;
    z-index: 2;
}

/* Color themes — subtle radial gradient per tile */
.bento-tile.c-live    { --tile-glow: radial-gradient(circle at 30% 0%, rgba(96,165,250,0.25), transparent 70%); }
.bento-tile.c-yellow  { --tile-glow: radial-gradient(circle at 30% 0%, rgba(250,204,21,0.25), transparent 70%); }
.bento-tile.c-red     { --tile-glow: radial-gradient(circle at 30% 0%, rgba(239,68,68,0.25), transparent 70%); }
.bento-tile.c-blue    { --tile-glow: radial-gradient(circle at 30% 0%, rgba(59,130,246,0.25), transparent 70%); }
.bento-tile.c-green   { --tile-glow: radial-gradient(circle at 30% 0%, rgba(52,211,153,0.25), transparent 70%); }
.bento-tile.c-purple  { --tile-glow: radial-gradient(circle at 30% 0%, rgba(168,85,247,0.25), transparent 70%); }

/* Live pulse on the live tile */
.bento-tile.c-live::after {
    content: '';
    position: absolute;
    top: 1.25rem;
    right: 1.4rem;
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: livePulse 2s ease-in-out infinite;
    z-index: 2;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    50%      { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

/* ── Bento responsive: collapse to 2 cols on tablet, 1 on mobile ── */
@media (max-width: 900px) {
    .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
    .bento-hero { grid-column: span 2; grid-row: span 1; }
    .bento-hero .bento-score { gap: 0.5rem; }
    .bento-hero .bento-digits .big { font-size: 2.4rem; }
}
@media (max-width: 540px) {
    .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .bento-tile, .bento-hero { min-height: 140px; grid-column: span 1; grid-row: auto; padding: 1rem 1.2rem; }
    .bento-hero .bento-score { flex-direction: column; gap: 0.75rem; }
}

/* ── Collapsible info (Leaderboard "How points work") ── */
.points-info summary::-webkit-details-marker { display: none; }
.points-info summary span:first-child { transition: transform 0.2s ease; display: inline-block; }
.points-info[open] summary span:first-child { transform: rotate(90deg); }

/* ── Final CTA section (bottom) ── */
.final-cta {
    text-align: center;
    padding: 7rem 2rem 6rem;
    background: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.08), transparent 60%);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.final-cta h2 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #facc15, #f97316, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.final-cta p {
    color: #94a3b8;
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}
.final-cta .cta-row { display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .reveal, .stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: opacity 0.2s ease;
    }
    .scroll-cue, .scroll-progress { display: none; }
}