:root {
    --bg: #0f172a;
    --panel: #111827;
    --accent: #fbbf24;
    --accent-2: #22d3ee;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --danger: #f87171;
    --success: #34d399;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 10px 40px rgba(0,0,0,0.35);
    font-family: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: radial-gradient(120% 120% at 20% 10%, rgba(34,211,238,0.25), transparent 55%), radial-gradient(90% 80% at 90% 10%, rgba(251,191,36,0.18), transparent 60%), var(--bg);
    color: var(--text);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand-name { font-weight: 700; letter-spacing: 0.5px; }
.brand-sub { color: var(--muted); font-size: 12px; }
.logo {
    height: 54px;
    width: auto;
    aspect-ratio: 1;
    object-fit: contain;
    background: transparent;
    border-radius: 6px;
    box-shadow: none;
}
.nav-links { display: flex; gap: 14px; align-items: center; }
.nav-links a { color: var(--text); font-weight: 600; }
.nav-links .pill { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #0f172a; padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow); }

.container { max-width: 1100px; margin: 32px auto 80px; padding: 0 18px; }

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

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

.title { font-size: 24px; margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 10px; background: rgba(255,255,255,0.07); color: var(--text); font-weight: 600; }
.tag.success { background: rgba(52,211,153,0.15); color: #bbf7d0; }
.tag.danger { background: rgba(248,113,113,0.15); color: #fecdd3; }
.tag.info { background: rgba(34,211,238,0.15); color: #a5f3fc; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}
.btn.primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #0f172a; border: none; }
.btn.danger { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th, .table td { padding: 10px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table tr:hover td { background: rgba(255,255,255,0.02); }

.podium-1 td { background: linear-gradient(90deg, rgba(251,191,36,0.22), rgba(251,191,36,0.08)); }
.podium-2 td { background: linear-gradient(90deg, rgba(226,232,240,0.22), rgba(226,232,240,0.08)); }
.podium-3 td { background: linear-gradient(90deg, rgba(244,164,96,0.22), rgba(244,164,96,0.08)); }

form label { display: block; margin: 12px 0 6px; font-weight: 600; }
form input, form textarea, form select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
}
form textarea { min-height: 100px; }

.flash { margin-bottom: 18px; display: grid; gap: 10px; }
.flash-item { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); }
.flash-item.success { border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.12); }
.flash-item.error { border-color: rgba(248,113,113,0.5); background: rgba(248,113,113,0.12); }

.footer {
    border-top: 1px solid var(--border);
    padding: 18px 28px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    background: rgba(15,23,42,0.7);
}

.pairings { margin-top: 18px; }
.pairings h3 { margin-bottom: 6px; }
.pairings .match {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.02);
}
.badge { padding: 4px 8px; border-radius: 8px; font-size: 12px; }
.badge.win { background: rgba(52,211,153,0.2); color: #bbf7d0; }
.badge.loss { background: rgba(248,113,113,0.2); color: #fecdd3; }
.badge.draw { background: rgba(96,165,250,0.2); color: #dbeafe; }
.text-win { color: #22c55e !important; font-weight: 800; }
.text-loss { color: #f43f5e !important; font-weight: 800; }
.text-draw { color: #9ca3af !important; font-weight: 700; }

@media (max-width: 720px) {
    .navbar { flex-direction: column; gap: 8px; align-items: flex-start; }
    .nav-links { flex-wrap: wrap; gap: 8px; }
    .pairings .match { flex-direction: column; gap: 4px; }
}
