:root {
    /* FIFA WM 2026 Deep Blue Palette */
    --bg-main: #0e1436;             /* Tiefes Nachtblau */
    --bg-card: rgba(42, 57, 141, 0.12); 
    --bg-sidebar: #151b4d;          /* Noch dunkleres, satteres Blau für die Sidebar */

    --color-primary: #3CAC3B;       /* FIFA Grün */
    --color-primary-light: #52c851;
    --color-primary-glow: rgba(60, 172, 59, 0.3);

    --text-bright: #D1D4D1;         /* FIFA Silber */
    --text-muted: #848ca3;          /* Etwas bläulicher für den Kontext */
    --border-glass: rgba(255, 255, 255, 0.1);

    --accent-green: #3CAC3B;
    --accent-blue: #2A398D;
    --accent-red:  #E61D25;

    --status-100: #3CAC3B;
    --status-50:  #2A398D;
    --status-0:   #E61D25;

    --border-radius: 12px;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'Roboto Mono', monospace;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at 10% 10%, rgba(42, 57, 141, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(60, 172, 59, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-bright);
    overflow-x: hidden;
    font-size: 16px;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
#sidebar {
    width: 250px; height: 100%;
    position: fixed; top: 0; left: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    display: flex; flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.4);
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
}
body.sidebar-collapsed #sidebar { width: 72px; }
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .sidebar-brand-sub { display: none; }
body.sidebar-collapsed #logo-container { justify-content: center !important; padding: 20px 0 !important; }
body.sidebar-collapsed #sidebar nav ul li a { justify-content: center; }
body.sidebar-collapsed #sidebar nav ul li a i { margin-right: 0; font-size: 1.2rem; }

#sidebar nav { flex-grow: 1; padding: 1rem 0.75rem; overflow-y: auto; }
#sidebar nav ul { list-style: none; }
#sidebar nav ul li { margin-bottom: 3px; }
#sidebar nav ul li a {
    color: var(--text-bright); text-decoration: none;
    display: flex; align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.88rem; white-space: nowrap; overflow: hidden;
}
.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.75rem 1rem;
    list-style: none;
}
.btn-edit-result {
    background: rgba(60, 172, 59, 0.15);
    border: 1px solid rgba(60, 172, 59, 0.4);
    color: var(--accent-green);
    border-radius: 6px;
    padding: 3px 7px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
    line-height: 1;
}
.btn-edit-result:hover {
    background: rgba(60, 172, 59, 0.35);
    border-color: var(--accent-green);
    transform: scale(1.1);
}
#sidebar nav ul li a i { margin-right: 13px; width: 20px; text-align: center; font-size: 1rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
#sidebar nav ul li a:hover,
#sidebar nav ul li a.active {
    background: rgba(60, 172, 59, 0.15);
    color: #fff;
    box-shadow: inset 4px 0 0 var(--color-primary);
}
#sidebar nav ul li a:hover i,
#sidebar nav ul li a.active i { color: var(--color-primary-light); }

/* ── MAIN CONTENT ────────────────────────────────────────── */
#main-content {
    margin-left: 250px; padding: 2rem;
    min-height: 100vh;
    display: flex; flex-direction: column;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
}
body.sidebar-collapsed #main-content { margin-left: 72px; }

/* ── CARDS / PANELS ──────────────────────────────────────── */
.card, .panel {
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    transition: box-shadow 0.3s;
}
.card { padding: 1.5rem; margin-bottom: 1.5rem; }
.card::before, .panel::before {
    content: ""; position: absolute; inset: 0;
    border-radius: var(--border-radius); padding: 1px;
    background: linear-gradient(135deg, var(--border-glass) 0%, rgba(26,140,52,0.04) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none; z-index: 5;
}
.card:hover { border-color: var(--color-primary); box-shadow: 0 8px 32px rgba(60, 172, 59, 0.15); }

.panel__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid var(--border-glass);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.panel__header h2, .panel__header h3 { font-size: 1rem; font-weight: 400; letter-spacing: 0.5px; color: #fff; }
.panel__body { padding: 1.5rem; }

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
h1 { font-size: 1.4rem; font-weight: 300; letter-spacing: 1.5px; }
h2 { font-size: 1.1rem; font-weight: 400; }
h3 { font-size: 1rem; font-weight: 400; }
.header-accent { color: var(--accent-green); font-weight: 700; }
header { margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-glass); padding-bottom: 1rem; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    font-family: var(--font-body); font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.8px; text-transform: uppercase;
    border: none; border-radius: 6px;
    height: 36px; padding: 0 1.2rem;
    cursor: pointer; transition: all 0.25s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    color: #fff; text-decoration: none;
}
.btn-primary   { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-light); box-shadow: 0 0 18px var(--color-primary-glow); transform: translateY(-1px); }
.btn-gold      { background: var(--accent-blue); color: #fff; }
.btn-gold:hover { background: #3a4cbc; box-shadow: 0 0 18px rgba(42, 57, 141, 0.4); transform: translateY(-1px); }
.btn-danger    { background: var(--accent-red); }
.btn-danger:hover { background: #ff333a; box-shadow: 0 0 18px rgba(230, 29, 37, 0.4); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border-glass); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--color-primary); color: #fff; }
.btn-sm { height: 28px; font-size: 0.7rem; padding: 0 0.8rem; }

/* ── FORMS ───────────────────────────────────────────────── */
input, select, textarea {
    width: 100%; background: rgba(0,0,0,0.35);
    border: 1px solid var(--border-glass);
    border-radius: 6px; padding: 0.6rem 0.9rem;
    color: #fff; font-family: var(--font-body); font-size: 0.9rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(26,140,52,0.25);
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group { margin-bottom: 1rem; }

/* ── TABLES ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th { color: var(--text-muted); font-weight: 400; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.8px; padding: 10px 14px; border-bottom: 1px solid var(--border-glass); text-align: left; }
tbody td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(26,140,52,0.06); }

/* ── LEADERBOARD ─────────────────────────────────────────── */
.rank-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    font-weight: 700; font-size: 0.9rem;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}
.rank-badge.gold   { background: linear-gradient(135deg, #f0b429, #e09a1a); color: #111; box-shadow: 0 0 14px rgba(240,180,41,0.5); }
.rank-badge.silver { background: linear-gradient(135deg, #c0c0c0, #a0a0a0); color: #111; box-shadow: 0 0 10px rgba(192,192,192,0.4); }
.rank-badge.bronze { background: linear-gradient(135deg, #cd7f32, #a0611e); color: #fff; box-shadow: 0 0 10px rgba(205,127,50,0.4); }

.pts-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 28px; border-radius: 6px;
    font-weight: 700; font-family: var(--font-mono); font-size: 1rem;
    background: rgba(26,140,52,0.2); color: var(--color-primary-light);
    border: 1px solid rgba(26,140,52,0.3);
}

/* ── MATCH CARDS ─────────────────────────────────────────── */
.match-card {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-glass);
    border-radius: 10px; padding: 1rem 1.2rem;
    margin-bottom: 0.75rem; transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 1rem;
}
.match-card:hover { border-color: rgba(26,140,52,0.5); background: rgba(26,140,52,0.06); }
.match-card.locked { opacity: 0.65; }
.match-card .team { font-size: 0.83rem; font-weight: 400; }
.match-card .team.home { text-align: right; }
.match-card .score-block { display: flex; align-items: center; gap: 6px; justify-content: center; }
.match-card .score-input {
    width: 48px; height: 48px; text-align: center; font-size: 1.3rem;
    font-weight: 700; padding: 0; font-family: var(--font-mono);
    border-radius: 8px; border: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.4);
}
.match-card .score-sep { font-size: 1.5rem; color: var(--text-muted); font-weight: 300; }
.match-card .result-display {
    display: flex; align-items: center; gap: 6px; justify-content: center;
    font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700;
    color: var(--accent-green);
}

/* Punkte-Anzeige auf Tipp */
.tip-points {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.tip-points.pts-3 { background: rgba(60, 172, 59, 0.2); color: #52c851; border: 1px solid rgba(60, 172, 59, 0.3); }
.tip-points.pts-1 { background: rgba(42, 57, 141, 0.2); color: #4a5dbd; border: 1px solid rgba(42, 57, 141, 0.3); }
.tip-points.pts-0 { background: rgba(230, 29, 37, 0.15); color: #ff4d4d; border: 1px solid rgba(230, 29, 37, 0.25); }
.tip-points.pending { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border-glass); }

/* ── PHASE TABS ──────────────────────────────────────────── */
.phase-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.5rem; }
.phase-tab {
    padding: 6px 16px; border-radius: 20px; font-size: 0.78rem;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-glass);
    color: var(--text-muted); cursor: pointer; transition: all 0.2s;
    text-decoration: none; display: inline-block;
}
.phase-tab:hover  { border-color: var(--color-primary); color: #fff; }
.phase-tab.active { background: rgba(26,140,52,0.2); border-color: var(--color-primary); color: #fff; }

/* ── STATS ROW ───────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-box {
    background: rgba(0,0,0,0.3); border: 1px solid var(--border-glass);
    border-radius: 10px; padding: 1rem 1.2rem; text-align: center;
}
.stat-box .stat-val { font-size: 2rem; font-weight: 700; color: var(--accent-green); font-family: var(--font-mono); line-height: 1; }
.stat-box .stat-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px; }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert { padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.88rem; margin-bottom: 1rem; }
.alert-success { background: rgba(39,174,96,0.15); border: 1px solid rgba(39,174,96,0.3); color: #2ecc71; }
.alert-error   { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); color: #e74c3c; }
.alert-info    { background: rgba(26,140,52,0.12); border: 1px solid var(--border-glass); color: var(--text-muted); }

/* ── MODAL ───────────────────────────────────────────────── */
.modal { display:none; position:fixed; inset:0; z-index:2000; background:rgba(0,0,0,0.75); backdrop-filter:blur(8px); }
.modal-content {
    background: var(--bg-card); margin: 8% auto; border-radius: var(--border-radius);
    width: 90%; max-width: 500px; border: 1px solid var(--border-glass);
    box-shadow: 0 20px 60px rgba(0,0,0,0.7); overflow: hidden;
    animation: slideIn 0.25s ease;
}
@keyframes slideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border-glass); background: rgba(0,0,0,0.2); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { font-size: 1.1rem; font-weight: 400; }
.close-modal { cursor: pointer; font-size: 1.4rem; color: var(--text-muted); transition: color 0.2s; }
.close-modal:hover { color: #fff; }
.modal-body { padding: 1.5rem; }

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes pulse-gold {
    0%   { box-shadow: 0 0 0 0 var(--accent-gold-glow); }
    70%  { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.pulse-gold { animation: pulse-gold 2s infinite; }

/* ── MISC ────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border-glass); margin: 1rem 0; }
.text-muted { color: var(--text-muted); }
.text-gold  { color: var(--accent-green); }
.text-green { color: var(--color-primary-light); }
.mono { font-family: var(--font-mono); }
.flag { font-size: 1.4rem; line-height: 1; }
.section-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-bottom: 0.75rem; }
