/* === CSS Variables === */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-subtle: rgba(99, 102, 241, 0.08);
    --success: #10b981;
    --success-subtle: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-subtle: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-subtle: rgba(245, 158, 11, 0.1);
    --info: #06b6d4;
    --info-subtle: rgba(6, 182, 212, 0.1);
    --bg: #0f172a;
    --bg-raised: #1e293b;
    --card-bg: #1e293b;
    --card-border: rgba(255, 255, 255, 0.06);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(255, 255, 255, 0.08);
    --input-bg: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.3);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
    background: var(--bg);
    background-image: radial-gradient(ellipse 120% 120vh at 50% -10%, rgba(99, 102, 241, 0.19) 0%, rgba(99, 102, 241, 0.07) 40%, rgba(99, 102, 241, 0.03) 65%, transparent 90%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* === Validation === */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--success); }
.invalid { outline: 1px solid var(--danger); }
.validation-message { color: var(--danger); font-size: 0.85rem; margin-top: 0.25rem; }

/* === App Layout === */
.app { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
.content { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; width: 100%; min-width: 0; }

/* === Navbar === */
.navbar {
    background: rgba(30, 41, 59, 0.85);
    border-bottom: none;
    color: var(--text);
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
}
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--info), var(--primary), transparent);
    opacity: 0.5;
}
.navbar-admin {
    border-top: 2px solid var(--warning);
}
.nav-brand a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-links a.nav-active { color: var(--text); background: rgba(255,255,255,0.1); border-bottom: 2px solid var(--primary); }
.nav-user { font-weight: 600; color: var(--text); font-size: 0.875rem; padding: 0 0.5rem; }
.nav-user-admin {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #000;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.badge-test {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 0.5rem;
    animation: pulse-test 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
@keyframes pulse-test {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
}
.btn-logout {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all var(--transition);
}
.btn-logout:hover { background: rgba(255,255,255,0.1); color: var(--text); }

/* === Admin Dropdown === */
.nav-admin-dropdown { position: relative; }
.nav-admin-toggle { background: none; border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; padding: 0.35rem 0.7rem; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); }
.nav-admin-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-admin-menu { position: absolute; top: calc(100% + 0.35rem); right: 0; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 0.35rem 0; min-width: 10rem; z-index: 200; display: flex; flex-direction: column; }
.nav-admin-menu a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; padding: 0.5rem 1rem; transition: all var(--transition); }
.nav-admin-menu a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-admin-menu a.nav-active { color: var(--text); background: rgba(255,255,255,0.1); }

/* === Hamburger (mobile) === */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

@media (max-width: 1024px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-raised);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 0.6rem 0.75rem; width: 100%; }
    .nav-admin-dropdown { width: 100%; }
    .nav-admin-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 1rem; min-width: auto; }
    .nav-admin-menu a { padding: 0.5rem 0.75rem; }
}

/* === Cards === */
.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: box-shadow var(--transition), border-color var(--transition);
    overflow: hidden;
    max-width: 100%;
    min-width: 0;
    position: relative;
}
.card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: var(--shadow), 0 0 20px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.card h3 {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* === Dashboard Grid === */
.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; }
@media (max-width: 768px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* Bundesliga Table Sidebar */
.bundesliga-sidebar { margin-top: 1.5rem; }
.bundesliga-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.bundesliga-table th { text-align: left; padding: 0.3rem 0.4rem; color: var(--text-muted); border-bottom: 1px solid var(--border); font-weight: 600; }
.bundesliga-table td { padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.bundesliga-table tr:last-child td { border-bottom: none; }
.bundesliga-table .table-pos { color: var(--text-dim); width: 1.5rem; text-align: center; }
.bundesliga-table .table-team { display: flex; align-items: center; gap: 0.4rem; }
.bundesliga-table .table-teamname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bundesliga-table .table-points { font-weight: 700; }
.bundesliga-table .table-goals { color: var(--text-dim); font-size: 0.75rem; }
.bundesliga-table .team-icon { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }

/* Team-Wappen vor Mannschaftsnamen (Spieltags-Tabelle) */
.team-cell { display: inline-flex; align-items: center; gap: 0.4rem; }
.team-cell .team-icon { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.team-icon-inline { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; margin-right: 0.35rem; }

/* Floating Action Button */
.table-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; animation: fab-glow 3s ease-in-out infinite; }
.table-fab:hover { transform: scale(1.1); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5); }
@keyframes fab-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5), 0 0 30px rgba(99, 102, 241, 0.15); }
}

/* Slide-in Panel */
.table-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1001; }
.table-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 85vw; background: var(--bg-raised); box-shadow: -4px 0 20px rgba(0,0,0,0.4); z-index: 1002; display: flex; flex-direction: column; animation: slideIn 0.2s ease-out; }
.table-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); color: var(--text); }
.table-panel-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); padding: 0.25rem 0.5rem; }
.table-panel-close:hover { color: var(--text); }
.table-panel-body { padding: 1rem 1.2rem; overflow-y: auto; flex: 1; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* === Headings === */
h1 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: var(--text);
}
/* FocusOnNavigate fokussiert die h1 nach Navigation/Reload – Fokusring unterdrücken */
h1:focus { outline: none; }
h2 {
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.5rem;
}

/* === Buttons === */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1.4;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { background: linear-gradient(135deg, #a5b4fc, var(--primary)); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.btn-warning { background: #f59e0b; color: #1a1a2e; font-weight: 600; }
.btn-warning:hover { background: #d97706; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-selected { background: var(--success) !important; color: white !important; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3) !important; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* === Forms === */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--input-bg);
    color: var(--text);
    transition: all var(--transition);
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.form-control::placeholder { color: var(--text-dim); }
.form-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 150px; margin-bottom: 0; }

/* === Auth Container === */
.auth-container { max-width: 420px; margin: 4rem auto; }
.auth-container .card { padding: 2rem; }
.auth-container h1 { margin-bottom: 1.5rem; text-align: center; }
.auth-link { margin-top: 1.25rem; text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.auth-link a { color: var(--primary-light); text-decoration: none; font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }

/* === Alerts === */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.alert-error { background: var(--danger-subtle); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.alert-success { background: var(--success-subtle); border-color: rgba(16,185,129,0.2); color: #6ee7b7; }
.alert-warning { background: var(--warning-subtle); border-color: rgba(245,158,11,0.2); color: #fcd34d; }

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.badge-success { background: var(--success-subtle); color: #6ee7b7; }
.badge-danger { background: var(--danger-subtle); color: #fca5a5; }
.badge-warning { background: var(--warning-subtle); color: #fcd34d; }
.badge-info { background: var(--info-subtle); color: #67e8f9; }
.badge-live { background: var(--danger-subtle); color: #fca5a5; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === Tables === */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); overflow-wrap: break-word; word-break: normal; }
.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: transparent;
}
.table tr { transition: background var(--transition); }
.table tr:hover { background: rgba(255,255,255,0.03); }
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable-th:hover { color: var(--text); }
.sort-icon { font-size: 0.65rem; margin-left: 0.25rem; vertical-align: middle; }
.sort-icon-neutral { opacity: 0.35; }
.row-eliminated { opacity: 0.5; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
    .table th, .table td { padding: 6px 8px; font-size: 0.78rem; }
    .table { table-layout: fixed; }
}

/* === Match List (Pick Form) === */
.match-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.match-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: background var(--transition);
}
.match-item:hover { background: rgba(255,255,255,0.05); }
.match-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.match-teams { font-weight: 500; }
.match-kickoff { color: var(--text-dim); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.match-picks { display: flex; gap: 0.5rem; }
.match-picks .btn { flex: 1; text-align: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* === Stats Bar === */
.stats-bar { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.search-wrapper {
    position: relative;
    max-width: 320px;
    margin-bottom: 1rem;
}
.search-wrapper .search-input {
    margin-bottom: 0;
    padding-right: 2.2rem;
}
.search-clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.search-clear-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.1);
}
.search-input {
    width: 100%;
    max-width: 320px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    background: var(--bg-raised);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
}
.search-input:focus { border-color: var(--primary); }
.stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    text-align: center;
    flex: 1;
    min-width: 0;
    box-shadow: var(--shadow);
}
.stat-value { display: block; font-size: 2rem; font-weight: 800; color: var(--primary-light); letter-spacing: -0.03em; }
.stat-label { font-size: 0.8rem; color: var(--text-dim); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.25rem; }

/* === Chips (Admin user picks) === */
.pick-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}
.chip-pending { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.chip-win { background: var(--success-subtle); color: #6ee7b7; }
.chip-draw { background: var(--warning-subtle); color: #fcd34d; }
.chip-loss { background: var(--danger-subtle); color: #fca5a5; }

/* === Result Input === */
.result-input { display: flex; align-items: center; gap: 4px; }
.result-input input { text-align: center; background: var(--input-bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; }

/* === Add Match === */
.add-match { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.add-match h4 { margin-bottom: 0.5rem; font-size: 0.95rem; }

/* === Evaluate Section === */
.evaluate-section { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.evaluate-section .alert { width: 100%; }

/* === Welcome Page === */
.welcome { text-align: center; padding: 6rem 1rem 4rem; }
.welcome h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}
.welcome h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.welcome p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.welcome-actions { display: flex; gap: 1rem; justify-content: center; }
.welcome-actions .btn { padding: 12px 28px; font-size: 1rem; }

/* === Current Pick === */
.current-pick {
    padding: 1rem 1.25rem;
    background: var(--success-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* === Status Info === */
.status-info p { margin-bottom: 0.5rem; font-size: 0.925rem; }
.status-info strong { color: var(--text); }

/* === Loading === */
.loading-progress { position: relative; display: block; width: 8rem; height: 8rem; margin: 20vh auto 1rem auto; }
.loading-progress circle { fill: none; stroke: var(--bg-raised); stroke-width: 0.6rem; transform-origin: 50% 50%; transform: rotate(-90deg); }
.loading-progress circle:last-child { stroke: var(--primary); stroke-dasharray: calc(3.14 * 80%); stroke-dashoffset: calc(3.14 * 80%); transition: stroke-dashoffset 0.3s; }
.loading-progress-text { text-align: center; font-weight: bold; color: var(--text-muted); }
.loading-progress-text:after { content: var(--blazor-load-percentage-text, "Loading"); }

#blazor-error-ui { background: var(--danger); color: white; padding: 0.5rem; text-align: center; display: none; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: 1rem; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === Selection === */
::selection { background: rgba(99, 102, 241, 0.3); color: var(--text); }

/* === Pick Status Lists (columns) === */
.pick-status-list { margin-top: 0.5rem; padding-left: 1.25rem; columns: 3; column-gap: 2rem; }

/* === Responsive: Tablet === */
@media (max-width: 768px) {
    .content { padding: 1.25rem 1rem; }
    .welcome { padding: 3rem 1rem 2rem; }
    .welcome h1 { font-size: 2rem; }
    .welcome p { font-size: 1rem; }
    .pick-status-list { columns: 2; }
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    .card { padding: 1.25rem; }
    .auth-container { margin: 1.5rem auto; }
    .stat-value { font-size: 1.5rem; }
    .stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
    .timeline-season { display: none; }
}

/* === Responsive: Small Phone === */
@media (max-width: 480px) {
    .content { padding: 1rem 0.75rem; }
    .welcome h1 { font-size: 1.5rem; }
    .welcome-actions { flex-direction: column; align-items: center; }
    .welcome-actions .btn { width: auto; min-width: 12rem; }
    .pick-status-list { columns: 1; }
    .card { padding: 1rem; margin-bottom: 1rem; }
    .form-row { gap: 0.5rem; }
    .form-row > .btn { width: 100%; }
    .btn-sm { padding: 8px 14px; }
    .match-picks { flex-direction: column; }
    .match-picks .btn { overflow: visible; white-space: normal; }
    .auth-container { margin: 1rem auto; }
    .auth-container .card { padding: 1.5rem; }
    .timeline-entry { padding: 0.85rem 0.9rem; border-radius: 10px; }
    .timeline-label { font-size: 0.95rem; }
    .timeline-eliminated { gap: 0.3rem 0.7rem; font-size: 0.8rem; }
    .timeline-team { font-size: 0.75rem; }
    .timeline-finale { font-size: 1.15rem; padding: 1rem; }
}

/* === Timeline === */
.timeline-container { display: flex; flex-direction: column; gap: 0.75rem; }
.timeline-entry { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.25rem; }

/* === Countdown === */
.countdown-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    animation: countdown-pulse 2s ease-in-out infinite;
}
.countdown-bar.countdown-warn {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.35);
}
.countdown-bar.countdown-urgent {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
}
.countdown-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}
.countdown-segments {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.countdown-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.8rem;
}
.countdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: var(--accent);
}
.countdown-warn .countdown-value { color: #f59e0b; }
.countdown-urgent .countdown-value { color: #ef4444; }
.countdown-unit {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 500;
}
.countdown-sep {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-muted);
    align-self: flex-start;
    line-height: 1.2;
    padding-top: 0.15rem;
}
@keyframes countdown-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.15); }
    50% { box-shadow: 0 0 12px 2px rgba(99, 102, 241, 0.25); }
}
.countdown-warn { animation-name: countdown-pulse-warn; }
@keyframes countdown-pulse-warn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.15); }
    50% { box-shadow: 0 0 12px 2px rgba(245, 158, 11, 0.3); }
}
.countdown-urgent { animation-name: countdown-pulse-urgent; }
@keyframes countdown-pulse-urgent {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.15); }
    50% { box-shadow: 0 0 14px 3px rgba(239, 68, 68, 0.35); }
}

/* === Game Ended Banner === */
.game-ended-banner {
    text-align: center;
    padding: 1.2rem;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-bottom: 1rem;
}
.game-ended-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.game-ended-winner {
    font-size: 1.1rem;
}

.timeline-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.2rem 0.5rem; }
.timeline-label { font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; }
.timeline-label-start { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.timeline-count { font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.timeline-count strong { color: var(--text); font-size: 1rem; font-weight: 700; }
.timeline-eliminated-count { color: var(--danger); font-weight: 700; margin-left: 0.3rem; font-size: 0.9rem; }
.timeline-bar-track { background: rgba(255,255,255,0.06); border-radius: 8px; height: 10px; overflow: hidden; margin-bottom: 0.1rem; }
.timeline-bar { height: 100%; border-radius: 8px; transition: width 0.6s ease; min-width: 2%; }
.timeline-eliminated { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.82rem; line-height: 1.5; }
.timeline-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.6rem; }
.timeline-group-header { font-weight: 600; margin-right: 0.2rem; }
.timeline-player { color: var(--text); white-space: normal; font-weight: 500; }
.timeline-team { color: var(--text-muted); font-size: 0.82rem; font-weight: 400; margin-left: 0.15rem; }
.timeline-match-result { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; opacity: 0.7; margin-left: 0.25rem; }
.timeline-no-elim { color: var(--text-muted); font-style: italic; font-size: 0.82rem; }
.timeline-finale { text-align: center; font-size: 1.4rem; font-weight: 800; padding: 1.25rem; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; letter-spacing: 0.02em; }
.timeline-season { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; margin-left: 0.4rem; }

/* === Announcements === */
.announcement-banner { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 10px; padding: 0.75rem 1rem; margin-bottom: 0.75rem; overflow: hidden; }
.announcement-content { font-size: 0.9rem; line-height: 1.6; white-space: pre-line; word-break: break-word; }
.announcement-icon { font-size: 1.1rem; margin-right: 0.5rem; }
.announcement-read-btn { float: right; margin-left: 0.75rem; margin-bottom: 0.25rem; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: var(--text); cursor: pointer; font-size: 0.82rem; padding: 0.35rem 0.75rem; line-height: 1.4; border-radius: 6px; white-space: nowrap; transition: all 0.2s ease; font-weight: 500; }
.announcement-read-btn:hover { color: #fff; border-color: var(--accent); background: var(--accent); }
.announcement-fading { opacity: 0.4; transform: scale(0.98); transition: opacity 0.4s ease, transform 0.4s ease; }
.announcement-admin-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.announcement-admin-item:last-child { border-bottom: none; }
.announcement-dismissed { opacity: 0.6; background: rgba(255,255,255,0.03); border-color: var(--border); }
.announcement-archive-toggle { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.82rem; padding: 0.25rem 0; margin-bottom: 0.4rem; }
.announcement-archive-toggle:hover { color: var(--text); }

/* Avatars */
.avatar { border-radius: 50%; vertical-align: middle; flex-shrink: 0; }
.nav-user .avatar { margin-right: 0.25rem; }
.pick-status-list .avatar { margin-right: 0.2rem; }
