/* ═══════════════════════════════════════════════════════════
   TennisCore — Single CSS file
   ═══════════════════════════════════════════════════════════ */

/* ─── Custom Properties (Design Tokens) ─────────────────── */

:root {
    --navy-950: #020617;
    --navy-900: #0a101f;
    --navy-800: #111827;
    --navy-700: #1e293b;
    --navy-600: #334155;
    --accent: #3b82f6;
    --accent-bright: #60a5fa;
    --accent-glow: #2563eb;
    --gold: #fbbf24;
    --gold-bright: #fcd34d;
    --emerald: #10b981;
    --emerald-dim: #059669;
    --rose: #f43f5e;
    --rose-dim: rgba(244, 63, 94, 0.6);
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --white-5: rgba(255, 255, 255, 0.05);
    --white-6: rgba(255, 255, 255, 0.06);
    --white-8: rgba(255, 255, 255, 0.08);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-15: rgba(255, 255, 255, 0.15);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 9999px;
    --shadow-card: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.15);
    --transition-fast: 0.2s ease;
    --transition-med: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Semantic tokens (dark mode defaults) */
    --bg-body: #020617;
    --bg-surface: #0a101f;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-header: rgba(10, 16, 31, 0.75);
    --bg-input: rgba(255, 255, 255, 0.05);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-heading: white;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-card: rgba(255, 255, 255, 0.1);
    --shadow-ambient-1: rgba(59, 130, 246, 0.12);
    --shadow-ambient-2: rgba(251, 191, 36, 0.06);
}

/* ─── Light Theme ───────────────────────────────────────── */

[data-theme="light"] {
    --navy-950: #f5f9ff;
    --navy-900: #edf4ff;
    --navy-800: #dceafe;
    --navy-700: #bfd7fb;
    --navy-600: #93c0f8;
    --slate-200: #0f2747;
    --slate-400: #25507d;
    --slate-500: #3b6695;
    --slate-600: #5f85af;
    --slate-700: #9ebbe0;
    --white-5: rgba(59, 130, 246, 0.05);
    --white-6: rgba(59, 130, 246, 0.07);
    --white-8: rgba(59, 130, 246, 0.09);
    --white-10: rgba(59, 130, 246, 0.12);
    --white-15: rgba(59, 130, 246, 0.16);
    --shadow-card: 0 8px 20px -12px rgba(37, 99, 235, 0.3);
    --shadow-hover: 0 18px 36px -14px rgba(37, 99, 235, 0.35), 0 0 0 1px rgba(59, 130, 246, 0.2);
    --bg-body: #f5f9ff;
    --bg-surface: #edf4ff;
    --bg-card: rgba(59, 130, 246, 0.04);
    --bg-header: rgba(245, 249, 255, 0.92);
    --bg-input: rgba(59, 130, 246, 0.05);
    --text-primary: #112a4a;
    --text-secondary: #2b5887;
    --text-muted: #4a719b;
    --text-heading: #0f172a;
    --border-subtle: rgba(59, 130, 246, 0.14);
    --border-card: rgba(59, 130, 246, 0.2);
    --shadow-ambient-1: rgba(59, 130, 246, 0.11);
    --shadow-ambient-2: rgba(251, 191, 36, 0.08);
}

/* ─── Reset ─────────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
}

/* PWA Safe Area Support */
@supports (padding: max(0px)) {
    body {
        /* Ensures content respects iOS safe areas (notch, Dynamic Island, home indicator) */
        --safe-area-inset-top: env(safe-area-inset-top, 0px);
        --safe-area-inset-right: env(safe-area-inset-right, 0px);
        --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
        --safe-area-inset-left: env(safe-area-inset-left, 0px);
    }
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
    line-height: 1.6;
    overscroll-behavior-y: none;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

/* iOS Data Detectors: evita auto-link indesiderati (es. Maps) nei meta match */
.match-meta-row a[x-apple-data-detectors],
.match-meta-row a[href^="x-apple-data-detectors"],
.match-meta-tags a[x-apple-data-detectors],
.match-meta-tags a[href^="x-apple-data-detectors"],
.badge-live a[x-apple-data-detectors],
.badge-live a[href^="x-apple-data-detectors"] {
    color: inherit !important;
    text-decoration: none !important;
    font: inherit !important;
    pointer-events: none !important;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ─── Utility ───────────────────────────────────────────── */

.hidden {
    display: none !important;
}

.text-blue {
    color: var(--accent);
}

.text-yellow {
    color: var(--gold);
}

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

.uppercase {
    text-transform: uppercase;
}

/* ─── Page Container ────────────────────────────────────── */

.page-container {
    width: 100%;
    max-width: 56rem;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (max-width: 480px) {
    .page-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 768px) {
    .page-container {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ─── Ambient Background ────────────────────────────────── */

.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-bg::before,
.ambient-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.ambient-bg::before {
    width: 600px;
    height: 600px;
    top: -15%;
    left: -10%;
    background: radial-gradient(circle, var(--shadow-ambient-1) 0%, transparent 70%);
}

.ambient-bg::after {
    width: 500px;
    height: 500px;
    bottom: -15%;
    right: -10%;
    background: radial-gradient(circle, var(--shadow-ambient-2) 0%, transparent 70%);
}

/* ─── Glass Header ──────────────────────────────────────── */

.glass-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 0;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    background: var(--bg-header);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 767px) {
    .glass-header {
        padding: 12px 0;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 480px) {
    .header-left {
        gap: 8px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-text {
        font-size: 16px;
    }
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.logo-text {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text-heading);
    line-height: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 480px) {
    .header-right {
        gap: 8px;
    }

    .header-right .btn-back {
        font-size: 0;
        padding: 8px;
    }

    .header-right .btn-back svg {
        margin: 0;
    }
}

.live-indicator {
    display: none;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .live-indicator {
        display: flex;
    }
}

.live-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--slate-500);
}

/* ─── Nav Tabs ──────────────────────────────────────────── */

.nav-tabs {
    display: flex;
    background: var(--white-5);
    padding: 4px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--white-10);
    position: relative;
    box-sizing: border-box;
}

.nav-tabs .tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.nav-tabs .tab-indicator.right {
    transform: translateX(100%);
}

.nav-tab {
    padding: 6px 16px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    font-weight: 700;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 1;
    flex: 1 1 50%;
    width: 50%;
    text-align: center;
    box-sizing: border-box;
}

.nav-tab.active {
    color: white;
}

.nav-tab:not(.active) {
    color: var(--slate-400);
}

.nav-tab:not(.active):hover {
    color: white;
}

/* Desktop nav hidden on mobile, mobile nav shown below */
.nav-tabs-desktop {
    display: none;
}

@media (min-width: 768px) {
    .nav-tabs-desktop {
        display: flex;
        width: 200px;
    }
}

.nav-tabs-mobile {
    display: flex;
    max-width: 280px;
    width: 100%;
    margin: 0 auto 40px;
}

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

/* ─── Main Content ──────────────────────────────────────── */

.main-content {
    position: relative;
    z-index: 10;
    flex: 1;
    padding-top: 2rem;
    padding-bottom: 6rem;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* ─── Section Header ────────────────────────────────────── */

.section-header {
    margin-bottom: 56px;
    text-align: center;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 64px;
    }
}

.section-title {
    font-size: 30px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 48px;
    }
}

.section-subtitle {
    color: var(--slate-500);
    font-size: 14px;
}

.section-divider {
    width: 64px;
    height: 4px;
    background: var(--accent);
    border-radius: var(--radius-full);
    margin: 20px auto 0;
}

/* ─── Tournament Card ───────────────────────────────────── */

.tournament-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .tournament-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

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

.tournament-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.7) 0%, rgba(10, 16, 31, 0.9) 100%);
    border: 1px solid var(--white-6);
    border-radius: var(--radius-2xl);
    padding: 32px;
    cursor: pointer;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.tournament-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.tournament-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

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

.tournament-card-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.tournament-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tournament-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-bright);
    transition: all var(--transition-med);
}

.tournament-card:hover .tournament-icon {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--gold);
}

.tournament-arrow {
    color: var(--slate-700);
    transition: all var(--transition-med);
}

.tournament-card:hover .tournament-arrow {
    color: var(--accent-bright);
    transform: translateX(4px);
}

.tournament-name {
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    line-height: 1.3;
    margin-bottom: 8px;
    transition: color var(--transition-med);
}

.tournament-card:hover .tournament-name {
    color: var(--accent-bright);
}

.tournament-type {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tournament-type-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--slate-700);
    transition: background var(--transition-med);
}

.tournament-card:hover .tournament-type-dot {
    background: var(--emerald);
}

@media (max-width: 767px) {
    .tournament-grid {
        gap: 7px;
    }

    .tournament-card {
        padding: 9px 11px;
        border-radius: var(--radius-lg);
    }

    .tournament-card-inner {
        gap: 7px;
    }

    .tournament-card-top {
        align-items: center;
    }

    .tournament-icon {
        width: 26px;
        height: 26px;
    }

    .tournament-name {
        font-size: 15px;
        margin-bottom: 1px;
        line-height: 1.25;
    }

    .tournament-type {
        font-size: 9px;
        gap: 4px;
    }

    .tournament-arrow svg,
    .tournament-icon svg {
        width: 13px;
        height: 13px;
    }

    .tournament-type-dot {
        width: 5px;
        height: 5px;
    }
}

/* ─── Admin: New Tournament Button ──────────────────────── */

.admin-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 32px;
    background: rgba(59, 130, 246, 0.08);
    border: 2px dashed rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-2xl);
    color: var(--accent-bright);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

@media (max-width: 767px) {
    .admin-add-btn {
        padding: 14px 20px;
        margin-top: 24px;
        font-size: 13px;
        border-radius: var(--radius-xl);
        gap: 8px;
    }
}

.admin-add-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* ─── Match Card ────────────────────────────────────────── */

.match-list {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .match-list {
        gap: 20px;
    }
}

.match-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(10, 16, 31, 0.7) 100%);
    border: 1px solid var(--white-6);
    border-radius: var(--radius-lg);
    transition: all var(--transition-med);
    overflow: hidden;
    position: relative;
}

.match-card:hover {
    border-color: var(--white-10);
    box-shadow: var(--shadow-card);
}

.match-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), var(--accent-glow));
    border-radius: 3px 0 0 3px;
}

.match-card-body {
    padding: 16px 16px 16px 20px;
}

@media (min-width: 768px) {
    .match-card-body {
        padding: 32px 32px 32px 32px;
    }
}

@media (max-width: 767px) {
    .match-list {
        gap: 8px;
    }

    .match-card-accent {
        width: 2px;
    }

    .match-card-body {
        padding: 10px 10px 10px 13px;
    }

    .match-meta-row {
        margin-bottom: 8px;
        gap: 4px;
    }

    .match-meta-tags {
        gap: 4px;
    }

    .meta-tag {
        padding: 3px 7px;
        gap: 4px;
        font-size: 9px;
    }

    .match-tournament-badge {
        margin-bottom: 6px;
        padding: 2px 6px;
        gap: 4px;
    }

    .match-tournament-name {
        font-size: 7px;
    }

    .match-players {
        gap: 0;
    }

    .match-team {
        gap: 4px;
        padding: 0;
    }

    .player-name {
        font-size: 12px;
        line-height: 1.1;
    }

    .doubles-ampersand {
        font-size: 10px;
    }

    .vs-divider {
        padding: 0;
    }

    .vs-text {
        font-size: 8px;
        padding: 1px 8px;
    }

    .match-score-area {
        margin-top: 8px;
        gap: 4px;
    }

    .set-count {
        font-size: 15px;
        gap: 4px;
    }

    .set-count-sep {
        font-size: 12px;
    }

    .score-display,
    .score-placeholder {
        padding: 4px 12px;
        font-size: 10px;
    }

    .match-actions {
        margin-top: 8px;
    }

    .match-action-btn {
        padding: 5px 10px;
        font-size: 10px;
        gap: 6px;
    }
}

.match-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.match-meta-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.match-info-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.match-info-top-btn:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.2);
}

@media (min-width: 768px) {
    .match-meta-row {
        gap: 12px;
        margin-bottom: 20px;
    }
}

.match-meta-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

@media (min-width: 768px) {
    .match-meta-tags {
        gap: 8px;
    }
}

.match-tournament-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--white-5);
    border: 1px solid var(--white-5);
    margin-bottom: 16px;
}

.match-tournament-badge svg {
    color: var(--accent);
}

.match-tournament-name {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--slate-400);
    letter-spacing: 0.08em;
}

/* ─── Club Selector ─────────────────────────────────────── */

.club-selector-grid {
    display: grid;
    gap: 14px;
    max-width: 720px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .club-selector-grid {
        max-width: 980px;
        grid-template-columns: repeat(auto-fit, minmax(300px, 340px));
        justify-content: center;
    }
}

.club-select-card {
    width: 100%;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-xl);
}

.club-select-card-inner {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.club-select-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.club-select-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-med);
}

.club-select-arrow {
    color: var(--slate-500);
    font-size: 18px;
    font-weight: 800;
    transition: all var(--transition-med);
}

.club-select-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.club-select-subtitle {
    font-size: 12px;
    color: var(--slate-400);
    margin: 0;
}

.club-select-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.club-select-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--white-10);
    background: var(--white-5);
    color: var(--slate-400);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.club-select-card:hover .club-select-icon {
    background: var(--accent);
    color: var(--gold);
    border-color: var(--accent);
}

.club-select-card:hover .club-select-arrow {
    color: var(--accent-bright);
    transform: translateX(3px);
}

/* Players layout */
.match-players {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.match-team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 4px 0;
}

.team-names {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.team-score {
    display: none;
    min-width: 24px;
    text-align: right;
    font-size: 14px;
    font-weight: 900;
    color: var(--gold-bright);
}

.player-name {
    font-size: 16px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .player-name {
        font-size: 24px;
    }
}

.doubles-ampersand {
    color: rgba(59, 130, 246, 0.4);
    font-weight: 700;
    font-size: 12px;
}

/* VS divider */
.vs-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 4px 0;
}

.vs-divider::before,
.vs-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--white-6), transparent);
}

.vs-text {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: rgba(100, 116, 139, 0.5);
    padding: 2px 14px;
    border: 1px solid var(--white-5);
    border-radius: var(--radius-full);
    background: rgba(2, 6, 23, 0.8);
}

/* Score */
.match-score-area {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.set-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.set-count-sep {
    color: rgba(148, 163, 184, 0.3);
    font-size: 14px;
}

.set-win {
    color: #4ade80;
}

.set-lose {
    color: rgba(148, 163, 184, 0.5);
}

.score-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 20px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-full);
    color: var(--gold-bright);
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.03em;
}

.score-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    border-radius: var(--radius-full);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--accent-bright);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Live bar animation */

.live-bar {
    height: 2px;
    width: 80px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.live-bar-inner {
    height: 100%;
    width: 33%;
    background: rgba(59, 130, 246, 0.6);
    border-radius: var(--radius-full);
}

@keyframes live-slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* Match action buttons */
.match-actions {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.match-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-bright);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-fast);
}

@media (max-width: 767px) {
    .match-meta-right {
        gap: 6px;
    }

    .badge-finished {
        display: none;
    }

    .match-info-top-btn {
        padding: 4px 8px;
        font-size: 9px;
        gap: 4px;
    }

    .match-team {
        justify-content: space-between;
        gap: 8px;
    }

    .team-names {
        justify-content: flex-start;
        gap: 4px;
    }

    .team-score {
        display: inline-block;
        min-width: 22px;
        font-size: 13px;
    }

    .match-score-area {
        display: none;
    }
}

.match-action-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.35);
}

/* ─── Reminder Modal ────────────────────────────────────── */

.reminder-modal-card {
    max-width: 440px;
    text-align: center;
}

.reminder-header {
    margin-bottom: 28px;
}

.reminder-bell-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent-bright);
    animation: bell-ring 0.6s ease;
}

@keyframes bell-ring {

    0%,
    100% {
        transform: rotate(0);
    }

    15% {
        transform: rotate(14deg);
    }

    30% {
        transform: rotate(-12deg);
    }

    45% {
        transform: rotate(8deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(2deg);
    }
}

.reminder-match-label {
    font-size: 13px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 8px;
}

.reminder-match-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-500);
}

.reminder-match-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.match-info-note-block {
    margin-top: 10px;
    margin-bottom: 18px;
    padding: 10px;
    border: 1px solid var(--white-10);
    border-radius: var(--radius-md);
    background: var(--white-5);
    font-size: 12px;
    color: var(--slate-300);
}

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

.reminder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-8);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: center;
    font-family: inherit;
    color: inherit;
}

.reminder-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.reminder-card:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.reminder-card:disabled:hover {
    transform: none;
    box-shadow: none;
}

.reminder-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-med);
}

.reminder-card-icon-blue {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-bright);
}

.reminder-card:hover .reminder-card-icon-blue {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.reminder-card-icon-gold {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--gold);
}

.reminder-card:hover .reminder-card-icon-gold {
    background: var(--gold);
    color: var(--navy-950);
    border-color: var(--gold);
}

.reminder-card-title {
    font-size: 13px;
    font-weight: 800;
    color: white;
}

.reminder-card-desc {
    font-size: 10px;
    color: var(--slate-500);
    line-height: 1.4;
}

.reminder-email-form {
    animation: fade-up 0.25s ease;
}

.reminder-email-row {
    display: flex;
    gap: 8px;
}

.reminder-email-row .form-input {
    flex: 1;
    font-size: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
}

.reminder-email-send {
    width: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-lg) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

/* ─── Badges ────────────────────────────────────────────── */

.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@media (max-width: 480px) {
    .badge-live {
        font-size: 9px;
        padding: 3px 10px;
        gap: 5px;
    }
}

.badge-finished {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

@media (max-width: 480px) {
    .badge-finished {
        font-size: 9px;
        padding: 3px 10px;
        gap: 5px;
    }
}

/* ─── Meta Tags ─────────────────────────────────────────── */

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-6);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: default;
}

@media (max-width: 480px) {
    .meta-tag {
        font-size: 9px;
        padding: 3px 8px;
        gap: 5px;
    }
}

.meta-tag-clickable {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.meta-tag-clickable:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--accent-bright);
}

/* ─── Buttons ───────────────────────────────────────────── */

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-8);
    color: rgba(148, 163, 184, 0.6);
    transition: all var(--transition-fast);
}

@media (max-width: 480px) {
    .btn-icon {
        width: 36px;
        height: 36px;
    }
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-bright);
}

#btn-change-club {
    color: var(--accent-bright);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
}

#btn-change-club:hover {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: var(--radius-2xl);
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-bright);
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--transition-med);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .btn-back {
        padding: 12px 18px;
        font-size: 12px;
        gap: 8px;
        border-radius: var(--radius-xl);
    }
}

@media (min-width: 768px) {
    .btn-back {
        padding: 16px 32px;
        font-size: 16px;
    }
}

.btn-back:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    color: #93bbfd;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    transform: translateX(-4px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    border: none;
}

@media (max-width: 480px) {
    .btn-primary {
        padding: 10px 20px;
        font-size: 13px;
        gap: 6px;
    }
}

.btn-primary:hover {
    background: var(--accent-glow);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Search Input ──────────────────────────────────────── */

.search-input {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-8);
    color: white;
    padding: 10px 16px 10px 40px;
    border-radius: var(--radius-lg);
    width: 100%;
    font-size: 13px;
    transition: all var(--transition-fast);
}

@media (max-width: 480px) {
    .search-input {
        padding: 9px 14px 9px 36px;
        font-size: 12px;
    }
}

.search-input:focus {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.search-input-lg {
    padding: 20px 16px 20px 48px;
    font-size: 18px;
    border-radius: var(--radius-xl);
    background: transparent;
    border: none;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-600);
    pointer-events: none;
}

.search-wrapper-lg {
    max-width: none;
}

.search-wrapper-lg .search-icon {
    left: 16px;
}

/* ─── Filter Bar ────────────────────────────────────────── */

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--white-5);
}

.filter-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-right: 4px;
}

.filter-divider {
    width: 1px;
    height: 20px;
    background: var(--white-10);
    margin: 0 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.7);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--white-6);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-chip:hover {
    background: var(--white-6);
    color: rgba(226, 232, 240, 0.9);
    border-color: var(--white-15);
}

.filter-chip-active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-bright);
}

.filter-chip-finished {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.25);
    color: var(--gold-bright);
}

.filter-chip-live {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--emerald);
}

.filter-chip-clear {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.filter-chip-clear:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.filter-count {
    font-size: 11px;
    color: var(--slate-500);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--white-5);
}

.filter-count strong {
    color: white;
    font-weight: 700;
}

/* ─── Detail Header ─────────────────────────────────────── */

.detail-header {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .detail-header {
        margin-bottom: 48px;
    }
}

.detail-top-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .detail-top-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 48px;
    }
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.detail-title-area {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .detail-title-area {
        margin-bottom: 32px;
    }
}

.detail-type-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.detail-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .detail-title {
        font-size: 36px;
    }
}

.detail-updated {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 500;
}

/* ─── Tournament Tabs ───────────────────────────────────── */

.tournament-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-surface);
    padding: 16px 0;
    box-sizing: border-box;
    overflow: hidden;
}

.tournament-tabs-inner {
    display: inline-flex;
    align-items: center;
    background: var(--white-5);
    padding: 4px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--white-10);
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.tournament-tabs-inner > .tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    pointer-events: none;
}

.tournament-tabs-inner > .tab-indicator.right {
    transform: translateX(100%);
}

.tournament-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 700;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 1;
    white-space: nowrap;
    min-width: 0;
}

@media (min-width: 480px) {
    .tournament-tab {
        gap: 8px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

.tournament-tab.active {
    color: white;
}

.tournament-tab:not(.active) {
    color: var(--slate-400);
}

.tournament-tab:not(.active):hover {
    color: var(--slate-200);
}

.tournament-tab .tab-count {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.tournament-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tournament-tab:not(.active) .tab-count {
    background: var(--white-5);
    color: var(--slate-500);
}

/* ─── Leaderboard Table ─────────────────────────────────── */

.leaderboard-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.leaderboard-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.leaderboard-table thead tr {
    background: var(--white-5);
}

.leaderboard-table th {
    padding: 14px 16px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-500);
}

.leaderboard-table th.col-pos {
    padding-left: 20px;
}

.leaderboard-table th.text-center {
    text-align: center;
}

.leaderboard-table th.col-win {
    color: var(--emerald);
}

.leaderboard-table th.col-loss {
    color: var(--rose-dim);
}

.leaderboard-table tbody tr {
    border-top: 1px solid var(--white-5);
    transition: background var(--transition-fast);
}

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.leaderboard-table td {
    padding: 14px 16px;
    font-size: 14px;
}

.leaderboard-table td.text-center {
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 900;
}

.rank-1 {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.rank-2 {
    background: rgba(148, 163, 184, 0.2);
    color: var(--slate-400);
}

.rank-3 {
    background: rgba(234, 88, 12, 0.2);
    color: #ea580c;
}

.rank-default {
    background: var(--white-5);
    color: var(--slate-500);
}

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

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-bright);
    font-weight: 700;
    font-size: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.player-cell-name {
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 14px;
    transition: color var(--transition-fast);
}

tr:hover .player-cell-name {
    color: var(--accent-bright);
}

.td-bold {
    font-weight: 700;
    color: var(--slate-400);
}

.td-win {
    font-weight: 900;
    color: var(--emerald);
}

.td-loss {
    font-weight: 900;
    color: var(--rose-dim);
}

.td-games-won {
    font-weight: 700;
    color: var(--emerald);
    opacity: 0.7;
}

.td-games-lost {
    font-weight: 700;
    color: var(--rose-dim);
    opacity: 0.7;
}

.td-games-played {
    font-weight: 700;
    color: var(--slate-400);
}

.leaderboard-table th.col-games-won {
    color: var(--emerald);
    opacity: 0.7;
}

.leaderboard-table th.col-games-lost {
    color: var(--rose-dim);
    opacity: 0.7;
}

.leaderboard-table th.col-games-played {
    color: var(--slate-500);
}

/* Responsive leaderboard mobile */
@media (max-width: 480px) {
    .leaderboard-scroll-container {
        overflow-x: hidden;
    }

    .leaderboard-scroll-container .leaderboard-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    .leaderboard-table th {
        padding: 8px 4px;
        font-size: 8px;
    }

    .leaderboard-table td {
        padding: 8px 4px;
        font-size: 11px;
    }

    .leaderboard-table th.col-pos {
        padding-left: 2px;
        padding-right: 0;
        width: 24px;
    }

    .leaderboard-table tbody td:first-child {
        padding-left: 0 !important;
        padding-right: 0;
        width: 24px;
    }

    .leaderboard-table th:nth-child(2),
    .leaderboard-table td:nth-child(2) {
        padding-left: 7px;
        padding-right: 4px;
    }

    .leaderboard-table th.col-win,
    .leaderboard-table th.col-loss,
    .leaderboard-table th.col-pg,
    .leaderboard-table th.col-games-won,
    .leaderboard-table th.col-games-lost,
    .leaderboard-table th.col-games-played {
        width: 28px;
    }

    .player-cell {
        gap: 0;
        min-width: 0;
    }

    .player-avatar {
        display: none;
    }

    .player-cell-name {
        display: block;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 11px;
    }
}

/* ─── Players Grid ──────────────────────────────────────── */

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

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

@media (min-width: 1024px) {
    .players-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.player-card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.player-card:hover {
    border-color: rgba(59, 130, 246, 0.5) !important;
}

.player-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-bright);
    transition: all var(--transition-fast);
}

.player-card:hover .player-card-avatar {
    background: var(--accent);
    color: white;
}

.player-card-name {
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 14px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.25;
    transition: color var(--transition-fast);
}

@media (min-width: 768px) {
    .player-card-name {
        font-size: 16px;
    }
}

.player-card:hover .player-card-name {
    color: var(--accent-bright);
}

.player-card-matches {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 4px;
}

.player-history-categories {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.player-history-category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--white-10);
    background: var(--white-5);
    color: var(--slate-300);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.player-history-stats-grid {
    margin: 0 0 20px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .player-history-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-bottom: 24px;
    }
}

.player-history-stat-item {
    border: 1px solid var(--white-10);
    border-radius: var(--radius-md);
    background: var(--white-5);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.player-history-stat-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.player-history-stat-value {
    font-size: 16px;
    line-height: 1;
    color: white;
    font-weight: 900;
}

/* Player detail header */
.player-detail-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

@media (min-width: 768px) {
    .player-detail-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 48px;
    }
}

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

.player-detail-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-2xl);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    color: white;
}

.player-detail-name {
    font-size: 24px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .player-detail-name {
        font-size: 36px;
    }
}

.player-detail-subtitle {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ─── Surface Indicators ────────────────────────────────── */

.surface-dot {
    width: 6px;
    height: 6px;
    border-radius: 2px;
}

.surface-clay {
    background: #e96b39;
}

.surface-grass {
    background: #4caf50;
}

.surface-hard {
    background: var(--accent);
}

/* ─── Live Pulse ────────────────────────────────────────── */

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
}

/* ─── Go To Top Button ──────────────────────────────────── */

.go-top-btn {
    position: fixed;
    bottom: 24px;
    bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
    right: 24px;
    right: max(24px, calc(24px + env(safe-area-inset-right)));
    z-index: 50;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
    transition: all var(--transition-fast);
    animation: fade-up 0.25s ease;
}

.go-top-btn:hover {
    background: var(--accent-bright);
}

/* ─── Footer ────────────────────────────────────────────── */

.site-footer {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--white-5);
    position: relative;
    z-index: 10;
    margin-bottom: 100px;
}

.footer-text {
    font-size: 10px;
    font-weight: 700;
    color: var(--slate-700);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ─── Modal ─────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fade-in 0.2s ease;
}

.modal-card {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
    border: 1px solid var(--white-10);
    border-radius: var(--radius-2xl);
    padding: 32px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
    animation: scale-up 0.25s ease;
}

@media (max-width: 480px) {
    .modal-card {
        padding: 24px 20px;
        border-radius: var(--radius-xl);
        max-height: 92vh;
    }
}

.modal-card-sm {
    max-width: 400px;
}

.edit-match-modal-card {
    max-height: calc(100vh - 16px);
    overflow: hidden;
    padding: 14px;
}

.edit-match-modal-card.edit-match-modal-scroll {
    overflow-y: auto;
}

.edit-match-modal-card .modal-title {
    font-size: 18px;
    margin-bottom: 2px;
}

.edit-match-modal-card .modal-subtitle {
    font-size: 11px;
    margin-top: 0;
}

.edit-match-modal-card .form-group {
    margin-bottom: 8px;
}

.edit-match-modal-card .form-label {
    margin-bottom: 4px;
    font-size: 10px;
}

.edit-match-modal-card .form-input {
    padding: 7px 10px;
    font-size: 12px;
}

@media (max-width: 767px) {
    .modal-overlay {
        padding: 8px;
    }

    .edit-match-modal-card {
        max-height: calc(100vh - 8px);
        padding: 10px;
    }

    .edit-match-modal-card .form-group {
        margin-bottom: 6px;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 20px;
    color: var(--slate-500);
    transition: all var(--transition-fast);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 20px;
    color: var(--slate-500);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover,
.modal-close-btn:hover {
    background: var(--white-5);
    color: white;
}

/* ─── Admin Edit Match Button ───────────────────────────── */

.admin-edit-match-btn:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}

.modal-title {
    font-size: 20px;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--slate-500);
    margin-bottom: 24px;
}

/* ─── Form ──────────────────────────────────────────────── */

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

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 16px;
    }
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-8);
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    transition: all var(--transition-fast);
}

@media (max-width: 480px) {
    .form-input {
        padding: 10px 14px;
        font-size: 13px;
    }
}

.form-input:focus {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

.form-input[type="file"] {
    padding: 10px 12px;
    font-size: 13px;
}

.form-input[type="file"]::file-selector-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 12px;
    margin-right: 12px;
    cursor: pointer;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-8);
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

@media (max-width: 480px) {
    .form-select {
        padding: 10px 14px;
        font-size: 13px;
        background-position: right 12px center;
    }
}

.form-select:focus {
    border-color: rgba(59, 130, 246, 0.4);
    outline: none;
}

.form-select option {
    background: var(--navy-800);
}

.form-error {
    color: #f87171;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.form-success {
    color: var(--emerald);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    padding: 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
}

/* ─── Empty State ───────────────────────────────────────── */

.empty-state {
    padding: 64px 16px;
    text-align: center;
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white-5);
    border: 1px solid var(--white-5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--slate-600);
}

.empty-state-text {
    color: var(--slate-500);
    font-weight: 600;
    font-size: 14px;
}

/* ─── Loading Spinner ───────────────────────────────────── */

.loading-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: fade-in 0.4s ease;
}

.spinner-container {
    position: relative;
    width: 56px;
    height: 56px;
}

.spinner-ping {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 2px solid rgba(59, 130, 246, 0.2);
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.spinner-spin {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    border: 2px solid transparent;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

/* ─── Scrollbar ─────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--white-8);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--white-15);
}

/* ─── Animations ────────────────────────────────────────── */

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-up {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fade-in 0.4s ease;
}

.fade-up {
    animation: fade-up 0.4s ease;
}

/* Staggered children animation */
.stagger-item {
    opacity: 0;
    animation: fade-up 0.4s ease forwards;
}

/* ─── Footer ────────────────────────────────────────────── */

.site-footer {
    position: relative;
    z-index: 10;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-top: 1px solid var(--white-6);
}

.footer-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--slate-600);
    letter-spacing: 0.05em;
}

.admin-link {
    font-size: 14px;
    text-decoration: none;
    opacity: 0.3;
    transition: opacity var(--transition-fast);
}

.admin-link:hover {
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════
   Admin Page Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── Admin Login ───────────────────────────────────────── */

.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

@media (max-width: 480px) {
    .admin-login {
        padding: 16px;
        min-height: 50vh;
    }

    .admin-login-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 20px;
    }

    .admin-login-title {
        font-size: 24px;
    }
}

.admin-login-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--accent-bright);
}

.admin-login-title {
    font-size: 28px;
    font-weight: 900;
    color: white;
    margin-bottom: 8px;
}

.admin-login-subtitle {
    font-size: 14px;
    color: var(--slate-500);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ─── Admin Dashboard ───────────────────────────────────── */

.admin-dashboard-shell {
    display: grid;
    gap: 16px;
}

.admin-mobile-tabs {
    display: none;
    padding-left: 4px;
    padding-right: 4px;
}

.admin-mobile-tab-section {
    display: block;
}

.admin-mobile-tab-btn {
    appearance: none;
    border: 1px solid var(--white-10);
    background: var(--white-5);
    color: var(--slate-300);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.admin-mobile-tab-btn.active {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.5);
    color: white;
}

.admin-mobile-tab-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    padding: 0 6px;
}

@media (max-width: 767px) {
    .admin-mobile-tabs {
        position: sticky;
        top: 76px;
        z-index: 12;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 4px;
        background: color-mix(in srgb, var(--bg-body) 88%, transparent);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .admin-mobile-tab-section {
        display: none;
    }

    .admin-mobile-tab-section.active {
        display: block;
    }

    .admin-governance-section {
        margin-top: 0;
    }
}

.admin-dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
}

@media (max-width: 767px) {
    .admin-dashboard-welcome {
        flex-direction: column;
        text-align: center;
        padding: 12px;
        gap: 8px;
    }
}

.admin-dashboard-date {
    font-size: 11px;
    color: var(--slate-500);
}

@media (max-width: 480px) {
    .admin-dashboard-date {
        font-size: 10px;
    }
}

.admin-dashboard-kpi-grid {
    display: grid;
    gap: 10px;
}

@media (min-width: 768px) {
    .admin-dashboard-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .admin-dashboard-kpi-grid-inline {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }
}

.admin-dashboard-kpi-card {
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--white-10);
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(10, 16, 31, 0.72) 100%);
}

.admin-dashboard-kpi-label {
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-500);
    font-weight: 800;
}

.admin-dashboard-kpi-value {
    margin-top: 4px;
    font-size: 21px;
    line-height: 1.1;
    color: white;
    font-weight: 900;
}

.admin-dashboard-kpi-meta {
    margin-top: 3px;
    font-size: 10px;
    color: var(--slate-400);
}

@media (max-width: 767px) {
    .admin-dashboard-kpi-grid,
    .admin-dashboard-kpi-grid-inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .admin-dashboard-kpi-card {
        padding: 8px;
        border-radius: 10px;
    }

    .admin-dashboard-kpi-label {
        font-size: 9px;
        letter-spacing: 0.04em;
        line-height: 1.1;
    }

    .admin-dashboard-kpi-value {
        margin-top: 2px;
        font-size: 17px;
        line-height: 1.05;
    }

    .admin-dashboard-kpi-meta {
        margin-top: 2px;
        font-size: 9px;
        line-height: 1.15;
    }
}

.admin-dashboard-main-grid {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .admin-dashboard-main-grid {
        grid-template-columns: 1.4fr 1fr;
        gap: 14px;
    }
}

.admin-dashboard-panel {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--white-10);
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 767px) {
    .admin-dashboard-panel {
        padding: 12px;
        border-radius: 10px;
    }
}

.admin-dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-dashboard-panel-header h4 {
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-300);
}

@media (max-width: 767px) {
    .admin-dashboard-panel-header {
        margin-bottom: 10px;
    }

    .admin-dashboard-panel-header h4 {
        font-size: 12px;
        letter-spacing: 0.04em;
    }
}

.admin-priority-list {
    display: grid;
    gap: 10px;
}

.admin-priority-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--white-10);
    background: var(--white-5);
}

@media (max-width: 767px) {
    .admin-priority-item {
        padding: 8px;
        gap: 8px;
    }

    .admin-priority-title {
        font-size: 12px;
    }

    .admin-priority-desc {
        font-size: 10px;
    }
}

.admin-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: 6px;
    flex-shrink: 0;
}

.admin-priority-title {
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin: 0;
}

.admin-priority-desc {
    font-size: 11px;
    color: var(--slate-400);
    margin: 2px 0 0;
}

.admin-quick-actions-grid {
    display: grid;
    gap: 8px;
}

.admin-governance-section {
    margin-top: 24px;
    padding-top: 8px;
}

.admin-governance-grid {
    display: grid;
    gap: 12px;
}

@media (min-width: 1024px) {
    .admin-governance-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
        gap: 16px;
    }
}

.admin-governance-column {
    min-width: 0;
}

.admin-governance-summary {
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.24);
    background: rgba(99, 102, 241, 0.08);
    margin-bottom: 14px;
}

@media (max-width: 767px) {
    .admin-governance-summary {
        padding: 12px;
        border-radius: 10px;
    }

    .admin-governance-risk-desc {
        font-size: 11px;
    }
}

.admin-governance-summary-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .admin-governance-summary-top {
        gap: 8px;
        margin-bottom: 10px;
    }

    .admin-governance-risk-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

.admin-governance-risk-badge {
    border: 1px solid var(--white-15);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-governance-risk-desc {
    margin: 0;
    font-size: 12px;
    color: var(--slate-300);
}

.admin-governance-metrics-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .admin-governance-metrics-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.admin-governance-metric-card {
    border: 1px solid var(--white-10);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
}

@media (max-width: 767px) {
    .admin-governance-metric-card {
        padding: 8px;
        border-radius: 8px;
    }

    .admin-governance-metric-label {
        font-size: 9px;
    }

    .admin-governance-metric-value {
        font-size: 16px;
    }
}

.admin-governance-metric-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
    font-weight: 700;
}

.admin-governance-metric-value {
    display: block;
    margin-top: 3px;
    font-size: 18px;
    line-height: 1.1;
    color: white;
    font-weight: 900;
}

.admin-governance-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .admin-governance-actions {
        gap: 6px;
    }

    .admin-governance-actions .btn-secondary,
    .admin-governance-actions .btn-primary {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* ─── Admin Upload Section ──────────────────────────────── */

.admin-upload-section {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(10, 16, 31, 0.7) 100%);
    border: 1px solid var(--white-6);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    margin-bottom: 8px;
}

.admin-upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    transition: background var(--transition-fast);
    color: var(--accent-bright);
}

@media (max-width: 767px) {
    .admin-upload-section {
        border-radius: var(--radius-xl);
    }

    .admin-upload-header {
        padding: 16px;
        flex-wrap: wrap;
    }

    .admin-upload-body {
        padding: 0 16px 16px;
    }
}

.admin-upload-header:hover {
    background: rgba(59, 130, 246, 0.05);
}

.admin-upload-body {
    padding: 0 24px 24px;
    border-top: 1px solid var(--white-6);
}

/* ─── Admin Tournament Grid ─────────────────────────────── */

.admin-tournament-grid {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .admin-tournament-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.admin-tournament-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(10, 16, 31, 0.7) 100%);
    border: 1px solid var(--white-6);
    border-radius: var(--radius-xl);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-med);
}

@media (max-width: 767px) {
    .admin-tournament-card {
        padding: 14px;
        border-radius: var(--radius-lg);
    }

    .admin-tournament-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

.admin-tournament-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.admin-tournament-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.admin-tournament-stats {
    display: flex;
    gap: 8px;
}

@media (max-width: 480px) {
    .admin-tournament-stats {
        gap: 6px;
        flex-wrap: wrap;
    }
}

/* ─── Admin Match List ──────────────────────────────────── */

.admin-match-list {
    display: grid;
    gap: 8px;
}

.admin-match-row {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(10, 16, 31, 0.7) 100%);
    border: 1px solid var(--white-6);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color var(--transition-fast);
}

.admin-match-row:hover {
    border-color: var(--white-10);
}

@media (max-width: 767px) {
    .admin-match-row {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .admin-match-team {
        font-size: 12px;
    }

    .admin-score-input {
        width: 120px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (min-width: 768px) {
    .admin-match-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

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

.admin-match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.admin-match-players {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

@media (max-width: 480px) {
    .admin-match-players {
        gap: 6px;
    }
}

.admin-match-team {
    font-size: 13px;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
}

.admin-match-score-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .admin-match-score-area {
        flex-wrap: wrap;
        width: 100%;
    }

    .admin-score-input {
        flex: 1;
        min-width: 100px;
    }

    .admin-save-btn {
        flex: 1;
    }
}

.admin-score-input {
    width: 140px;
    padding: 8px 12px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--white-8);
    border-radius: var(--radius-md);
    color: white;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    outline: none;
}

.admin-score-input:focus {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-save-btn {
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   Bracket View Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── 3-Tab Indicator Support ──────────────────────────── */

.tournament-tabs-inner.tabs-three {
    max-width: 100%;
}

.tournament-tabs-inner.tabs-three > .tab-indicator {
    width: calc(33.333% - 4px);
}

.tournament-tabs-inner.tabs-three > .tab-indicator.right {
    transform: translateX(100%);
}

.tournament-tabs-inner.tabs-three > .tab-indicator.tab-indicator-bracket {
    transform: translateX(200%);
}

/* Regolamento as 3rd tab (no bracket, has regolamento) */
.tournament-tabs-inner.has-regolamento:not(.tabs-three) > .tab-indicator {
    width: calc(33.333% - 4px);
}

.tournament-tabs-inner.has-regolamento:not(.tabs-three) > .tab-indicator.tab-indicator-regolamento {
    transform: translateX(200%);
}

/* Regolamento as 4th tab (bracket + regolamento) */
.tournament-tabs-inner.tabs-three.has-regolamento > .tab-indicator {
    width: calc(25% - 4px);
}

.tournament-tabs-inner.tabs-three.has-regolamento > .tab-indicator.right {
    transform: translateX(100%);
}

.tournament-tabs-inner.tabs-three.has-regolamento > .tab-indicator.tab-indicator-bracket {
    transform: translateX(200%);
}

.tournament-tabs-inner.tabs-three.has-regolamento > .tab-indicator.tab-indicator-regolamento {
    transform: translateX(300%);
}

/* ─── Regolamento Content Styles ─────────────────────────── */

.regolamento-card {
    padding: 20px 24px;
}

.regolamento-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.regolamento-heading-1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 16px 0 8px;
}

.regolamento-heading-2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 14px 0 6px;
}

.regolamento-heading-3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 12px 0 4px;
}

.regolamento-paragraph {
    margin: 4px 0;
}

.regolamento-list-item {
    padding-left: 16px;
    position: relative;
    margin: 3px 0;
}

.regolamento-list-item:not(.regolamento-list-numbered)::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent);
    font-weight: 700;
}

.regolamento-content h2:first-child,
.regolamento-content h3:first-child,
.regolamento-content h4:first-child {
    margin-top: 0;
}

/* ─── Bracket View Container ─────────────────────────────── */

.bracket-view {
    animation: fade-in 0.3s ease;
}

/* ─── Round Pills Bar ────────────────────────────────────── */

.bracket-pills-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 20px;
}

.bracket-pill {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--slate-400);
    background: transparent;
    border: 1.5px solid var(--white-10);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.bracket-pill:hover {
    color: white;
    border-color: var(--white-15);
    background: var(--white-5);
}

.bracket-pill-active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.bracket-pill-active:hover {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
}

.bracket-pill-done:not(.bracket-pill-active) {
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--emerald);
}

.bracket-pill-done:not(.bracket-pill-active):hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.06);
}

/* ─── Round Title ────────────────────────────────────────── */

.bracket-round-title {
    font-size: 18px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    margin-bottom: 20px;
}

/* ─── Match Cards List ───────────────────────────────────── */

.bracket-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
}

/* ─── Bracket Pair (two cards + connector) ───────────────── */

.bracket-pair {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 8px;
}

.bracket-pair-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.bracket-pair-connector {
    width: 32px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.bracket-connector-line {
    position: absolute;
    right: 8px;
    top: 25%;
    bottom: 25%;
    width: 2px;
    background: var(--white-12, rgba(255, 255, 255, 0.12));
    border-radius: 1px;
}

.bracket-connector-line::before,
.bracket-connector-line::after {
    content: '';
    position: absolute;
    right: 0;
    width: 10px;
    height: 2px;
    background: var(--white-12, rgba(255, 255, 255, 0.12));
}

.bracket-connector-line::before {
    top: 0;
}

.bracket-connector-line::after {
    bottom: 0;
}

.bracket-connector-dot {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* ─── Bracket Match Card ─────────────────────────────────── */

.bracket-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.5) 0%, rgba(10, 16, 31, 0.7) 100%);
    border: 1px solid var(--white-8);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.bracket-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.bracket-card-tbd {
    opacity: 0.45;
    border-style: dashed;
}

.bracket-card-tbd:hover {
    opacity: 0.6;
}

/* Card Header */
.bracket-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--white-6);
}

.bracket-card-num {
    font-size: 11px;
    font-weight: 900;
    color: var(--slate-500);
    min-width: 20px;
}

.bracket-card-group {
    font-size: 9px;
    font-weight: 800;
    color: var(--accent-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.bracket-card-status {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.bracket-card-status-done {
    color: var(--gold);
    background: rgba(251, 191, 36, 0.1);
}

.bracket-card-status-live {
    color: var(--emerald);
    background: rgba(16, 185, 129, 0.1);
}

.bracket-card-status-tbd {
    color: var(--slate-500);
    background: var(--white-5);
}

/* Card Rows (player lines) */
.bracket-card-rows {
    display: flex;
    flex-direction: column;
}

.bracket-card-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    gap: 8px;
    transition: background var(--transition-fast);
}

.bracket-card-row+.bracket-card-row {
    border-top: 1px solid var(--white-5);
}

/* Winner / Loser styling */
.bracket-row-winner {
    background: rgba(16, 185, 129, 0.04);
}

.bracket-row-winner .bracket-player-name {
    color: white;
    font-weight: 800;
}

.bracket-row-loser .bracket-player-name {
    color: var(--slate-600);
    text-decoration: line-through;
    text-decoration-color: rgba(239, 68, 68, 0.3);
}

/* Checkmark */
.bracket-check {
    font-size: 12px;
    font-weight: 900;
    color: var(--emerald);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.bracket-check-space {
    width: 18px;
    flex-shrink: 0;
}

/* Player name */
.bracket-player-name {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-300);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Set scores */
.bracket-sets {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.bracket-set {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-500);
    width: 20px;
    text-align: center;
}

.bracket-set-win {
    color: white;
    font-weight: 900;
}

/* ─── Champion Banner ────────────────────────────────────── */

.bracket-champion-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.03) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-xl);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    animation: scale-up 0.4s ease;
}

.bracket-champion-trophy {
    font-size: 36px;
    flex-shrink: 0;
}

.bracket-champion-label {
    font-size: 9px;
    font-weight: 900;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 4px;
}

.bracket-champion-name {
    font-size: 18px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ─── Cookie Banner ─────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
    left: 20px;
    left: max(20px, calc(20px + env(safe-area-inset-left)));
    right: 20px;
    right: max(20px, calc(20px + env(safe-area-inset-right)));
    max-width: 56rem;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9) 0%, rgba(10, 16, 31, 0.95) 100%);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-xl);
    padding: 20px;
    z-index: 100;
    box-shadow: var(--shadow-hover);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.cookie-text p {
    font-size: 12px;
    color: var(--slate-400);
    line-height: 1.5;
}

/* ─── Container Tournament Cards ────────────────────────── */

.tournament-card-container {
    border-color: rgba(251, 191, 36, 0.15);
}

.tournament-card-container:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.container-child-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: var(--white-5);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 2;
}

.container-child-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}

.admin-container-card {
    border-color: rgba(251, 191, 36, 0.2);
}

.admin-container-card:hover {
    border-color: rgba(251, 191, 36, 0.4);
}

.admin-container-child-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--white-10);
    transition: all var(--transition-fast);
}

.admin-container-child-wrapper:hover {
    border-color: rgba(251, 191, 36, 0.3);
}

.admin-container-child {
    background: var(--white-5);
    padding: 16px;
    border-left: 3px solid var(--gold);
    transition: all var(--transition-fast);
}

@media (max-width: 767px) {
    .admin-container-child {
        padding: 12px;
    }

    .admin-container-child-wrapper {
        margin-bottom: 10px;
    }
}

.admin-container-child:hover {
    background: var(--white-8);
}

/* ─── Girone Selection Popup ────────────────────────────── */

.girone-popup-card {
    max-width: 440px;
    text-align: center;
}

@media (max-width: 480px) {
    .girone-popup-card {
        max-width: 100%;
        margin: 0 16px;
    }

    .girone-popup-trophy {
        width: 56px;
        height: 56px;
    }
}

.girone-popup-header {
    margin-bottom: 24px;
}

.girone-popup-trophy {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.08));
    border: 1px solid rgba(251, 191, 36, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--gold);
    animation: scale-up 0.3s ease;
}

.girone-popup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.girone-popup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: var(--white-5);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: white;
    font-family: inherit;
    font-size: inherit;
}

@media (max-width: 480px) {
    .girone-popup-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .girone-popup-item-name {
        font-size: 13px;
    }

    .girone-popup-item-count {
        font-size: 10px;
    }
}

.girone-popup-item:hover {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
    transform: translateX(4px);
}

.girone-popup-item:active {
    transform: translateX(2px) scale(0.99);
}

.girone-popup-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.girone-popup-item-icon {
    flex-shrink: 0;
    color: var(--gold);
    display: flex;
    align-items: center;
}

.girone-popup-item-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.girone-popup-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.girone-popup-item-count {
    font-size: 11px;
    color: var(--slate-500);
}

.girone-popup-item-completed {
    font-size: 11px;
    color: var(--emerald);
    font-weight: 600;
}

/* ─── Share Button ───────────────────────────────────────── */

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-share {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--white-5);
    border: 1px solid var(--white-10);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-share:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-bright);
    transform: scale(1.05);
}

/* ─── Share Modal ────────────────────────────────────────── */

.share-modal-card {
    max-width: 360px;
    width: 90vw;
}

.share-header {
    text-align: center;
    margin-bottom: 24px;
}

.share-icon-main {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: var(--radius-xl);
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--white-5);
    border: 1px solid var(--white-8);
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.share-card:hover {
    background: var(--white-10);
    border-color: var(--white-15);
    transform: translateX(4px);
}

.share-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ─── Refresh Toast ──────────────────────────────────────── */

.refresh-toast {
    position: fixed;
    bottom: 24px;
    bottom: max(24px, calc(24px + env(safe-area-inset-bottom)));
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    z-index: 100;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.refresh-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.refresh-toast-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    animation: pulse-dot 1.5s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─── Light Theme Overrides ──────────────────────────────── */

[data-theme="light"] body {
    background-color: var(--bg-body);
}

[data-theme="light"] .glass-header {
    background: var(--bg-header);
    border-bottom-color: var(--border-subtle);
    box-shadow: 0 8px 24px -18px rgba(37, 99, 235, 0.35);
}

[data-theme="light"] .match-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.96));
    border-color: var(--border-card);
    box-shadow: 0 8px 24px -18px rgba(37, 99, 235, 0.3);
}

[data-theme="light"] .match-card:hover {
    box-shadow: 0 18px 34px -20px rgba(37, 99, 235, 0.45);
}

[data-theme="light"] .match-card-accent {
    opacity: 0.6;
}

[data-theme="light"] .tournament-card-inner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.97));
    border-color: var(--border-card);
    box-shadow: 0 10px 26px -20px rgba(37, 99, 235, 0.35);
}

[data-theme="light"] .tournament-card:hover .tournament-card-inner {
    box-shadow: 0 20px 38px -24px rgba(37, 99, 235, 0.5);
}

[data-theme="light"] .tournament-icon {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .tournament-name {
    color: var(--text-heading);
}

[data-theme="light"] .tournament-tabs {
    background: var(--bg-body);
}

[data-theme="light"] .tournament-tabs-inner {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-card);
    box-shadow: 0 10px 22px -18px rgba(37, 99, 235, 0.35);
}

[data-theme="light"] .tournament-tab:not(.active) {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-tabs {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-card);
}

[data-theme="light"] .nav-tab:not(.active) {
    color: var(--text-secondary);
}

[data-theme="light"] .section-title {
    color: var(--text-heading);
}

[data-theme="light"] .meta-tag {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-card);
    color: var(--text-secondary);
}

[data-theme="light"] .player-name {
    color: var(--text-heading);
}

[data-theme="light"] .vs-text {
    color: var(--text-muted);
}

[data-theme="light"] .search-input {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--border-card);
    color: var(--text-primary);
}

[data-theme="light"] .search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .btn-icon {
    color: var(--text-secondary);
}

[data-theme="light"] .btn-icon:hover {
    background: rgba(59, 130, 246, 0.14);
    color: var(--text-primary);
}

[data-theme="light"] .badge-finished {
    background: rgba(251, 191, 36, 0.1);
    color: #b45309;
}

[data-theme="light"] .badge-live {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

[data-theme="light"] .leaderboard-table th {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-secondary);
}

[data-theme="light"] .leaderboard-table td {
    border-color: var(--border-subtle);
    color: var(--text-primary);
}

[data-theme="light"] .leaderboard-table tr:hover td {
    background: rgba(59, 130, 246, 0.04);
}

[data-theme="light"] .player-avatar {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

[data-theme="light"] .filter-panel {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--border-subtle);
}

[data-theme="light"] .filter-chip {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--border-card);
    color: var(--text-secondary);
}

[data-theme="light"] .modal-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 247, 255, 0.98));
    border-color: var(--border-card);
    box-shadow: 0 30px 60px -30px rgba(37, 99, 235, 0.5);
}

[data-theme="light"] .modal-overlay {
    background: rgba(15, 23, 42, 0.28);
}

[data-theme="light"] .modal-title {
    color: var(--text-heading);
}

[data-theme="light"] .set-count {
    color: var(--text-primary);
}

[data-theme="light"] .score-display {
    color: var(--text-secondary);
}

[data-theme="light"] .match-info-note-block {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--border-card);
    color: var(--text-secondary);
}


[data-theme="light"] .site-footer {
    border-top-color: var(--border-subtle);
}

[data-theme="light"] .go-top-btn {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border-card);
    color: var(--text-secondary);
    box-shadow: 0 14px 30px -20px rgba(37, 99, 235, 0.45);
}

[data-theme="light"] .regolamento-content {
    color: var(--text-primary);
}

[data-theme="light"] .regolamento-heading-1,
[data-theme="light"] .regolamento-heading-2 {
    color: var(--text-heading);
}

[data-theme="light"] .loading-screen {
    background: var(--bg-body);
}

[data-theme="light"] .share-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-card);
}

[data-theme="light"] .share-card:hover {
    background: rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .admin-dashboard-welcome {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-card);
}

[data-theme="light"] .admin-mobile-tab-btn {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--border-card);
    color: var(--text-secondary);
}

[data-theme="light"] .admin-mobile-tab-btn.active {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.32);
    color: var(--text-heading);
}

[data-theme="light"] .admin-dashboard-kpi-card,
[data-theme="light"] .admin-dashboard-panel {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-card);
}

[data-theme="light"] .admin-dashboard-kpi-value,
[data-theme="light"] .admin-priority-title,
[data-theme="light"] .admin-dashboard-panel-header h4 {
    color: var(--text-heading);
}

[data-theme="light"] .admin-priority-item {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--border-card);
}

[data-theme="light"] .admin-governance-summary {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.22);
}

[data-theme="light"] .admin-governance-metric-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-card);
}

[data-theme="light"] .admin-governance-metric-value {
    color: var(--text-heading);
}

[data-theme="light"] .girone-popup-item {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--border-card);
}

[data-theme="light"] .girone-popup-item:hover {
    background: rgba(251, 191, 36, 0.06);
}

[data-theme="light"] .detail-title {
    color: var(--text-heading);
}

[data-theme="light"] .btn-back {
    color: var(--text-secondary);
}

[data-theme="light"] .btn-back:hover {
    color: var(--accent);
}

/* Active tab text — stays white on accent bg in both themes */

[data-theme="light"] .player-cell-name {
    color: var(--text-heading);
}

[data-theme="light"] .player-card-name {
    color: var(--text-heading);
}

[data-theme="light"] .player-card-inner {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(239, 246, 255, 0.97));
    border-color: var(--border-card);
    box-shadow: 0 10px 26px -20px rgba(37, 99, 235, 0.35);
}

[data-theme="light"] .player-detail-name {
    color: var(--text-heading);
}

[data-theme="light"] .player-detail-icon {
    color: var(--accent);
}

[data-theme="light"] .player-detail-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(240, 247, 255, 0.97));
}

[data-theme="light"] .reminder-card-title {
    color: var(--text-heading);
}

[data-theme="light"] .reminder-match-label {
    color: var(--text-heading);
}

[data-theme="light"] .filter-count strong {
    color: var(--text-heading);
}

[data-theme="light"] .bracket-round-title {
    color: var(--text-heading);
}

[data-theme="light"] .bracket-player-name {
    color: var(--text-primary);
}

[data-theme="light"] .bracket-row-winner .bracket-player-name {
    color: var(--text-heading);
}

[data-theme="light"] .bracket-champion-name {
    color: var(--text-heading);
}

[data-theme="light"] .bracket-match-card {
    background: white;
    border-color: var(--border-card);
}

[data-theme="light"] .bracket-pill {
    color: var(--text-secondary);
}

[data-theme="light"] .bracket-set-win {
    color: var(--accent);
}

[data-theme="light"] .girone-popup-item-name {
    color: var(--text-heading);
}