/* 
========================================================================
   ARENAFLOW GLOBAL DESIGN SYSTEM & STYLESHEET
   Curated Palette, Glassmorphism, Rankings & Multi-Theme
========================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- Theme Variables --- */
:root {
    /* Dark Theme (Default: Schwarz-Grün Cyber Emerald) */
    --bg-primary: #050806;
    --bg-secondary: #0a110d;
    --bg-card: rgba(14, 24, 18, 0.75);
    --bg-card-hover: rgba(22, 38, 28, 0.9);
    --border-color: rgba(34, 197, 94, 0.2);
    --border-hover: rgba(74, 222, 128, 0.6);
    
    --text-primary: #f0fdf4;
    --text-secondary: #86efac;
    --text-muted: #4ade80;
    
    /* Neon Green & Emerald Accent Colors */
    --accent-purple: #22c55e;
    --accent-purple-glow: rgba(34, 197, 94, 0.35);
    --accent-cyan: #10b981;
    --accent-cyan-glow: rgba(16, 185, 129, 0.3);
    --accent-emerald: #4ade80;
    --accent-emerald-glow: rgba(74, 222, 128, 0.35);
    --accent-rose: #ef4444;
    --accent-rose-glow: rgba(239, 68, 68, 0.25);
    --accent-amber: #84cc16;
    
    /* Gradients */
    --grad-hero: linear-gradient(135deg, #052e16 0%, #064e3b 50%, #022c22 100%);
    --grad-accent: linear-gradient(135deg, #10b981 0%, #22c55e 50%, #4ade80 100%);
    --grad-success: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    --grad-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    
    /* UI System Tokens */
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.7);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.8), 0 8px 16px -6px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.9);
    --shadow-glow: 0 0 25px rgba(34, 197, 94, 0.3);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme overrides (Schwarz-Grün Light Emerald) */
[data-theme="light"] {
    --bg-primary: #f0fdf4;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(220, 252, 231, 0.9);
    --border-color: rgba(22, 163, 74, 0.2);
    --border-hover: rgba(22, 163, 74, 0.6);
    
    --text-primary: #052e16;
    --text-secondary: #166534;
    --text-muted: #15803d;
    
    --accent-purple: #16a34a;
    --accent-purple-glow: rgba(22, 163, 74, 0.2);
    --accent-cyan: #059669;
    --accent-cyan-glow: rgba(5, 150, 105, 0.2);
    --accent-emerald: #15803d;
    --accent-emerald-glow: rgba(21, 128, 61, 0.2);
    --accent-rose: #dc2626;
    --accent-rose-glow: rgba(220, 38, 38, 0.2);
    
    --grad-hero: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    --grad-accent: linear-gradient(135deg, #16a34a 0%, #059669 100%);
    
    --shadow-sm: 0 2px 8px -2px rgba(5, 46, 22, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(5, 46, 22, 0.08), 0 8px 16px -6px rgba(5, 46, 22, 0.04);
    --shadow-lg: 0 20px 40px -15px rgba(5, 46, 22, 0.12);
    --shadow-glow: 0 0 20px rgba(22, 163, 74, 0.15);
}

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, .arenaflow-wrapper {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
    outline: none;
}

/* --- Utilities --- */
.hidden {
    display: none !important;
}

.font-bold {
    font-weight: 700;
}

.text-large {
    font-size: 1.15rem;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* --- Header Layout --- */
.app-header {
    background: rgba(7, 10, 19, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-normal);
}

[data-theme="light"] .app-header {
    background: rgba(255, 255, 255, 0.4);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--grad-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: var(--shadow-glow);
    transition: transform var(--transition-normal);
}

.brand:hover .brand-icon {
    transform: rotate(10deg) scale(1.08);
}

.brand-title {
    font-size: 1.4rem;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.theme-btn, .nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.55rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.theme-btn:hover, .nav-btn:hover {
    border-color: var(--accent-purple);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.nav-btn {
    padding: 0.55rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    gap: 0.4rem;
}

#import-file-input {
    display: none;
}

.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Reusable Components --- */

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
}

.btn-primary {
    background: var(--grad-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45), var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
}

.btn-icon {
    background: transparent;
    border: 1px solid transparent;
    padding: 0.4rem;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.btn-icon.delete-btn:hover {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.2);
}

/* Form Fields */
.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select {
    background: rgba(7, 10, 19, 0.4);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    width: 100%;
}

[data-theme="light"] .form-input, [data-theme="light"] .form-select {
    background: rgba(241, 245, 249, 0.8);
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-glow);
    background: rgba(7, 10, 19, 0.6);
}

[data-theme="light"] .form-input:focus, [data-theme="light"] .form-select:focus {
    background: #ffffff;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-purple { background: rgba(34, 197, 94, 0.12); color: var(--accent-purple); border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-cyan { background: rgba(16, 185, 129, 0.12); color: var(--accent-cyan); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-emerald { background: rgba(74, 222, 128, 0.12); color: var(--accent-emerald); border: 1px solid rgba(74, 222, 128, 0.2); }
.badge-rose { background: rgba(239, 68, 68, 0.12); color: var(--accent-rose); border: 1px solid rgba(239, 68, 68, 0.2); }

/* --- Stats Cards --- */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.18);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: var(--accent-cyan);
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(132, 204, 22, 0.08);
    border: 1px solid rgba(132, 204, 22, 0.18);
    color: var(--accent-amber);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- Left Column Workspace Layout --- */
.team-list-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(7, 10, 19, 0.2);
    overflow-y: auto;
    padding: 0.5rem;
}

[data-theme="light"] .team-list-container {
    background: rgba(15, 23, 42, 0.02);
}

.participant-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    transition: all var(--transition-fast);
}

[data-theme="light"] .participant-list-item {
    background: rgba(15, 23, 42, 0.02);
}

.participant-list-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.p-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.p-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.p-item-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.p-item-score-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    min-width: 42px;
    text-align: center;
    margin-right: 0.4rem;
}

/* --- Right Column Workspace Layout (Rankings Hub) --- */

/* Tabs Swapper */
.t-tab-nav {
    display: flex;
    background: rgba(7, 10, 19, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.3rem;
    border-radius: var(--radius-md);
}

[data-theme="light"] .t-tab-nav {
    background: rgba(15, 23, 42, 0.04);
}

.t-tab-btn {
    background: transparent;
    border: none;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.t-tab-btn svg {
    width: 16px;
    height: 16px;
}

.t-tab-btn.active {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.t-tab-btn:not(.active):hover {
    color: var(--text-primary);
}

/* Sub-Tab Classes navigation */
.class-sub-tab-nav {
    display: flex;
    gap: 0.4rem;
}

.class-sub-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex: 1;
    text-align: center;
}

[data-theme="light"] .class-sub-btn {
    background: rgba(15, 23, 42, 0.03);
}

.class-sub-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.class-sub-btn.active {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
    box-shadow: 0 3px 10px var(--accent-purple-glow);
}

/* Individual Table Styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

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

.league-table th {
    padding: 0.85rem 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.league-table td {
    padding: 0.9rem 0.75rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .league-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.02);
}

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

.podium-row {
    background: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] .podium-row {
    background: rgba(15, 23, 42, 0.015);
}

.podium-row:hover {
    background: rgba(34, 197, 94, 0.04) !important;
}

.cell-rank {
    width: 50px;
    font-weight: 700;
    text-align: center;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

[data-theme="light"] .rank-pill {
    background: rgba(15, 23, 42, 0.05);
}

.rank-badge {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cell-team {
    font-weight: 600;
}

.cell-club {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cell-num {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
}

.cell-num.highlight {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* --- Club standings (Vereinswertung) Cards --- */
.club-standings-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.club-standing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.club-standing-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.club-card-summary {
    padding: 1.15rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.club-card-summary:hover {
    background: var(--bg-card-hover);
}

.club-card-summary::after {
    content: '▼';
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
}

.club-card-summary.expanded::after {
    transform: translateY(-50%) rotate(180deg);
}

.club-card-title-block {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-right: 2rem;
}

.club-rank-icon {
    font-size: 1.4rem;
    font-weight: 800;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-rank-icon.gold-medal-rank { text-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.club-rank-icon.silver-medal-rank { text-shadow: 0 0 8px rgba(148, 163, 184, 0.4); }
.club-rank-icon.bronze-medal-rank { text-shadow: 0 0 8px rgba(217, 119, 6, 0.4); }

.club-name-heading {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.club-meta-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    margin-top: 0.15rem;
}

.club-card-score-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 1.5rem;
}

.club-total-sum {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    color: var(--accent-cyan);
}

.club-card-details {
    max-height: 800px;
    opacity: 1;
    overflow: hidden;
    transition: max-height var(--transition-normal) ease, opacity var(--transition-fast) ease, padding var(--transition-fast) ease;
    padding: 0 1.4rem 1.25rem 1.4rem;
    background: rgba(7, 10, 19, 0.15);
}

[data-theme="light"] .club-card-details {
    background: rgba(241, 245, 249, 0.3);
}

.club-card-details.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
}

.details-divider {
    border-top: 1px solid var(--border-color);
    margin-bottom: 0.85rem;
}

.details-section-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.members-lists-box {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.club-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

[data-theme="light"] .club-member-item {
    background: rgba(15, 23, 42, 0.015);
}

.club-member-item.contributing {
    border-left: 3px solid var(--accent-cyan);
}

.club-member-item.faded {
    opacity: 0.45;
}

.member-name-tag {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.member-index {
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.08);
    color: var(--accent-cyan);
    border-radius: 4px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-mini {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.08rem 0.3rem;
    border-radius: 4px;
    color: var(--text-secondary);
}

[data-theme="light"] .badge-mini {
    background: rgba(15, 23, 42, 0.05);
}

.member-score {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
}

/* --- Footer --- */
.app-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    text-align: center;
    background: rgba(7, 10, 19, 0.2);
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* --- Floating notification toast --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(13, 18, 34, 0.92);
    border: 1px solid var(--accent-purple);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    padding: 0.75rem 1.4rem;
    border-radius: 9999px;
    color: var(--text-primary);
    font-weight: 600;
    opacity: 0;
    transition: all var(--transition-normal);
}

[data-theme="light"] .toast-container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

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

.toast-icon {
    color: var(--accent-purple);
    display: flex;
    align-items: center;
}

/* --- Responsive Layout adjustments --- */
@media (max-width: 900px) {
    .app-header {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .header-controls {
        justify-content: space-between;
    }
    .main-content {
        padding: 1.25rem 1rem;
    }
    .league-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- Ergebniskette in der Einzelwertungstabelle --- */
.scores-list-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.score-badge-main {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan, #10b981));
    color: #ffffff;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.95rem;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.score-badge-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-theme="light"] .score-badge-secondary {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.03);
}

.score-separator {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.5;
    user-select: none;
}

/* ========================================================================
   LIVE-MONITOR (2. BILDSCHIRM / PRÄSENTATIONS-MODUS) STYLES
   ======================================================================== */
.live-body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 18px;
    transition: background-color var(--transition-slow), color var(--transition-normal);
}

.live-header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.live-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-rose);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.live-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-rose);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-rose);
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.live-clock-badge {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-md);
    letter-spacing: 0.05em;
}

.live-controls-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.live-mode-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.live-mode-btn.active {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple-glow);
}

.live-carousel-progress {
    height: 4px;
    background: var(--grad-accent);
    width: 0%;
    transition: width 0.1s linear;
}

/* Large display tables for live monitor */
.live-table {
    font-size: 1.1rem;
}

.live-table th {
    font-size: 0.9rem;
    padding: 1.1rem 1rem;
}

.live-table td {
    padding: 1.1rem 1rem;
}

.live-score-highlight {
    font-size: 1.4rem;
    color: var(--accent-cyan);
}

.live-update-flash {
    animation: flashRow 1s ease-out;
}

@keyframes flashRow {
    0% { background-color: rgba(34, 197, 94, 0.3); }
    100% { background-color: transparent; }
}

/* Multi-Grid "Alle Tabellen auf 1 Blick" Styles */
.live-grid-all {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.live-card-compact {
    padding: 1.2rem !important;
}

.live-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
}

.live-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-table-compact {
    font-size: 0.95rem;
}

.live-table-compact th {
    padding: 0.6rem 0.5rem;
    font-size: 0.75rem;
}

.live-table-compact td {
    padding: 0.65rem 0.5rem;
    font-size: 0.9rem;
}
