/* ============================================
   FBC Újezd — Dark/Light Dashboard Theme
   Black & Yellow jersey · nohesi.gg inspired
   ============================================ */

/* ===== Dark theme (default) ===== */
:root, [data-theme="dark"] {
    --bg-primary: #06060a;
    --bg-secondary: #0d0d12;
    --bg-card: rgba(18, 18, 26, 0.75);
    --bg-card-solid: #12121a;
    --bg-card-hover: rgba(26, 26, 36, 0.85);
    --bg-sidebar: rgba(10, 10, 16, 0.92);
    --bg-input: #14141c;
    --accent: #f5c518;
    --accent-dim: rgba(245, 197, 24, 0.12);
    --accent-glow: rgba(245, 197, 24, 0.30);
    --accent-hover: #ffd84a;
    --accent-secondary: #a78bfa;
    --accent-secondary-dim: rgba(167, 139, 250, 0.12);
    --text-primary: #f0f0f5;
    --text-secondary: #9a9ab0;
    --text-muted: #505068;
    --goals-color: #f5c518;
    --assists-color: #a78bfa;
    --points-color: #f0f0f5;
    --border: rgba(255, 255, 255, 0.07);
    --border-active: rgba(245, 197, 24, 0.35);
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(245, 197, 24, 0.10);
    --header-bg: linear-gradient(135deg, #0a0a12 0%, #18160a 40%, #12101a 100%);
    --header-glow: rgba(245, 197, 24, 0.07);
    --glass-blur: blur(20px);
    --msg-success-bg: rgba(34,197,94,0.12);
    --msg-success-color: #22c55e;
    --msg-error-bg: rgba(239,68,68,0.12);
    --msg-error-color: #ef4444;
    --dot-color: rgba(245, 197, 24, 0.40);
    --dot-size: 2.2px;
}

/* ===== Light theme ===== */
[data-theme="light"] {
    --bg-primary: #f4f4f8;
    --bg-secondary: #eaeaef;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-solid: #ffffff;
    --bg-card-hover: rgba(250, 250, 254, 0.9);
    --bg-sidebar: rgba(255, 255, 255, 0.9);
    --bg-input: #f0f0f4;
    --accent: #c9a000;
    --accent-dim: rgba(201, 160, 0, 0.10);
    --accent-glow: rgba(201, 160, 0, 0.20);
    --accent-hover: #a88600;
    --accent-secondary: #7c5cfc;
    --accent-secondary-dim: rgba(124, 92, 252, 0.10);
    --text-primary: #111118;
    --text-secondary: #5a5a6e;
    --text-muted: #8e8ea0;
    --goals-color: #b8860b;
    --assists-color: #7c5cfc;
    --points-color: #111118;
    --border: rgba(0, 0, 0, 0.07);
    --border-active: rgba(201, 160, 0, 0.35);
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 24px rgba(201, 160, 0, 0.06);
    --header-bg: linear-gradient(135deg, #f0f0f4 0%, #faf6e6 50%, #f0f0f4 100%);
    --header-glow: rgba(201, 160, 0, 0.10);
    --glass-blur: blur(16px);
    --msg-success-bg: rgba(34,197,94,0.1);
    --msg-success-color: #15803d;
    --msg-error-bg: rgba(239,68,68,0.1);
    --msg-error-color: #dc2626;
    --dot-color: rgba(160, 130, 0, 0.22);
    --dot-size: 1.8px;
}

/* ===== Shared vars ===== */
:root {
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s ease;
    --sidebar-width: 260px;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-primary); color: var(--text-primary); line-height: 1.5; min-height: 100vh;
}
/*
 * Jersey halftone pattern — mimics the real jersey's diagonal halftone gradient.
 * Uses 3 layers of increasing dot sizes masked to regions so dots grow
 * from small (top-right) to large (bottom-left), like a genuine halftone print.
 * A diagonal mask creates the fade from dense yellow to clean black.
 */

/* Jersey dots — 2 size layers blended by region masks */
body::before {
    content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    /* Small dots — visible in the mid-transition zone */
    background:
        radial-gradient(circle, var(--dot-color) 2px, transparent 2px),
        radial-gradient(circle, var(--dot-color) 2px, transparent 2px);
    background-size: 16px 16px, 16px 16px;
    background-position: 0 0, 8px 8px;
    -webkit-mask-image:
        linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.25) 18%, rgba(0,0,0,0.55) 32%, rgba(0,0,0,0.3) 48%, transparent 62%);
    mask-image:
        linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.25) 18%, rgba(0,0,0,0.55) 32%, rgba(0,0,0,0.3) 48%, transparent 62%);
}
body::after {
    content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    /* Large dots — visible in the dense bottom-left corner */
    background:
        radial-gradient(circle, var(--dot-color) 4.5px, transparent 4.5px),
        radial-gradient(circle, var(--dot-color) 4.5px, transparent 4.5px);
    background-size: 16px 16px, 16px 16px;
    background-position: 0 0, 8px 8px;
    -webkit-mask-image:
        linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 8%, rgba(0,0,0,0.5) 18%, rgba(0,0,0,0.2) 30%, transparent 45%);
    mask-image:
        linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 8%, rgba(0,0,0,0.5) 18%, rgba(0,0,0,0.2) 30%, transparent 45%);
}
[data-theme="light"] body::before {
    background:
        radial-gradient(circle, var(--dot-color) 1.5px, transparent 1.5px),
        radial-gradient(circle, var(--dot-color) 1.5px, transparent 1.5px);
    background-size: 16px 16px, 16px 16px;
    background-position: 0 0, 8px 8px;
}
[data-theme="light"] body::after {
    background:
        radial-gradient(circle, var(--dot-color) 3.5px, transparent 3.5px),
        radial-gradient(circle, var(--dot-color) 3.5px, transparent 3.5px);
    background-size: 16px 16px, 16px 16px;
    background-position: 0 0, 8px 8px;
}
.app-layout, .sidebar, .main-content, .page-header, .page-body { position: relative; z-index: 1; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* ===== App Layout ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== Mobile top bar ===== */
.mobile-topbar {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: 56px; background: var(--bg-sidebar); backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    align-items: center; justify-content: space-between; padding: 0 16px;
}
.mobile-brand { font-weight: 800; font-size: 16px; color: var(--text-primary); }
.mobile-brand strong { color: var(--accent); }
.hamburger {
    background: none; border: none; cursor: pointer; padding: 8px; display: flex; flex-direction: column; gap: 5px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 8px; border-radius: var(--radius-sm); }
.icon-btn:hover { color: var(--text-primary); background: var(--bg-card); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 149; backdrop-filter: blur(4px); }
.sidebar-overlay.show { display: block; }

/* ===== Sidebar — premium dark glass panel ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0c0c14 0%, #080810 100%);
    border-right: 1px solid rgba(255,255,255,0.04);
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 150; overflow-y: auto;
    transition: transform 0.3s ease;
}
[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #fafafa 0%, #f4f4f8 100%);
    border-right-color: rgba(0,0,0,0.06);
}
.sidebar-brand {
    display: flex; align-items: center; gap: 14px; padding: 24px 20px 20px;
    position: relative;
}
.sidebar-brand::after {
    content: ''; position: absolute; bottom: 0; left: 20px; right: 20px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245,197,24,0.15), transparent);
}
.brand-icon {
    font-size: 20px; width: 38px; height: 38px;
    background: linear-gradient(135deg, #f5c518 0%, #d4a200 100%);
    color: #000; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 16px rgba(245,197,24,0.25);
}
.brand-info { display: flex; flex-direction: column; }
.brand-text { font-family: var(--font-heading); font-size: 18px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); line-height: 1.2; }
.brand-sub { font-size: 10px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 1px; }
.sidebar-nav { list-style: none; padding: 20px 14px; flex: 1; }
.sidebar-nav li { margin-bottom: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px;
    color: var(--text-secondary); font-size: 14px; font-weight: 500; transition: all 0.15s ease;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
[data-theme="light"] .nav-link:hover { background: rgba(0,0,0,0.04); }
.nav-link.active {
    color: #000; background: linear-gradient(135deg, #f5c518 0%, #e8b400 100%);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(245,197,24,0.2);
}
[data-theme="light"] .nav-link.active { color: #000; }
.nav-link.active .nav-icon { stroke: #000; }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,0.04); }
[data-theme="light"] .sidebar-footer { border-top-color: rgba(0,0,0,0.06); }
.sidebar-controls { display: flex; gap: 6px; margin-bottom: 10px; }
.control-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03); color: var(--text-secondary); cursor: pointer; font-size: 12px; font-weight: 600;
    transition: all 0.15s ease;
}
[data-theme="light"] .control-btn { border-color: rgba(0,0,0,0.06); background: rgba(0,0,0,0.02); }
.control-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.07); }
[data-theme="light"] .control-btn:hover { background: rgba(0,0,0,0.05); }
.lang-label { font-family: 'Inter', sans-serif; }
.sidebar-user { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

/* Theme icon visibility */
[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }

/* ===== Main Content ===== */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; position: relative; z-index: 1; }

/* ===== Page Header — bold gradient with glow ===== */
.page-header {
    position: relative; padding: 28px 40px 22px;
    overflow: hidden;
}
[data-theme="dark"] .page-header {
    background: linear-gradient(135deg, #0a0a12 0%, #1c1708 20%, #201018 50%, #10081a 80%, #0a0a12 100%);
    border-bottom: none;
}
[data-theme="light"] .page-header {
    background: linear-gradient(135deg, #f2f2f6 0%, #faf4dc 40%, #f2eef8 70%, #f2f2f6 100%);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
/* Gold glow — top right */
.page-header::before {
    content: ''; position: absolute; top: -70%; right: -10%; width: 600px; height: 500px;
    background: radial-gradient(ellipse, rgba(245,197,24,0.16) 0%, rgba(245,197,24,0.05) 35%, transparent 65%);
    pointer-events: none; z-index: 0;
}
/* Purple glow — bottom left */
.page-header::after {
    content: ''; position: absolute; bottom: -50%; left: 0; width: 450px; height: 350px;
    background: radial-gradient(ellipse, rgba(167,139,250,0.10) 0%, transparent 60%);
    pointer-events: none; z-index: 0;
}
/* Bright gradient line at bottom */
.page-header .header-glow-line {
    position: absolute; bottom: 0; left: 0; right: 0; height: 2px; z-index: 2;
    background: linear-gradient(90deg, transparent 2%, rgba(245,197,24,0.45) 20%, rgba(245,197,24,0.6) 40%, rgba(167,139,250,0.35) 65%, transparent 98%);
}
[data-theme="light"] .page-header::before { background: radial-gradient(ellipse, rgba(201,160,0,0.10) 0%, transparent 55%); }
[data-theme="light"] .page-header::after { background: radial-gradient(ellipse, rgba(124,92,252,0.05) 0%, transparent 55%); }
[data-theme="light"] .page-header .header-glow-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(201,160,0,0.25) 30%, rgba(124,92,252,0.12) 70%, transparent 95%);
}
.header-top-row { display: flex; align-items: flex-start; justify-content: space-between; position: relative; z-index: 1; gap: 16px; }
.header-left { flex: 1; min-width: 0; }
.header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.page-title { font-family: var(--font-heading); font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.page-title .title-accent { color: var(--accent); text-shadow: 0 0 40px rgba(245,197,24,0.3); }
.page-subtitle { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-top: 2px; position: relative; z-index: 1; }
.page-body { padding: 28px 40px; }

/* ===== Messages ===== */
.messages-bar { padding: 12px 40px 0; }
.msg { padding: 10px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 8px; backdrop-filter: blur(8px); }
.msg-success { background: var(--msg-success-bg); color: var(--msg-success-color); }
.msg-error { background: var(--msg-error-bg); color: var(--msg-error-color); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, #f5c518 0%, #e0a800 100%); color: #000; box-shadow: 0 2px 12px rgba(245,197,24,0.2); }
.btn-primary:hover { background: linear-gradient(135deg, #ffd84a 0%, #f5c518 100%); color: #000; box-shadow: 0 4px 20px rgba(245,197,24,0.3); }
.btn-accent { background: var(--bg-card-solid); border: 1px solid var(--accent); color: var(--accent); }
.btn-accent:hover { background: rgba(245,197,24,0.1); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); backdrop-filter: var(--glass-blur); }
.btn-secondary:hover { border-color: var(--border-active); }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); text-decoration: none; display: inline-flex; align-items: center; }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-active); }
.btn-danger { background: rgba(239,68,68,0.12); color: #ef4444; }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ===== Forms ===== */
.form-card {
    background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
}
.form-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.form-group.full { flex-basis: 100%; }
.form-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 14px; color: var(--text-primary); font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition); width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239a9aab' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.form-error { color: #ef4444; font-size: 12px; margin-top: 4px; }
.stat-entry-rows { margin-top: 16px; }
.stat-entry-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.stat-entry-row:last-child { border-bottom: none; }
.stat-entry-player { flex: 1; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.stat-entry-input { width: 70px; text-align: center; }

/* ===== Toggle switches ===== */
.toggle-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input[type="checkbox"] { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute; inset: 0; border-radius: 24px;
    background: var(--border); transition: background 0.25s ease, box-shadow 0.25s ease;
}
.toggle-slider::before {
    content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: var(--text-secondary); transition: transform 0.25s ease, background 0.25s ease;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-dim); border: 1px solid var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); background: var(--accent); }
.toggle-switch input:checked + .toggle-slider--purple { background: var(--accent-secondary-dim); border: 1px solid var(--accent-secondary); }
.toggle-switch input:checked + .toggle-slider--purple::before { background: var(--accent-secondary); }

/* ===== Stat Cards — glassmorphism ===== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; transition: all var(--transition); position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), rgba(167,139,250,0.5)); opacity: 0.5; }
.stat-card:hover { border-color: var(--border-active); background: var(--bg-card-hover); box-shadow: var(--shadow-glow); }
.stat-card:hover::before { opacity: 1; }
.stat-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 8px; }
.stat-card-value { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat-card-value.accent { color: var(--accent); text-shadow: 0 0 24px rgba(245,197,24,0.15); }
.stat-card-value.purple { color: var(--accent-secondary); text-shadow: 0 0 24px rgba(167,139,250,0.15); }
.stat-card-sub { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* ===== Section Headers ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.section-link { font-size: 13px; font-weight: 600; color: var(--accent); }

/* ===== Tables — glass bg ===== */
.data-table-wrap {
    background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; margin-bottom: 28px;
    -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    background: rgba(0,0,0,0.2); padding: 11px 16px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); text-align: left; border-bottom: 1px solid var(--border);
}
[data-theme="light"] .data-table thead th { background: rgba(0,0,0,0.03); }
.data-table thead th.text-center { text-align: center; }
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.03); }
[data-theme="light"] .data-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.data-table tbody td { padding: 12px 16px; font-size: 14px; vertical-align: middle; }
.data-table tbody td.text-center { text-align: center; }
.data-table .rank { font-weight: 800; color: var(--text-muted); width: 40px; font-size: 16px; }
.data-table .rank-1 { color: #f5c518; text-shadow: 0 0 10px rgba(245,197,24,0.3); }
.data-table .rank-2 { color: #c0c0c0; }
.data-table .rank-3 { color: #cd7f32; }
.data-table .stat-value { font-weight: 700; font-size: 15px; }
.data-table .stat-value.goals { color: var(--goals-color); }
.data-table .stat-value.assists { color: var(--assists-color); }
.data-table .stat-value.points { color: var(--points-color); }

/* ===== Player Cell ===== */
.player-cell { display: flex; align-items: center; gap: 12px; }
.player-cell .avatar { flex-shrink: 0; }
.player-cell .player-info { display: flex; flex-direction: column; }
.player-cell .player-name { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.player-cell .player-meta { font-size: 12px; color: var(--text-muted); }

/* ===== Player Cards ===== */
.player-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-bottom: 28px; }
.player-card {
    background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; transition: all var(--transition); display: flex; flex-direction: column; align-items: center; text-align: center;
}
.player-card:hover { border-color: var(--border-active); background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.player-card .avatar { margin-bottom: 14px; }
.player-card .player-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.player-card .player-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.player-card .player-stats-row { display: flex; gap: 18px; justify-content: center; }
.player-card .mini-stat { text-align: center; }
.player-card .mini-stat-value { font-size: 20px; font-weight: 800; line-height: 1; }
.player-card .mini-stat-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-top: 4px; }

/* ===== Game/Session Cards ===== */
.game-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.game-card {
    background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between; transition: all var(--transition);
}
.game-card:hover { border-color: var(--border-active); background: var(--bg-card-hover); box-shadow: 0 2px 16px rgba(245,197,24,0.05); }
.game-card-left { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.game-date { font-size: 13px; color: var(--text-secondary); min-width: 85px; flex-shrink: 0; }
.game-title { font-size: 15px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.game-players-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.game-total-goals { background: var(--accent-dim); color: var(--accent); padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 700; }

/* ===== Player Profile ===== */
.player-profile { display: flex; gap: 32px; margin-bottom: 28px; align-items: flex-start; }
.player-profile-main { display: flex; align-items: center; gap: 24px; }
.player-profile-info h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.player-profile-info .player-meta { font-size: 14px; color: var(--text-secondary); }
.player-profile-info .player-bio { margin-top: 12px; font-size: 14px; color: var(--text-secondary); max-width: 500px; line-height: 1.6; }

/* ===== Session Detail Hero — gradient glow ===== */
.game-hero {
    background: var(--bg-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 36px; text-align: center; margin-bottom: 28px; position: relative; overflow: hidden;
}
[data-theme="dark"] .game-hero { background: linear-gradient(160deg, rgba(18,18,26,0.8) 0%, rgba(30,26,14,0.6) 100%); }
.game-hero::before {
    content: ''; position: absolute; top: -30%; left: 50%; transform: translateX(-50%); width: 600px; height: 400px;
    background: radial-gradient(ellipse, rgba(245,197,24,0.07) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 80%, rgba(167,139,250,0.04) 0%, transparent 50%);
    pointer-events: none;
}
.game-hero .session-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 10px; font-weight: 700; position: relative; z-index: 1; }
.game-hero .session-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; position: relative; z-index: 1; }
.game-hero .game-date-big { font-size: 14px; color: var(--text-muted); position: relative; z-index: 1; }
.game-hero .session-description { color: var(--text-secondary); margin-top: 10px; font-size: 14px; position: relative; z-index: 1; }

/* ===== Podium — vivid gradients ===== */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 16px; margin-bottom: 28px; padding: 16px 0; }
/* Desktop: reorder to 2-1-3 podium layout (DOM order is 2,1,3 in template but we want visual 2-1-3) */
.podium-card.second { order: 1; }
.podium-card.first { order: 2; }
.podium-card.third { order: 3; }
.podium-card {
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px;
    text-align: center; width: 190px; transition: all 0.3s ease; position: relative; overflow: hidden;
}
.podium-card:hover { transform: translateY(-4px); }
.podium-card > * { position: relative; z-index: 1; }

/* 1st — gold */
.podium-card.first {
    background: linear-gradient(160deg, rgba(18,18,26,0.85) 0%, rgba(245,197,24,0.12) 100%);
    border-color: rgba(245,197,24,0.30); padding: 28px 18px;
    box-shadow: 0 8px 40px rgba(245,197,24,0.10);
}
.podium-card.first:hover { box-shadow: 0 12px 50px rgba(245,197,24,0.18); }
[data-theme="light"] .podium-card.first { background: linear-gradient(160deg, rgba(255,255,255,0.9) 0%, rgba(245,197,24,0.12) 100%); }
/* 2nd — silver */
.podium-card.second {
    background: linear-gradient(160deg, rgba(18,18,26,0.85) 0%, rgba(192,192,192,0.08) 100%);
    border-color: rgba(192,192,192,0.15);
}
.podium-card.second:hover { box-shadow: 0 8px 32px rgba(192,192,192,0.08); }
[data-theme="light"] .podium-card.second { background: linear-gradient(160deg, rgba(255,255,255,0.9) 0%, rgba(192,192,192,0.10) 100%); }
/* 3rd — bronze */
.podium-card.third {
    background: linear-gradient(160deg, rgba(18,18,26,0.85) 0%, rgba(205,127,50,0.08) 100%);
    border-color: rgba(205,127,50,0.15);
}
.podium-card.third:hover { box-shadow: 0 8px 32px rgba(205,127,50,0.08); }
[data-theme="light"] .podium-card.third { background: linear-gradient(160deg, rgba(255,255,255,0.9) 0%, rgba(205,127,50,0.10) 100%); }

.podium-rank { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.podium-card.first .podium-rank { color: #f5c518; text-shadow: 0 0 16px rgba(245,197,24,0.4); }
.podium-card.second .podium-rank { color: #c0c0c0; }
.podium-card.third .podium-rank { color: #cd7f32; }
.podium-card .avatar { margin: 0 auto 10px; }
.podium-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.podium-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.podium-stat { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1; text-shadow: 0 0 20px rgba(245,197,24,0.15); }
.podium-stat-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 4px; }

/* ===== Login page ===== */
.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--bg-primary); }
.login-card { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 400px; text-align: center; }
.login-card .brand-icon { font-size: 32px; width: 56px; height: 56px; margin: 0 auto 16px; background: linear-gradient(135deg, #f5c518, #e0a800); color: #000; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(245,197,24,0.25); }
.login-card h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-card .login-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.login-card .form-group { margin-bottom: 16px; text-align: left; }
.login-card .btn { width: 100%; justify-content: center; }

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 44px 24px; color: var(--text-muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 14px; opacity: 0.5; }
.empty-state-text { font-size: 16px; font-weight: 500; }
.empty-state-sub { font-size: 13px; margin-top: 8px; }

/* ===== Grid layouts ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

/* ===== Responsive — tablet ===== */
@media (max-width: 1024px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .podium { flex-direction: column; align-items: center; }
    .podium-card { width: 100%; max-width: 280px; }
    /* On mobile: 1st on top, then 2nd, then 3rd */
    .podium-card.first { order: 1; }
    .podium-card.second { order: 2; }
    .podium-card.third { order: 3; }
}

/* ===== Responsive — mobile ===== */
@media (max-width: 768px) {
    .mobile-topbar { display: flex; }
    .sidebar { transform: translateX(-100%); top: 56px; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding-top: 56px; }
    .page-header { padding: 20px 16px 16px; }
    .page-title { font-size: 22px; }
    .page-body { padding: 16px; }
    .messages-bar { padding: 8px 16px 0; }
    .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 16px; }
    .stat-card-value { font-size: 28px; }
    .player-profile { flex-direction: column; }
    .player-profile-main { flex-direction: column; text-align: center; }
    .player-cards { grid-template-columns: 1fr; }
    .game-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .game-card-right { width: 100%; justify-content: flex-end; }
    .header-top-row { flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; }
    .header-left { flex: 1; min-width: 0; }
    .header-right { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
    .form-row { flex-direction: column; }
    .form-group { min-width: 0; }
    .data-table { font-size: 13px; }
    .data-table thead th { padding: 8px 8px; font-size: 9px; }
    .data-table tbody td { padding: 8px; }
    .data-table .rank { width: 28px; font-size: 14px; }
    .data-table .player-cell { gap: 8px; }
    .data-table .player-cell .avatar { width: 30px !important; height: 30px !important; font-size: 11px !important; }
    .data-table .player-cell .player-name { font-size: 13px; white-space: nowrap; }
    .data-table .player-cell .player-meta { font-size: 10px; white-space: nowrap; }
    .data-table .stat-value { font-size: 13px; }
    /* Hide PPG column on small screens */
    .data-table th.hide-mobile, .data-table td.hide-mobile { display: none; }
}

@media (max-width: 480px) {
    .stat-cards { grid-template-columns: 1fr; }
    .podium-card { max-width: 100%; }
    .data-table thead th { padding: 6px 6px; font-size: 8px; letter-spacing: 0.05em; }
    .data-table tbody td { padding: 6px; font-size: 12px; }
    .data-table .rank { width: 24px; font-size: 12px; padding-right: 2px; }
    .data-table .stat-value { font-size: 12px; }
    .data-table .player-cell { gap: 6px; }
    .data-table .player-cell .avatar { width: 26px !important; height: 26px !important; font-size: 10px !important; }
    .data-table .player-cell .player-name { font-size: 12px; }
    .data-table .player-cell .player-meta { display: none; }
    /* Hide GP column on very small screens */
    .data-table th.hide-xs, .data-table td.hide-xs { display: none; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ===== Utilities ===== */
.text-accent { color: var(--accent); }
.text-goals { color: var(--goals-color); }
.text-assists { color: var(--assists-color); }
.text-purple { color: var(--accent-secondary); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Clickable table rows */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: rgba(255,255,255,0.03); }

/* Season switcher */
.season-switcher { display: flex; align-items: center; gap: 6px; }
.season-switcher select {
    background: var(--bg-card-solid); border: 1px solid var(--border); border-radius: 20px;
    color: var(--text-primary); padding: 5px 28px 5px 12px; font-size: 12px; font-weight: 700;
    font-family: inherit; cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%239a9aab' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.season-switcher select:focus { outline: none; border-color: var(--accent); }
