/* ============================================================
   Aufschlag Alpakas – CSS v2.0
   Modernes Tennisverein-Design
   Mobile-first, Dark/Light Mode
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: .25s ease;
    --transition-fast: .15s ease;
    --transition-slow: .5s ease;
    --max-width: 1140px;

    /* ── Type Scale ─────────────────────────────────── */
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.875rem;
    --text-md: 1rem;
    --text-lg: 1.15rem;
    --text-xl: 1.3rem;
    --text-2xl: 1.6rem;
    --text-3xl: 2rem;
    --text-4xl: 3rem;

    /* ── Spacing Scale ──────────────────────────────── */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;
    --space-10: 64px;

    /* ── Breakpoints (reference, used in @media) ───── */
    /* --bp-sm: 480px   — small mobile */
    /* --bp-md: 640px   — mobile/tablet */
    /* --bp-lg: 768px   — tablet/desktop */
    /* --bp-xl: 1024px  — desktop */
    /* --bp-admin: 900px — admin sidebar */
}

[data-theme="dark"] {
    --bg: #050f0b;
    --bg-alt: #0a1f16;
    --bg-elevated: #0d2b1f;
    --card: #0f3527;
    --card-hover: #134a36;
    --text: #e8f5f0;
    --text-secondary: #a3c9ba;
    --text-muted: #7aaa98;
    --border: #1a4a38;
    --border-subtle: #12362a;
    --accent: #22c55e;
    --accent-glow: rgba(34, 197, 94, 0.15);
    --accent-dim: #166534;
    --accent-text: #fff;
    --header-bg: rgba(5, 15, 11, 0.92);
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
    --gradient-hero: linear-gradient(160deg, #050f0b 0%, #0d3325 50%, #134a36 100%);
    --gradient-card: linear-gradient(145deg, rgba(15, 53, 39, 0.6), rgba(13, 43, 31, 0.3));
    --gold: #fbbf24;
    --silver: #94a3b8;
    --bronze: #d97706;
    --win: #22c55e;
    --win-bg: rgba(34, 197, 94, 0.15);
    --win-bg-subtle: rgba(34, 197, 94, 0.1);
    --win-border: rgba(34, 197, 94, 0.25);
    --loss: #ef4444;
    --loss-bg: rgba(239, 68, 68, 0.15);
    --loss-bg-subtle: rgba(239, 68, 68, 0.1);
    --loss-border: rgba(239, 68, 68, 0.25);
    --info: #60a5fa;
    --info-bg: rgba(59, 130, 246, 0.15);
    --gold-glow: rgba(251, 191, 36, 0.15);
    --accent-glow-strong: rgba(34, 197, 94, 0.25);
    --focus-ring: 0 0 0 3px rgba(34, 197, 94, 0.3);
    --disabled-opacity: 0.5;
}

[data-theme="light"] {
    --bg: #f6faf8;
    --bg-alt: #edf5f0;
    --bg-elevated: #e2efe8;
    --card: #ffffff;
    --card-hover: #f0faf5;
    --text: #1a2e26;
    --text-secondary: #3d5a4e;
    --text-muted: #5a7a6a;
    --border: #d0e0d8;
    --border-subtle: #e0ede6;
    --accent: #16a34a;
    --accent-glow: rgba(22, 163, 74, 0.1);
    --accent-dim: #bbf7d0;
    --accent-text: #fff;
    --header-bg: rgba(246, 250, 248, 0.92);
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
    --gradient-hero: linear-gradient(160deg, #f6faf8 0%, #e2efe8 50%, #d0e8dc 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(240,250,245,0.4));
    --gold: #d97706;
    --silver: #64748b;
    --bronze: #b45309;
    --win: #16a34a;
    --win-bg: rgba(22, 163, 74, 0.15);
    --win-bg-subtle: rgba(22, 163, 74, 0.1);
    --win-border: rgba(22, 163, 74, 0.25);
    --loss: #dc2626;
    --loss-bg: rgba(220, 38, 38, 0.15);
    --loss-bg-subtle: rgba(220, 38, 38, 0.1);
    --loss-border: rgba(220, 38, 38, 0.25);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);
    --gold-glow: rgba(217, 119, 6, 0.15);
    --accent-glow-strong: rgba(22, 163, 74, 0.25);
    --focus-ring: 0 0 0 3px rgba(22, 163, 74, 0.3);
    --disabled-opacity: 0.5;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ── Container ─────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.brand__logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.nav__links {
    display: none;
    gap: 4px;
}

.nav__links a {
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}
.nav__links a:hover {
    background: var(--accent-glow);
    color: var(--accent);
    text-decoration: none;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav__toggle { display: flex; }

.nav__menu {
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav__menu[hidden] { display: none; }
.nav__menu a {
    display: block;
    padding: 12px 14px;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background var(--transition);
}
.nav__menu a:hover {
    background: var(--accent-glow);
    text-decoration: none;
}

@media (min-width: 768px) {
    .nav__links { display: flex; }
    .nav__toggle { display: none; }
    .nav__menu { display: none !important; }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    gap: 8px;
}
.btn:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    text-decoration: none;
    transform: translateY(-1px);
}
.btn--primary {
    background: var(--accent);
    color: var(--accent-text);
    border-color: var(--accent);
}
.btn--primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.btn--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.1rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn--icon svg {
    display: block;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 0;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, var(--accent-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.08) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin-bottom: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 3px solid var(--border);
    transition: transform 0.6s ease;
}

.hero-logo:hover {
    transform: scale(1.05) rotate(3deg);
}

@media (min-width: 768px) {
    .hero-logo { width: 200px; height: 200px; }
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    background: var(--accent-glow);
    border: 1px solid var(--accent-dim);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.hero-accent {
    background: linear-gradient(135deg, var(--accent), #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 32px;
}

.hero-champion {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.95rem;
    backdrop-filter: blur(8px);
}

.champion-icon { font-size: 1.3rem; }

@media (min-width: 768px) {
    .hero { padding: 120px 0 80px; }
    .hero-title { font-size: 4.5rem; }
    .hero-tagline { font-size: 1.3rem; }
}

/* ── Stats Bar ─────────────────────────────────────────── */
.stats-bar {
    background: var(--bg-alt);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 32px 0 24px;
    text-align: center;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.stats-season-label {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .stat-number { font-size: 2.8rem; }
    .stats-bar { padding: 40px 0 32px; }
}

/* ── Section Common ────────────────────────────────────── */
.section {
    padding: 60px 0;
}

.section--alt {
    background: var(--bg-alt);
}

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

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-title--center {
    text-align: center;
    width: 100%;
    margin-bottom: 32px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: -24px;
    margin-bottom: 24px;
}

.section-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

@media (min-width: 768px) {
    .section { padding: 80px 0; }
    .section-title { font-size: 2.2rem; }
}

/* ── News Cards ────────────────────────────────────────── */
/* ── News Showcase ─────────────────────────────────────── */
.news-showcase {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .news-showcase {
        grid-template-columns: 3fr 2fr;
        gap: 20px;
    }
}

/* Featured Article */
.news-feature {
    display: block;
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text);
}

.news-feature__cover {
    height: 200px;
    overflow: hidden;
}
.news-feature__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.news-feature:hover .news-feature__cover img {
    transform: scale(1.04);
}

.news-feature__accent {
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #f59e0b, var(--accent));
    background-size: 200% 100%;
    animation: shimmer-accent 3s ease infinite;
}

@keyframes shimmer-accent {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.news-feature:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.news-feature__content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-feature__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-badge--pinned {
    background: var(--accent);
    color: var(--accent-text);
}

.news-badge--intern {
    background: var(--gold);
    color: #000;
}

/* Push bell toggle */
#pushToggle .push-bell-off { color: var(--muted); }

.news-badge--sm { padding: 2px 8px; font-size: 0.62rem; }

.news-feature__date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.news-feature__title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.news-feature__excerpt {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.news-feature__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

.news-feature__author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.news-feature__author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
}

.news-feature__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    transition: gap 0.2s ease;
}

.news-feature:hover .news-feature__cta {
    gap: 10px;
}

/* Sidebar Compact Articles */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
}

.news-compact:last-child { border-bottom: none; }

.news-compact:hover {
    background: var(--bg-elevated);
    color: var(--text);
    text-decoration: none;
}

.news-compact__number {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    flex-shrink: 0;
}

.news-compact__number span {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 1px;
}

.news-compact__body {
    flex: 1;
    min-width: 0;
}

.news-compact__title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
}

.news-compact__author {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.news-compact__arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.2s ease;
}

.news-compact:hover .news-compact__arrow {
    opacity: 1;
    transform: translateX(0);
}

@media (min-width: 768px) {
    .news-feature__title { font-size: 1.6rem; }
    .news-sidebar {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 4px 0;
    }
    .news-compact { padding: 18px 20px; }
}

/* ── Ranking Table ─────────────────────────────────────── */
.ranking-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ranking-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--border);
    background: var(--bg-elevated);
}

.ranking-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.ranking-table tbody tr {
    transition: background var(--transition);
    opacity: 0;
    transform: translateX(-20px);
    animation: rankSlideIn 0.4s ease forwards;
}

.ranking-table tbody tr:nth-child(1) { animation-delay: 0s; }
.ranking-table tbody tr:nth-child(2) { animation-delay: 0.05s; }
.ranking-table tbody tr:nth-child(3) { animation-delay: 0.1s; }
.ranking-table tbody tr:nth-child(4) { animation-delay: 0.15s; }
.ranking-table tbody tr:nth-child(5) { animation-delay: 0.2s; }
.ranking-table tbody tr:nth-child(6) { animation-delay: 0.25s; }
.ranking-table tbody tr:nth-child(7) { animation-delay: 0.3s; }
.ranking-table tbody tr:nth-child(8) { animation-delay: 0.35s; }
.ranking-table tbody tr:nth-child(9) { animation-delay: 0.4s; }
.ranking-table tbody tr:nth-child(10) { animation-delay: 0.45s; }

@keyframes rankSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ranking-table tbody tr:hover {
    background: var(--accent-glow);
}

.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

.rank-col { width: 50px; text-align: center; }
.num-col { text-align: center; width: 55px; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.rank-badge--1 { background: var(--gold); color: #000; }
.rank-badge--2 { background: var(--silver); color: #fff; }
.rank-badge--3 { background: var(--bronze); color: #fff; }
.rank-badge--4 { background: var(--accent-dim); color: var(--accent); }

.rank-first td {
    font-weight: 600;
    background: var(--gold-glow);
}
.rank-first .rank-badge--1 {
    animation: goldPulse 2s ease-in-out infinite;
}
@keyframes goldPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 12px 4px rgba(251, 191, 36, 0.15); }
}

.player-name { font-weight: 600; }
.player-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}
.player-link:hover {
    color: var(--accent);
}

.streak-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.02em;
}

.streak-badge--w {
    background: rgba(34, 197, 94, 0.15);
    color: var(--win);
}

.streak-badge--l {
    background: rgba(239, 68, 68, 0.15);
    color: var(--loss);
}

.player-fullname {
    display: none;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 6px;
}

.wins { color: var(--win); font-weight: 700; }
.losses { color: var(--loss); font-weight: 600; }
.positive { color: var(--win); font-weight: 600; }
.negative { color: var(--loss); font-weight: 600; }

.hide-mobile { display: none; }

.ranking-legend {
    margin-top: 16px;
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot--playoff { background: var(--accent-dim); }

@media (min-width: 768px) {
    .hide-mobile { display: table-cell; }
    .player-fullname { display: inline; }
    .ranking-table { font-size: 0.95rem; }
}

/* ── Match Cards ───────────────────────────────────────── */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 20px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.match-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.match-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.match-phase {
    font-size: 0.7rem;
    padding: 3px 10px;
    background: var(--bg-elevated);
    border-radius: 50px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.match-players {
    display: flex;
    align-items: center;
    gap: 16px;
}

.match-player {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.match-player:last-child {
    justify-content: flex-end;
}

.match-player-name {
    font-weight: 600;
    font-size: 1rem;
}

.match-winner .match-player-name {
    color: var(--accent);
}

.match-vs {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.winner-badge {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 800;
}

.match-score {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.set-score {
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.set-won { color: var(--win); }
.set-lost { color: var(--text-muted); }

@media (min-width: 768px) {
    .match-card {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 24px;
    }
    .match-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 120px;
    }
}

/* ── Member Cards ──────────────────────────────────────── */
.members-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.member-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.member-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.member-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-initial {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-text);
}

.member-info { min-width: 0; }

.member-nickname {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.member-fullname {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.member-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.member-badge--leber_cup {
    background: linear-gradient(135deg, #b87333, #d4956a);
}

.member-badge--unteres_playoff {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
}

@media (min-width: 768px) {
    .members-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .members-grid { grid-template-columns: 1fr; }
}

/* ── Champions / Hall of Fame ──────────────────────────── */
/* ── Hall of Fame – Compact Layout ─────────────────── */
.hof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.hof-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: all var(--transition);
}

.hof-section:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
}

.hof-section--meisterteller:hover { border-color: var(--gold); box-shadow: 0 4px 20px rgba(251, 191, 36, 0.1); }
.hof-section--leber_cup:hover { border-color: #b87333; box-shadow: 0 4px 20px rgba(184, 115, 51, 0.1); }
.hof-section--unteres_playoff:hover { border-color: #94a3b8; box-shadow: 0 4px 20px rgba(148, 163, 184, 0.1); }

.hof-section__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.hof-section__icon {
    font-size: 1.6rem;
    line-height: 1;
}

.hof-section__title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hof-section__entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hof-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.hof-entry:hover {
    background: var(--bg-elevated);
}

.hof-entry__year {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

.hof-entry__name {
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}

.hof-entry__desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Player Profile ───────────────────────────────────── */
.player-streak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
}

.player-streak--w {
    background: rgba(34, 197, 94, 0.12);
    color: var(--win);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.player-streak--l {
    background: rgba(239, 68, 68, 0.12);
    color: var(--loss);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.player-title {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--border);
}

.season-break__winrate {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.h2h-overview {
    padding: 0 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.h2h-row {
    display: grid;
    grid-template-columns: 1fr auto 80px;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.h2h-row:hover {
    background: var(--bg-elevated);
}

.h2h-row__opponent {
    display: flex;
    align-items: center;
    gap: 10px;
}

.h2h-row__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.h2h-row__name {
    font-weight: 600;
    font-size: 0.9rem;
}

.h2h-row__last {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.h2h-row__record {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.h2h-row__wins {
    color: var(--win);
}

.h2h-row__losses {
    color: var(--loss);
}

.h2h-row__sep {
    color: var(--text-muted);
}

.h2h-row__bar {
    height: 6px;
    border-radius: 3px;
    background: var(--loss-bg);
    overflow: hidden;
}

.h2h-row__bar-fill {
    height: 100%;
    background: var(--win);
    border-radius: 3px;
    transition: width 0.3s ease;
}

@media (max-width: 600px) {
    .h2h-row {
        grid-template-columns: 1fr auto;
    }
    .h2h-row__bar {
        display: none;
    }
}

/* ── Auth ──────────────────────────────────────────────── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
}
.auth-row { margin-bottom: 18px; }
.auth-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}
.auth-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-text);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}
.auth-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.auth-error {
    background: var(--loss-bg-subtle);
    color: var(--loss);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.9rem;
    border: 1px solid var(--loss-border);
}
.auth-muted { color: var(--text-muted); font-size: 0.85rem; }
.auth-muted a { color: var(--accent); }

/* ── Flash Messages ────────────────────────────────────── */
.flash {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}
.flash--success {
    background: var(--win-bg-subtle);
    color: var(--win);
    border: 1px solid var(--win-border);
}
.flash--error {
    background: var(--loss-bg-subtle);
    color: var(--loss);
    border: 1px solid var(--loss-border);
}

/* ── Tables ────────────────────────────────────────────── */
.tablewrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th, .table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}
.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Profile Menu ──────────────────────────────────────── */
.profile-menu { position: relative; }
.profile__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
}
.profile__menu[hidden] { display: none; }

/* Nav-Links im Profil-Dropdown nur auf Mobil */
.profile__menu-mobile-nav {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

@media (min-width: 768px) {
    .profile__menu-mobile-nav {
        display: none;
    }
}

.profile__menu-section + .profile__menu-section {
    border-top: 1px solid var(--border-subtle);
    padding-top: 4px;
    margin-top: 4px;
}
.profile__menu a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background var(--transition);
}
.profile__menu a:hover {
    background: var(--accent-glow);
    text-decoration: none;
}
.nav-logout-btn {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition);
}
.nav-logout-btn:hover {
    background: var(--accent-glow);
}

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
    margin-top: auto;
    padding: 48px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-alt);
}

/* ── Theme Toggle ──────────────────────────────────────── */
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: inline; }
[data-theme="light"] .i-sun { display: inline; }
[data-theme="light"] .i-moon { display: none; }

/* ── Main spacing ──────────────────────────────────────── */
main.container {
    padding-top: 24px;
    padding-bottom: 48px;
    flex: 1;
}

/* ── Animations ────────────────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Cards (generic) ───────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.card__head h1, .card__head h2, .card__head h3 {
    margin: 0;
    font-size: 1.15rem;
}

/* ── Error Pages ──────────────────────────────────────── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50vh;
    padding: 40px 20px;
}
.error-icon { font-size: 4rem; margin-bottom: 16px; }
.error-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent), #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    margin-bottom: 12px;
}
.error-text {
    font-size: 1.2rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
}
.error-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* ── Hint ──────────────────────────────────────────────── */
.hint { color: var(--text-muted); font-size: 0.9rem; }

/* ── News Grid (public /news) ─────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.news-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.news-card--featured {
    grid-column: 1 / -1;
}

.news-card__cover {
    height: 180px;
    overflow: hidden;
    background: var(--bg-elevated);
}

.news-card--featured .news-card__cover {
    height: 220px;
}

.news-card__cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-dim), var(--bg-elevated));
}

.news-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.news-card:hover .news-card__cover img {
    transform: scale(1.04);
}

.news-card__body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.news-card__pin {
    background: var(--accent);
    color: var(--accent-text);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-card__intern {
    background: var(--gold);
    color: #000;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
}

.news-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card--featured .news-card__title {
    font-size: 1.5rem;
    -webkit-line-clamp: 3;
}

.news-card__excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
}

.news-card__author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.news-card__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-text);
    flex-shrink: 0;
}

.news-card__cta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    transition: transform var(--transition);
}

.news-card:hover .news-card__cta {
    transform: translateX(4px);
}

@media (min-width: 720px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .news-card--featured { display: grid; grid-template-columns: 1fr 1fr; }
    .news-card--featured .news-card__cover { height: 100%; }
}

@media (min-width: 1100px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
    .news-card--featured { grid-template-columns: 3fr 2fr; }
}

/* ── News Detail ──────────────────────────────────────── */
.news-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 0 48px;
}

.news-detail__hero {
    margin: -24px -20px 32px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    max-height: 300px;
}

.news-detail__cover {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.news-detail__header {
    margin-bottom: 32px;
}

.news-detail__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.news-detail__title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.news-detail__excerpt {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
}

.news-detail__content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.news-detail__gallery {
    margin-top: 40px;
}

.news-detail__gallery-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.news-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.news-gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    display: block;
}

.news-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.news-gallery-item:hover img {
    transform: scale(1.05);
}

.news-detail__back {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
    .news-detail__title { font-size: 2.6rem; }
    .news-detail__hero { margin: -24px 0 40px; border-radius: var(--radius-lg); }
}

/* ── Dashboard ────────────────────────────────────────── */
.dash-hero {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.dash-hero__greeting {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-hero__avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-text);
    flex-shrink: 0;
    overflow: hidden;
}

.dash-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-hero__title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}

.dash-hero__sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.dash-hero__stats {
    display: flex;
    gap: 20px;
}

.dash-hero__stat {
    text-align: center;
}

.dash-hero__stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.dash-hero__stat-value--win { color: var(--win); }
.dash-hero__stat-value--loss { color: var(--loss); }

.dash-hero__stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

@media (max-width: 600px) {
    .dash-hero__stats { gap: 14px; }
    .dash-hero__stat-value { font-size: 1.1rem; }
}

/* Dashboard Grid Layout */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.dash-grid__main { display: flex; flex-direction: column; gap: 20px; }
.dash-grid__side { display: flex; flex-direction: column; gap: 20px; }

@media (max-width: 900px) {
    .dash-grid { grid-template-columns: 1fr; }
}

/* Dashboard Quick Links Grid (full width) */
.dash-quick-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.dash-quick-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.dash-quick-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--accent);
}

.dash-quick-card__icon {
    color: var(--accent);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dash-quick-card:hover .dash-quick-card__icon { opacity: 1; }

.dash-quick-card__label {
    font-size: 0.78rem;
    font-weight: 600;
}

.dash-quick-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 0.65rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .dash-quick-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
    .dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.dash-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.dash-stat:hover { transform: translateY(-2px); }

.dash-stat__value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.dash-stat__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
}

.form-dot--w { background: rgba(34,197,94,0.15); color: var(--win); }
.form-dot--l { background: rgba(239,68,68,0.15); color: var(--loss); }

/* Dashboard Events */
.dash-events { padding: 0 20px 16px; }

.dash-event {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.dash-event:last-child { border-bottom: none; }

.dash-event__date {
    flex-shrink: 0;
    width: 44px;
    height: 48px;
    background: var(--accent-dim);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dash-event__day {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
}

.dash-event__month {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 1px;
}

.dash-event__info {
    min-width: 0;
}

.dash-event__info strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Dashboard Quick Links */
.dash-links { padding: 4px 12px 12px; }

.dash-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

.dash-link:hover {
    background: var(--accent-dim);
    text-decoration: none;
    color: var(--text);
}

.dash-link__icon {
    flex-shrink: 0;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0.8;
}

.dash-link:hover .dash-link__icon { opacity: 1; }

.dash-link__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0 6px;
    margin-left: 4px;
}

@media (max-width: 600px) {
    .dash-stats { grid-template-columns: repeat(3, 1fr); }
    .dash-hero { padding: 20px; }
    .dash-hero__title { font-size: 1.2rem; }
}

/* ── Intern Tabs ──────────────────────────────────────── */
.intern-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.intern-tab {
    padding: 10px 18px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
}

.intern-tab:hover {
    color: var(--accent);
    text-decoration: none;
}

.intern-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--accent-glow);
}

.intern-content {
    min-height: 300px;
}

.intern-updated {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Markdown Body ────────────────────────────────────── */
.markdown-body h2 { font-size: 1.4rem; font-weight: 800; margin: 24px 0 12px; }
.markdown-body h3 { font-size: 1.15rem; font-weight: 700; margin: 20px 0 8px; }
.markdown-body h4 { font-size: 1rem; font-weight: 600; margin: 16px 0 8px; }
.markdown-body p { margin-bottom: 12px; line-height: 1.7; }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin-bottom: 12px; }
.markdown-body li { margin-bottom: 4px; line-height: 1.6; }

/* ── Winterplan Cards ─────────────────────────────────── */
.winter-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winter-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.winter-card--mine {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.winter-card--frei {
    opacity: 0.7;
}

.winter-card__date {
    font-size: 0.9rem;
    color: var(--text);
}

.winter-card__players {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.winter-player {
    padding: 4px 12px;
    background: var(--bg-elevated);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.winter-notes {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    grid-column: 1 / -1;
}

.winter-me {
    color: var(--accent);
    font-weight: 700;
}

.winter-player--frei {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 600px) {
    .winter-card {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ── Profile Page ─────────────────────────────────────── */
/* ── Profile Hero ──────────────────────────────────── */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
}

.profile-hero__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-hero__avatar {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.profile-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero__initial {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--accent-text);
}

.profile-hero__avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.profile-hero__avatar:hover .profile-hero__avatar-overlay {
    opacity: 1;
}

.profile-hero__avatar-form { display: none; }

.profile-hero__remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--card);
    background: var(--loss);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-hero__avatar-wrap:hover .profile-hero__remove-btn {
    opacity: 1;
}

.profile-hero__info {
    flex: 1;
    min-width: 0;
}

.profile-hero__name {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.profile-hero__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.profile-hero__nickname {
    font-weight: 600;
    color: var(--accent);
}

.profile-hero__sep {
    color: var(--text-muted);
    opacity: 0.5;
}

.profile-hero__actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 600px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }
    .profile-hero__meta { justify-content: center; }
    .profile-hero__actions { justify-content: center; }
    .profile-hero__avatar { width: 88px; height: 88px; border-radius: 20px; }
}

/* ── Profile Stats ──────────────────────────────────── */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s ease;
}

.profile-stat:hover { transform: translateY(-2px); }

.profile-stat__value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.profile-stat__value--win { color: var(--win); }
.profile-stat__value--loss { color: var(--loss); }

.profile-stat__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 4px;
}

.profile-stat__bar {
    margin-top: 8px;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.profile-stat__bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.6s ease;
}

@media (max-width: 640px) {
    .profile-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ── Profile Badges (Streak + Titles) ────────────── */
.profile-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--border);
}

.profile-badge--w {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.3);
    color: var(--win);
}

.profile-badge--l {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: var(--loss);
}

.profile-badge--title {
    background: rgba(234,179,8,0.08);
    border-color: rgba(234,179,8,0.25);
}

.profile-badge__count {
    font-size: 1.1rem;
    font-weight: 800;
}

/* ── Profile Seasons Grid (full width) ────────────── */
.profile-seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* ── Profile Settings Tabs ───────────────────────── */
.profile-settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-settings-tab:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

.profile-settings-tab--active {
    color: var(--accent);
    background: rgba(34,197,94,0.08);
    border-color: rgba(34,197,94,0.2);
}

.profile-settings-panel {
    display: none;
}

.profile-settings-panel--active {
    display: block;
}

.profile-settings-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.profile-settings-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.profile-settings-action {
    padding-top: 4px;
}

@media (max-width: 500px) {
    .profile-settings-tabs { flex-direction: column; }
    .profile-settings-fields { grid-template-columns: 1fr; }
}

.profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    transition: border-color 0.2s ease;
}

.profile-card:hover {
    border-color: var(--accent-dim);
}

.profile-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

/* ── Profile Seasons ──────────────────────────────── */
.profile-seasons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-season {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-season:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.profile-season__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.profile-season__name {
    font-weight: 600;
    font-size: 0.9rem;
}

.profile-season__winrate {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

.profile-season__bar {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.profile-season__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    border-radius: 3px;
    transition: width 0.6s ease;
}

.profile-season__detail {
    display: flex;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.profile-season__detail .wins { color: var(--win); }
.profile-season__detail .losses { color: var(--loss); }

/* ── Player Profile Header (public) ──────────────── */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.player-header__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-header__avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.player-header__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-header__initial {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-text);
}

.player-header__name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2px;
}

/* ── Dashboard Empty State ──────────────────────────── */
.dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.dash-empty__icon { opacity: 0.4; }
.dash-empty__text { color: var(--text-muted); font-size: 0.9rem; }

/* ── Dashboard Hero Avatar with Image ──────────────── */
.dash-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Avatar Preview Modal ─────────────────────────── */
.avatar-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(4px);
}

.avatar-preview-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.avatar-preview-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.avatar-preview-overlay.active .avatar-preview-modal {
    transform: scale(1);
}

.avatar-preview-modal__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.avatar-preview-modal__image-wrap {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    border-radius: 24px;
    overflow: hidden;
    border: 3px solid var(--border);
    background: var(--bg-elevated);
}

.avatar-preview-modal__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-modal__info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.avatar-preview-modal__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-bottom: 20px;
}

.avatar-preview-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ── Forms (public) ──────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 700px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Badge (shared) ───────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge--success { background: rgba(34,197,94,0.15); color: var(--win); }
.badge--danger { background: rgba(239,68,68,0.15); color: var(--loss); }
.badge--warning { background: rgba(251,191,36,0.15); color: var(--gold); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--muted { background: var(--bg-elevated); color: var(--text-muted); }

/* ── Member Wins ──────────────────────────────────────── */
.member-wins {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Reveal Animations ────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Scroll to Top ────────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .3s ease, transform .3s ease;
    z-index: 90;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    box-shadow: 0 6px 24px rgba(34,197,94,0.3);
    transform: translateY(-2px);
}

/* ── Member Modal ─────────────────────────────────────── */
.member-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
}

.member-modal.active {
    opacity: 1;
    visibility: visible;
}

.member-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
}

.member-modal__panel {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.92) translateY(12px);
    transition: transform .3s cubic-bezier(.16,1,.3,1);
}

.member-modal.active .member-modal__panel {
    transform: scale(1) translateY(0);
}

.member-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.member-modal__avatar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-text);
    margin: 0 auto 14px;
    overflow: hidden;
}

.member-modal__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-modal__name {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.member-modal__badge {
    margin-bottom: 20px;
}

.member-modal__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.modal-stat {
    padding: 12px 8px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.modal-stat__val {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.2;
}

.modal-stat__lbl {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 2px;
}

.modal-form-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-form-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

/* ── Dashboard Match List ────────────────────────────── */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-pending-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.match-pending-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.match-pending__info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-pending__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-pending__avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--accent-text);
    flex-shrink: 0;
}

/* ── Match Edit Header (shared) ──────────────────────── */
.match-edit-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.match-edit-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.match-edit-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent-text);
}

.match-edit-vs {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-top: 10px;
}

/* ── Set Inputs (shared with admin) ──────────────────── */
.set-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin-top: 8px;
}

.set-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.set-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
}

.set-scores {
    display: flex;
    align-items: center;
    gap: 6px;
}

.set-score {
    width: 60px !important;
    min-width: 60px;
    text-align: center;
    font-weight: 700;
    font-size: 1rem !important;
    padding: 8px 4px !important;
}

.set-colon {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ── Stats Tabs ────────────────────────────────────────── */
.stats-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 4px;
}

.stats-tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border-subtle);
}

.stats-tab:hover { background: var(--card-hover); color: var(--text); }
.stats-tab--active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }

/* ── Ranking Table Full ────────────────────────────────── */
.ranking-table--full th,
.ranking-table--full td {
    padding: 10px 12px;
}

.player-link {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}
.player-link:hover { color: var(--accent); }

.title-count {
    font-weight: 700;
    color: var(--gold);
}

/* ── Season Archive Cards ──────────────────────────────── */
.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.season-archive-card {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.season-archive-card:hover {
    border-color: var(--accent);
    background: var(--card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.season-archive__year {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.season-archive__name {
    font-size: 1.1rem;
    margin: 8px 0;
}

.season-archive__meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.season-archive__status { margin-top: 8px; }

.season-archive__champion {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-weight: 600;
    color: var(--gold);
}

/* ── Champion Banner ───────────────────────────────────── */
.champion-banner {
    background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(34,197,94,0.1));
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.champion-banner__icon { font-size: 1.5rem; }

/* ── Playoff Bracket ───────────────────────────────────── */
.playoff-bracket {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playoff-round {
    margin-bottom: 8px;
}

.playoff-round__title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.playoff-match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    margin-bottom: 6px;
}

.playoff-match--done { border-color: var(--accent-dim); }

.playoff-match__player {
    font-weight: 500;
    font-size: 0.9rem;
}

.playoff-match__player:last-child { text-align: right; }

.playoff-match--winner {
    font-weight: 800;
    color: var(--accent);
}

.playoff-match__score {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    justify-content: center;
}

/* ── Head-to-Head ──────────────────────────────────────── */
/* ── H2H Picker ──────────────────────────────────────── */
.h2h-picker {
    background: var(--card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.h2h-form {
    display: flex;
    align-items: flex-end;
    gap: 20px;
}

.h2h-player-select {
    flex: 1;
    min-width: 160px;
}

.h2h-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.h2h-dropdown select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2388a89a' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.h2h-dropdown select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

.h2h-divider {
    padding-bottom: 10px;
    flex-shrink: 0;
}

.h2h-divider__text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-elevated);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    border: 2px solid var(--border);
}

/* ── H2H Scoreboard ──────────────────────────────────── */
.h2h-result { margin-top: 24px; }

.h2h-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 32px 24px;
    background: var(--card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
}

.h2h-scoreboard__player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
}

.h2h-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.h2h-avatar--p1 { background: rgba(16, 185, 129, .15); color: var(--accent); }
.h2h-avatar--p2 { background: rgba(234, 179, 8, .15); color: var(--gold); }

.h2h-scoreboard__name {
    font-weight: 600;
    font-size: 0.95rem;
}

.h2h-scoreboard__center { text-align: center; }

.h2h-big-score {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.h2h-big-score__p1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

.h2h-big-score__sep {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-muted);
}

.h2h-big-score__p2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
}

.h2h-scoreboard__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 4px;
}

/* H2H Detail Rows */
.h2h-details {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: var(--radius);
    overflow: hidden;
}

.h2h-detail-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px 24px;
    background: var(--card);
    border: 1px solid var(--border-subtle);
}

.h2h-detail-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.h2h-detail-row:last-child { border-radius: 0 0 var(--radius) var(--radius); }

.h2h-detail__val {
    font-size: 1.3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.h2h-detail__val:first-child { text-align: right; }
.h2h-detail__val:last-child { text-align: left; }

.h2h-detail--p1 { color: var(--accent); }
.h2h-detail--p2 { color: var(--gold); }

.h2h-detail__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    min-width: 90px;
}

/* ── Season Breakdown (Dashboard) ──────────────────────── */
.season-breakdown { padding: 0 20px 16px; }

.season-break__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.season-break__row:last-child { border-bottom: none; }

.season-break__name {
    font-weight: 600;
    font-size: 0.9rem;
}

.season-break__stats {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 0.85rem;
}

.season-break__wins { color: var(--win); font-weight: 700; }
.season-break__losses { color: var(--loss); font-weight: 700; }
.season-break__sep { color: var(--text-muted); }
.season-break__played { color: var(--text-muted); font-size: 0.8rem; }

/* ── W.O. Score Badge ──────────────────────────────────── */
.set-wo {
    background: rgba(251,191,36,0.15);
    color: var(--gold);
    border-color: rgba(251,191,36,0.3);
    font-weight: 800;
}

/* ── Legal Content ─────────────────────────────────────── */
.legal-content {
    padding: 24px;
    line-height: 1.7;
}

.legal-content h2 {
    font-size: 1.1rem;
    margin: 24px 0 8px;
    color: var(--text);
}

.legal-content h2:first-child { margin-top: 0; }

.legal-content ul {
    padding-left: 20px;
    margin: 8px 0;
}

.legal-content li { margin: 4px 0; }

.legal-content a { color: var(--accent); }

/* ── Footer Enhanced ───────────────────────────────────── */
/* Footer Top */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    padding-bottom: 32px;
}

.footer-brand__link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.footer-brand__link img { opacity: 0.8; transition: var(--transition); }
.footer-brand__link:hover img { opacity: 1; }

.footer-brand__name {
    font-size: 1rem;
    display: block;
    line-height: 1.2;
}

.footer-brand__tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

/* Footer Nav */
.footer-nav {
    display: flex;
    gap: 48px;
}

.footer-nav__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-nav__title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.footer-nav__group a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    line-height: 1.6;
}

.footer-nav__group a:hover { color: var(--accent); }

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding: 16px 0 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.footer-sep { opacity: 0.4; }


/* ── Progress Bar ──────────────────────────────────────── */
.progress-bar {
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar--lg { height: 8px; }

.progress-bar__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ── Legend Dots ────────────────────────────────────────── */
.ranking-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.legend-item { display: flex; align-items: center; gap: 6px; }

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot--playoff { background: var(--accent); }
.legend-dot--upper { background: var(--win); }
.legend-dot--lower { background: var(--loss); }

/* ── Rank styling for upper/lower ──────────────────────── */
.rank-upper { border-left: 3px solid var(--win); }
.rank-lower { border-left: 3px solid var(--loss); }
.rank-divider td { padding: 0 !important; height: 2px; background: var(--border); }

/* Playoff qualification indicators */
.playoff-qual { font-size: 0.65rem; margin-left: 6px; vertical-align: middle; }
.playoff-qual--upper { color: var(--win); }
.playoff-qual--lower { color: var(--loss); }
.legend-qual { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; font-size: 0.82rem; }
.legend-qual--upper { color: var(--win); }
.legend-qual--lower { color: var(--loss); }

/* ── Compact Match Card ────────────────────────────────── */
/* ── Match Row (compact, modern) ──────────────────────── */
.match-list-modern {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-date-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 20px 0 8px;
}

.match-date-header:first-child { padding-top: 0; }

/* ── Match Row (ATP/Flashscore Style) ────────────────── */
.match-row {
    display: grid;
    grid-template-columns: auto 1fr;
    background: var(--card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, background 0.15s ease;
    overflow: hidden;
}

.match-row:hover {
    border-color: var(--border);
    border-left-color: var(--accent);
    background: var(--bg-elevated);
}

/* Left: Date/Meta column */
.match-row__meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 14px;
    border-right: 1px solid var(--border-subtle);
    min-width: 90px;
    gap: 2px;
}

.match-row__day {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.match-row__season {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    opacity: 0.7;
}

.match-row__badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 50px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    margin-top: 2px;
    display: inline-block;
    width: fit-content;
}
.match-row__badge--vf { background: #1a3a5c; color: #5ba3e6; border: 1px solid #2a5a8c; }
.match-row__badge--hf { background: #3a1a5c; color: #b07ae6; border: 1px solid #5a2a8c; }
.match-row__badge--finale { background: #5c3a1a; color: #e6b05a; border: 1px solid #8c6a2a; }
.match-row__badge--placement { background: #1a3a3a; color: #5ac8c8; border: 1px solid #2a6a6a; }
.match-row__badge--playoff { background: #2a2a4a; color: #8888cc; border: 1px solid #4a4a7a; }
[data-theme="light"] .match-row__badge--vf { background: #e3f0ff; color: #1a5aa0; border-color: #a0c8f0; }
[data-theme="light"] .match-row__badge--hf { background: #f0e3ff; color: #6a1aa0; border-color: #c8a0f0; }
[data-theme="light"] .match-row__badge--finale { background: #fff5e3; color: #a06a1a; border-color: #f0d0a0; }
[data-theme="light"] .match-row__badge--placement { background: #e3fff5; color: #1a6a4a; border-color: #a0e0c0; }
[data-theme="light"] .match-row__badge--playoff { background: #e8e8f5; color: #4a4a8a; border-color: #b0b0d0; }

/* Right: Players + Scores table */
.match-row__body {
    display: flex;
    flex-direction: column;
}

.match-row__line {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 6px 14px;
    gap: 12px;
}

.match-row__line + .match-row__line {
    border-top: 1px solid var(--border-subtle);
}

.match-row__name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-row__name--winner {
    color: var(--accent);
}

.match-row__name--loser {
    color: var(--text-secondary);
}

.match-row__sets {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}

.match-row__set {
    width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    padding: 2px 0;
    color: var(--text-secondary);
}

.match-row__set--won {
    color: var(--accent);
    font-weight: 800;
}

.match-row__set--lost {
    color: var(--text-muted);
    opacity: 0.6;
}

.match-row__wo {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 2px 10px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.match-row__pending {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-muted);
}

/* No-meta variant (no date column) */
.match-row--no-meta {
    grid-template-columns: 1fr;
}

.match-row--compact .match-row__line { padding: 5px 12px; }
.match-row--compact .match-row__meta { padding: 8px 12px; min-width: 70px; }
.match-row--pending-match { opacity: 0.6; }

/* Set Pills */
.set-pill {
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.set-pill--won { color: var(--win); }
.set-pill--lost { color: var(--text-muted); opacity: 0.7; }
.set-pill--wo {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 3px 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.set-pill--pending {
    font-size: 0.72rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-muted);
    background: transparent;
    border: 1px dashed var(--border);
}

.set-pill--preview {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: 1px dashed rgba(var(--color-warning-rgb, 200,150,50), 0.4);
}

/* ── Match Entry Form ────────────────────────────────── */
.match-entry { max-width: 560px; margin: 0 auto; }

.match-entry__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

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

.match-entry__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
}

.match-entry__name {
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.match-entry__vs {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.match-entry__vs > span:first-child {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-muted);
}

.match-entry__phase {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
}

.match-entry__form {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* WO Toggle */
.match-entry__wo-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    transition: border-color 0.2s ease;
}

.match-entry__wo-toggle:hover {
    border-color: var(--border);
}

.match-entry__wo-toggle input { margin: 0; }

.match-entry__wo-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* WO Options */
.match-entry__wo-pick { padding: 0 4px; }

.match-entry__wo-options {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.match-entry__wo-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-weight: 500;
}

.match-entry__wo-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(16, 185, 129, .05);
}

/* Set Inputs */
.match-entry__sets {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-entry__set {
    padding: 14px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.match-entry__set--optional {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.match-entry__set--optional:focus-within { opacity: 1; }

.match-entry__set-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.match-entry__set-label .hint { text-transform: none; letter-spacing: 0; }

.match-entry__set-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.match-entry__set-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    max-width: 120px;
}

.match-entry__set-player {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.match-entry__set-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-alt);
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    font-family: var(--font);
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -moz-appearance: textfield;
}

.match-entry__set-input::-webkit-inner-spin-button,
.match-entry__set-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.match-entry__set-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

.match-entry__set-colon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
}

.match-entry__date { max-width: 200px; }

.match-entry__actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.btn--lg {
    padding: 12px 28px;
    font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
    .footer-top {
        flex-direction: column;
        gap: 24px;
    }

    .footer-nav {
        gap: 32px;
    }

    .h2h-form {
        flex-direction: column;
        align-items: stretch;
    }

    .h2h-divider { align-self: center; }

    .h2h-scoreboard {
        flex-direction: column;
        gap: 20px;
    }

    .h2h-big-score__p1,
    .h2h-big-score__p2 { font-size: 2.2rem; }

    .h2h-detail-row {
        padding: 10px 16px;
    }

    .h2h-detail__val { font-size: 1.1rem; }

    .match-row {
        grid-template-columns: 1fr;
    }

    .match-row__meta {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 8px 12px;
        min-width: auto;
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
    }

    .match-row__name {
        font-size: 0.85rem;
    }

    .match-entry__header {
        flex-direction: column;
        gap: 12px;
    }

    .match-entry__wo-options {
        flex-direction: column;
    }

    .playoff-match {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .stats-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .stats-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ── Match Entry Mobile ───────────────────────────────── */
@media (max-width: 480px) {
    .match-entry__set-input {
        min-width: 48px;
        min-height: 48px;
        font-size: 1.2rem;
        padding: 8px;
    }

    .match-entry__set-inputs {
        gap: 8px;
    }

    .match-entry__set-side {
        max-width: 100px;
    }

    .match-entry__sets {
        gap: 16px;
    }

    .match-entry__actions {
        flex-direction: column;
    }

    .match-entry__actions .btn {
        text-align: center;
    }

    .set-score {
        min-width: 48px;
        min-height: 48px;
        font-size: 1rem !important;
        padding: 8px 4px !important;
    }
}

/* ── Bracket Switch ──────────────────────────────────────── */
.bracket-switch {
    display: flex;
    gap: 4px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
    max-width: 500px;
}

.bracket-switch__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.bracket-switch__btn:hover {
    color: var(--text);
    background: var(--bg);
}

.bracket-switch__btn--active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, .3);
}

.bracket-switch__btn--active:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ── Bracket Visual ──────────────────────────────────────── */
.bracket-visual {
    display: flex;
    gap: 20px;
    padding-bottom: 12px;
}

.bracket-column {
    flex: 1 1 0;
    min-width: 0;
}

.bracket-column__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.bracket-column__matches {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Bracket Match Card ──────────────────────────────────── */
.bracket-match {
    position: relative;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: var(--transition);
}

.bracket-match:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(16, 185, 129, .1);
}

.bracket-match--done {
    border-left: 3px solid var(--accent);
}

.bracket-match--preview {
    opacity: 0.7;
    border-style: dashed;
}

.bracket-match__player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.bracket-match__name {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bracket-match--winner .bracket-match__name {
    font-weight: 700;
    color: var(--accent);
}

.bracket-match--loser .bracket-match__name {
    opacity: 0.5;
}

.bracket-match__vs {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    flex-wrap: wrap;
}

.bracket-match__set {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-secondary);
}

.bracket-match__wo {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 4px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.bracket-match__pending {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive bracket – stack vertically on mobile only */
@media (max-width: 640px) {
    .bracket-visual {
        flex-direction: column;
        gap: 16px;
    }

    .bracket-column {
        min-width: 100%;
    }

    .bracket-switch {
        max-width: 100%;
    }
}

.stats-tabs--compact {
    gap: 4px;
}

.stats-tabs--compact .stats-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* ============================================================
   Animations & Transitions
   ============================================================ */

/* ── Scroll Reveal ─────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.stagger > :nth-child(1) { transition-delay: 0s; }
.stagger > :nth-child(2) { transition-delay: 0.08s; }
.stagger > :nth-child(3) { transition-delay: 0.16s; }
.stagger > :nth-child(4) { transition-delay: 0.24s; }
.stagger > :nth-child(5) { transition-delay: 0.32s; }
.stagger > :nth-child(6) { transition-delay: 0.4s; }
.stagger > :nth-child(7) { transition-delay: 0.48s; }
.stagger > :nth-child(8) { transition-delay: 0.56s; }
.stagger > :nth-child(9) { transition-delay: 0.64s; }

/* ── Card hover lift ─────────────────────────────────────── */
.card,
.match-card,
.season-archive-card,
.hof-section,
.stat-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.season-archive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
}

/* ── Ranking row highlight ────────────────────────────── */
.ranking-table tbody tr {
    transition: background 0.2s ease;
}

.ranking-table tbody tr:hover {
    background: var(--bg-elevated, rgba(255,255,255,.03));
}

/* ── Stat counter animation ──────────────────────────── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-value-animated {
    animation: countUp 0.5s ease-out both;
}

/* ── Hero entrance ───────────────────────────────────── */
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-content {
    animation: heroFadeIn 0.8s ease-out;
}

.hero-logo {
    animation: heroFadeIn 0.8s ease-out 0.2s both, logoFloat 4s ease-in-out 1s infinite, logoGlow 3s ease-in-out 1s infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 0 rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px 4px rgba(16, 185, 129, 0.25); }
}

@keyframes heroPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .3); }
    50% { box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
}

/* ── Stat grid entrance ──────────────────────────────── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-grid .stat-card:nth-child(1) { animation: slideUp 0.5s ease-out 0.1s both; }
.stats-grid .stat-card:nth-child(2) { animation: slideUp 0.5s ease-out 0.2s both; }
.stats-grid .stat-card:nth-child(3) { animation: slideUp 0.5s ease-out 0.3s both; }
.stats-grid .stat-card:nth-child(4) { animation: slideUp 0.5s ease-out 0.4s both; }

/* ── Button hover effects ────────────────────────────── */
.btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.25s ease, color 0.25s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn--primary:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, .35);
}

/* ── Nav link underline animation ────────────────────── */
.nav__links a {
    position: relative;
}

.nav__links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.nav__links a:hover::after {
    width: 100%;
    left: 0;
}

/* ── Bracket match entrance ──────────────────────────── */
.bracket-match {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* ── Flash message animation ─────────────────────────── */
@keyframes flashIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash {
    animation: flashIn 0.4s ease-out;
}

/* ── 404 Page Enhanced ───────────────────────────────── */
.error-animation {
    position: relative;
    width: 200px;
    height: 100px;
    margin-bottom: 24px;
}

.error-ball {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 35% 35%, #c8f040, #7cb342);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: ballBounce 1.5s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(124, 179, 66, .3);
}

.error-ball::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255,255,255,.3);
    clip-path: path('M15 0 Q30 15 15 30 Q0 15 15 0');
}

.error-net {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 2px;
    background: var(--border);
}

.error-net::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-bottom: none;
    opacity: 0.3;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 9px,
        var(--border) 9px,
        var(--border) 10px
    );
}

@keyframes ballBounce {
    0% { top: 10px; animation-timing-function: ease-in; }
    40% { top: 55px; animation-timing-function: ease-out; }
    55% { top: 30px; animation-timing-function: ease-in; }
    70% { top: 55px; animation-timing-function: ease-out; }
    85% { top: 42px; animation-timing-function: ease-in; }
    100% { top: 55px; }
}

.error-lock {
    color: var(--loss);
    animation: lockShake 2s ease-in-out infinite;
}

@keyframes lockShake {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(-8deg); }
    20% { transform: rotate(8deg); }
    30% { transform: rotate(-4deg); }
    40% { transform: rotate(4deg); }
    50%, 100% { transform: rotate(0); }
}

.error-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.error-suggestions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.error-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.error-links a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.error-links a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ── Smooth page load ────────────────────────────────── */
@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

main,
.admin-content {
    animation: pageIn 0.3s ease-out;
}

/* ── Hero Accent Gradient Text ──────────────────────── */
.hero-accent {
    background: linear-gradient(135deg, var(--accent), #34d399, #f59e0b, var(--accent));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Hero Champion Badge Pulse ──────────────────────── */
.hero-champion {
    animation: heroFadeIn 0.8s ease-out 0.6s both;
}

@keyframes championPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.champion-icon {
    display: inline-block;
    border-radius: 50%;
}

/* ── Glowing Focus Rings ────────────────────────────── */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    border-color: var(--accent) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ── Member Card Hover Glow ─────────────────────────── */
.member-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
}

.member-card:hover .member-avatar {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ── Hall of Fame Icon Animations ──────────────────── */
.hof-section__icon svg {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.hof-section:hover .hof-section__icon svg {
    transform: scale(1.1);
}

.hof-section--meisterteller:hover .hof-section__icon svg {
    filter: drop-shadow(0 2px 10px rgba(220, 220, 240, 0.5)) brightness(1.1);
}

.hof-section--leber_cup:hover .hof-section__icon svg {
    filter: drop-shadow(0 2px 10px rgba(210, 150, 80, 0.5)) brightness(1.1);
}

/* ── Stat Item Hover Effect ─────────────────────────── */
.stat-item {
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item:hover .stat-number {
    color: var(--accent);
    transition: color 0.2s ease;
}

/* ── Section Title Animated Underline ───────────────── */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.revealed .section-title::after,
.section-title:hover::after {
    width: 60px;
}

/* ── Ranking Row Entrance Stagger ───────────────────── */
.ranking-table tbody tr {
    animation: slideUp 0.3s ease-out both;
}

.ranking-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.ranking-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.ranking-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.ranking-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.ranking-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.ranking-table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.ranking-table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.ranking-table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.ranking-table tbody tr:nth-child(9) { animation-delay: 0.45s; }

/* ── Rank Badge Glow for #1 ─────────────────────────── */
.rank-badge--1 {
    animation: goldGlow 2s ease infinite;
}

@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 8px 2px rgba(245, 158, 11, 0.2); }
}

/* ── Smooth Scrollbar Styling ───────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Smooth Transitions ────────────────────────────── */

/* ── Dash Link Hover ───────────────────────────────── */

/* ── H2H Big Score Entrance ─────────────────────────── */
.h2h-big-score__p1,
.h2h-big-score__p2 {
    animation: scoreReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.h2h-big-score__p2 {
    animation-delay: 0.15s;
}

@keyframes scoreReveal {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* ── Live Dot for Active Season ─────────────────────── */
.stats-tab--active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 6px;
    animation: livePulse 1.5s ease infinite;
}

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

/* ── Tooltip-style Badge on Hover ───────────────────── */
.member-badge {
    transition: transform 0.2s ease;
}

.member-card:hover .member-badge {
    transform: scale(1.05);
}

/* ── Section Title Accent Line ─────────────────────── */
.section-title {
    position: relative;
}

.section-title--center::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    margin: 12px auto 0;
}

/* ── Active Nav Indicator ─────────────────────────── */
.nav__links a.active {
    color: var(--accent);
}

/* ── Bracket Connection Lines ─────────────────────────── */
.bracket-visual {
    position: relative;
}

.bracket-column {
    position: relative;
}

/* Horizontal connector line from match to next round */
.bracket-column:not(:last-child) .bracket-match::after {
    content: '';
    position: absolute;
    right: -19px;
    top: 50%;
    width: 11px;
    height: 2px;
    background: var(--border);
    pointer-events: none;
}

/* Incoming connector on receiving match */
.bracket-column:not(:first-child) .bracket-match::before {
    content: '';
    position: absolute;
    left: -11px;
    top: 50%;
    width: 11px;
    height: 2px;
    background: var(--border);
    pointer-events: none;
}

/* Bracket seed number */
.bracket-seed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
    line-height: 1;
}

.bracket-match--winner .bracket-seed {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(16, 185, 129, .08);
}

.bracket-match--loser .bracket-seed {
    opacity: 0.5;
}

/* Hide connectors on mobile (stacked layout) */
@media (max-width: 640px) {
    .bracket-column:not(:last-child) .bracket-match::after,
    .bracket-column:not(:first-child) .bracket-match::before {
        display: none !important;
    }
}

/* ── Bracket Match – polished scores ──────────────── */
.bracket-match__vs .set-pill {
    min-width: 38px;
    text-align: center;
}

/* ── Stats Bar polish ─────────────────────────────── */
.stat-item .stat-number {
    font-variant-numeric: tabular-nums;
}

/* ── HoF Section Icon idle glow ───────────────────── */
.hof-section--meisterteller .hof-section__icon svg {
    animation: hofIconGlow 3s ease-in-out infinite;
}

@keyframes hofIconGlow {
    0%, 100% { filter: drop-shadow(0 1px 4px rgba(180, 180, 180, 0.3)) brightness(1); }
    50% { filter: drop-shadow(0 1px 8px rgba(220, 220, 220, 0.5)) brightness(1.08); }
}

.hof-section--leber_cup .hof-section__icon svg {
    animation: hofCopperGlow 3s ease-in-out infinite 0.5s;
}

@keyframes hofCopperGlow {
    0%, 100% { filter: drop-shadow(0 1px 4px rgba(184, 115, 51, 0.3)) brightness(1); }
    50% { filter: drop-shadow(0 1px 8px rgba(200, 140, 80, 0.5)) brightness(1.1); }
}

/* ── Reduce motion for accessibility ─────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }

    .hero-accent {
        -webkit-text-fill-color: var(--accent);
    }
}

/* ============================================================
   Kalender
   ============================================================ */

.cal {
    max-width: 900px;
    margin: 0 auto;
}

.cal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.cal__title {
    font-size: 1.3rem;
    font-weight: 800;
    flex: 1;
    text-align: center;
}

.cal__nav {
    display: flex;
    gap: 6px;
}

.cal__nav-btn {
    width: 36px;
    height: 36px;
}

/* ── Grid ──────────────────────────────────────────────── */
.cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
}

.cal__dow {
    background: var(--bg-elevated);
    padding: 10px 4px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.cal__day {
    background: var(--card);
    min-height: 72px;
    padding: 8px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.cal__day:hover {
    background: var(--card-hover);
}

.cal__day--other {
    background: var(--bg-alt);
    cursor: default;
    opacity: 0.4;
}

.cal__day--today {
    border-color: var(--accent);
}

.cal__day--active {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.cal__day--has-items {
    cursor: pointer;
}

.cal__day-num {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1;
}

.cal__day--today .cal__day-num {
    color: var(--accent);
    font-weight: 800;
}

.cal__dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 6px;
}

.cal__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.cal__dot--match {
    background: var(--accent);
}

.cal__dot--event {
    background: var(--gold);
}

/* ── Legend ─────────────────────────────────────────────── */
.cal__legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 12px 0 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cal__legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Day Detail Panel ──────────────────────────────────── */
.cal__detail {
    margin-top: 16px;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: calDetailSlide .25s ease;
}

@keyframes calDetailSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cal__detail-inner {
    padding: 20px 24px;
}

.cal__detail-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.cal__detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.cal__detail-item:last-child {
    border-bottom: none;
}

.cal__detail-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.cal__detail-icon--match {
    background: var(--accent-glow);
}

.cal__detail-icon--event {
    background: var(--gold-glow);
}

.cal__detail-info {
    flex: 1;
    min-width: 0;
}

.cal__detail-info strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.cal__detail-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cal__detail-empty {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ── Upcoming Events ───────────────────────────────────── */
.cal__upcoming-list {
    display: flex;
    flex-direction: column;
}

.cal__upcoming-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--transition);
}

.cal__upcoming-item:last-child {
    border-bottom: none;
}

.cal__upcoming-item:hover {
    background: var(--accent-glow);
}

.cal__upcoming-date {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--accent-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cal__upcoming-day {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.cal__upcoming-month {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-top: 2px;
}

.cal__upcoming-info {
    flex: 1;
    min-width: 0;
}

.cal__upcoming-info strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.cal__upcoming-info .hint {
    font-size: 0.78rem;
}

/* ── Calendar Responsive ───────────────────────────────── */
@media (max-width: 640px) {
    .cal__day {
        min-height: 48px;
        padding: 6px;
    }

    .cal__day-num {
        font-size: 0.75rem;
    }

    .cal__dots {
        margin-top: 3px;
    }

    .cal__dot {
        width: 7px;
        height: 7px;
    }

    .cal__dow {
        padding: 6px 2px;
        font-size: 0.65rem;
    }

    .cal__header {
        margin-bottom: 12px;
    }

    .cal__title {
        font-size: 1.05rem;
    }

    .cal__detail-inner {
        padding: 16px;
    }

    .cal__upcoming-item {
        padding: 12px 16px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .cal__grid {
        gap: 1px;
    }
    .cal__day {
        min-height: 44px;
        padding: 4px 3px;
    }
    .cal__dow {
        font-size: 0.6rem;
        padding: 4px 2px;
    }
}

/* ============================================================
   Global Improvements – Loading, Disabled, Animations
   ============================================================ */

/* ── Button Loading State ─────────────────────────────── */
.btn[disabled],
.btn--loading {
    opacity: var(--disabled-opacity);
    pointer-events: none;
    cursor: not-allowed;
}

.btn--loading {
    position: relative;
    color: transparent !important;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ── Spinner (standalone) ─────────────────────────────── */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
}

.spinner--sm { width: 16px; height: 16px; border-width: 2px; }
.spinner--lg { width: 36px; height: 36px; border-width: 3px; }

/* ── Skeleton Loader ──────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-alt) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Flash Message Animations ─────────────────────────── */
.flash {
    animation: flashIn 0.3s ease;
}

.flash--exit {
    animation: flashOut 0.3s ease forwards;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flashOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* ── Toast Notification ───────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 20px;
    font-size: var(--text-base);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast--success { border-left: 4px solid var(--win); }
.toast--error { border-left: 4px solid var(--loss); }
.toast--exit { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(16px) scale(0.95); }
}

/* ── Focus Visible (accessibility) ────────────────────── */
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

/* ── prefers-color-scheme Auto-Detection ──────────────── */
@media (prefers-color-scheme: dark) {
    html:not([data-theme]) {
        --bg: #050f0b;
        --bg-alt: #0a1f16;
        --bg-elevated: #0d2b1f;
        --card: #0f3527;
        --card-hover: #134a36;
        --text: #e8f5f0;
        --text-secondary: #a3c9ba;
        --text-muted: #7aaa98;
        --border: #1a4a38;
        --border-subtle: #12362a;
        --accent: #22c55e;
        --accent-glow: rgba(34, 197, 94, 0.15);
        --accent-dim: #166534;
        --accent-text: #fff;
        --header-bg: rgba(5, 15, 11, 0.92);
        --shadow: 0 4px 24px rgba(0,0,0,0.3);
        --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
        --gradient-hero: linear-gradient(160deg, #050f0b 0%, #0d3325 50%, #134a36 100%);
        --gradient-card: linear-gradient(145deg, rgba(15, 53, 39, 0.6), rgba(13, 43, 31, 0.3));
        --gold: #fbbf24;
        --silver: #94a3b8;
        --bronze: #d97706;
        --win: #22c55e;
        --win-bg: rgba(34, 197, 94, 0.15);
        --win-bg-subtle: rgba(34, 197, 94, 0.1);
        --win-border: rgba(34, 197, 94, 0.25);
        --loss: #ef4444;
        --loss-bg: rgba(239, 68, 68, 0.15);
        --loss-bg-subtle: rgba(239, 68, 68, 0.1);
        --loss-border: rgba(239, 68, 68, 0.25);
        --info: #60a5fa;
        --info-bg: rgba(59, 130, 246, 0.15);
        --gold-glow: rgba(251, 191, 36, 0.15);
        --accent-glow-strong: rgba(34, 197, 94, 0.25);
        --focus-ring: 0 0 0 3px rgba(34, 197, 94, 0.3);
    }
}

@media (prefers-color-scheme: light) {
    html:not([data-theme]) {
        --bg: #f6faf8;
        --bg-alt: #edf5f0;
        --bg-elevated: #e2efe8;
        --card: #ffffff;
        --card-hover: #f0faf5;
        --text: #1a2e26;
        --text-secondary: #3d5a4e;
        --text-muted: #5a7a6a;
        --border: #d0e0d8;
        --border-subtle: #e0ede6;
        --accent: #16a34a;
        --accent-glow: rgba(22, 163, 74, 0.1);
        --accent-dim: #bbf7d0;
        --accent-text: #fff;
        --header-bg: rgba(246, 250, 248, 0.92);
        --shadow: 0 4px 24px rgba(0,0,0,0.06);
        --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
        --gradient-hero: linear-gradient(160deg, #f6faf8 0%, #e2efe8 50%, #d0e8dc 100%);
        --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(240,250,245,0.4));
        --gold: #d97706;
        --silver: #64748b;
        --bronze: #b45309;
        --win: #16a34a;
        --win-bg: rgba(22, 163, 74, 0.15);
        --win-bg-subtle: rgba(22, 163, 74, 0.1);
        --win-border: rgba(22, 163, 74, 0.25);
        --loss: #dc2626;
        --loss-bg: rgba(220, 38, 38, 0.15);
        --loss-bg-subtle: rgba(220, 38, 38, 0.1);
        --loss-border: rgba(220, 38, 38, 0.25);
        --info: #3b82f6;
        --info-bg: rgba(59, 130, 246, 0.12);
        --gold-glow: rgba(217, 119, 6, 0.15);
        --accent-glow-strong: rgba(22, 163, 74, 0.25);
        --focus-ring: 0 0 0 3px rgba(22, 163, 74, 0.3);
    }
}

/* ── Improved text-muted contrast (WCAG AA) ──────────── */
/* Bumped both themes' muted color for 4.5:1+ ratio */

/* ── Lightbox Overlay ─────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightboxIn 0.25s ease;
    cursor: zoom-out;
}

.lightbox--exit {
    animation: lightboxOut 0.2s ease forwards;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
}

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

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

/* ── Confirm Modal ────────────────────────────────────── */
.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    animation: lightboxIn 0.2s ease;
}

.confirm-modal__card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.25s ease;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.confirm-modal__title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 8px;
}

.confirm-modal__text {
    color: var(--text-secondary);
    font-size: var(--text-base);
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Empty State ──────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.empty-state__title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state__text {
    font-size: var(--text-base);
    max-width: 320px;
    margin: 0 auto;
}

/* ── Pagination ───────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination__btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    padding: 0 8px;
}

.pagination__btn:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--accent);
}

.pagination__btn--active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-text);
    pointer-events: none;
}

.pagination__btn[disabled] {
    opacity: var(--disabled-opacity);
    pointer-events: none;
}

.pagination__info {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-left: 12px;
}
