:root{
    --st-red:#c1121f;
    --st-red-dark:#7f0d16;
    --st-white:#ffffff;
    --st-soft:#fff5f5;
    --st-border:#f1d4d7;
    --st-ink:#1f2937;
    --st-muted:#6b7280;
    --st-gold:#f59e0b;
    --st-green:#15803d;
    --shadow:0 14px 40px rgba(127,13,22,.12);
}
*{box-sizing:border-box}
body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:linear-gradient(180deg,#fff 0%,#fff5f5 42%,#ffffff 100%);
    color:var(--st-ink);
    line-height:1.5;
}
body.dark{
    --st-white:#111827;
    --st-soft:#1f2937;
    --st-border:#374151;
    --st-ink:#f9fafb;
    --st-muted:#d1d5db;
    background:linear-gradient(180deg,#111827 0%,#1f2937 45%,#111827 100%);
    color:var(--st-ink);
}
a{color:inherit}
header{background:var(--st-red);color:white;padding:20px}
.hero{
    position:relative;
    overflow:hidden;
    color:white;
    padding-bottom:54px;
    background:
        radial-gradient(circle at 12% 18%,rgba(255,255,255,.24),transparent 25%),
        linear-gradient(135deg,var(--st-red-dark),var(--st-red) 55%,#e11d2e);
}
.hero:after{
    content:"";
    position:absolute;
    inset:auto -10% -70px -10%;
    height:150px;
    background:var(--st-white);
    transform:rotate(-2deg);
}
.topnav{
    position:relative;
    z-index:2;
    max-width:1200px;
    margin:auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:14px;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:.2px}
.brand-mark{
    width:34px;
    height:34px;
    border-radius:50%;
    background:linear-gradient(180deg,#fff 0 50%,var(--st-red) 50% 100%);
    border:2px solid rgba(255,255,255,.8);
    box-shadow:0 4px 14px rgba(0,0,0,.16);
}
.nav-links{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.topnav a,
.nav-toggle,
.theme-toggle{
    color:white;
    text-decoration:none;
    font-weight:bold;
    padding:9px 12px;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.18);
    cursor:pointer;
}
.nav-toggle{display:none}
.topnav a:hover,.topnav a.active,.theme-toggle:hover,.nav-toggle:hover{background:white;color:var(--st-red-dark)}
.hero-content{
    position:relative;
    z-index:2;
    max-width:1100px;
    margin:auto;
    padding:48px 24px 24px;
}
.hero-content h1{font-size:clamp(38px,6vw,68px);line-height:1;margin:10px 0 14px}
.hero-content p{max-width:760px;font-size:18px;opacity:.96}
.eyebrow{
    display:inline-flex;
    align-items:center;
    gap:8px;
    background:rgba(255,255,255,.16);
    border:1px solid rgba(255,255,255,.24);
    border-radius:999px;
    padding:8px 12px;
    margin:0;
    font-weight:bold;
    letter-spacing:.8px;
    text-transform:uppercase;
    font-size:13px;
}
.hero-actions{margin-top:24px;display:flex;gap:12px;flex-wrap:wrap}
.btn{
    display:inline-block;
    background:white;
    color:var(--st-red-dark);
    padding:13px 19px;
    border-radius:12px;
    text-decoration:none;
    font-weight:900;
    box-shadow:0 10px 24px rgba(0,0,0,.14);
}
.btn.secondary{background:rgba(255,255,255,.14);color:white;border:1px solid rgba(255,255,255,.32)}
main{position:relative;z-index:3;padding:24px;max-width:1200px;margin:auto}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px}
.card{
    background:var(--st-white);
    padding:22px;
    border-radius:18px;
    margin-bottom:20px;
    box-shadow:var(--shadow);
    border:1px solid var(--st-border);
}
.card h2{margin-top:0;color:var(--st-red-dark)}
body.dark .card h2{color:#fecaca}
.highlight{border-top:5px solid var(--st-red)}
.highlight.champion{background:linear-gradient(135deg,var(--st-white),#fff4d6);border-color:#f8d66d}
body.dark .highlight.champion{background:linear-gradient(135deg,#1f2937,#3b2f14)}
.meta-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.pill{display:inline-flex;align-items:center;gap:6px;background:var(--st-soft);color:var(--st-red-dark);border:1px solid var(--st-border);border-radius:999px;padding:7px 10px;font-size:13px;font-weight:bold}
body.dark .pill{color:#fecaca}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.section-head p{color:var(--st-muted);margin-top:4px}
.badge{padding:8px 12px;border-radius:999px;background:#f3f4f6;font-weight:bold;border:1px solid #e5e7eb;color:#111827}
.badge.ok{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.badge.error{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.badge.warn{background:#fef3c7;color:#92400e;border-color:#fde68a}
.table-wrap{overflow-x:auto;border-radius:14px;border:1px solid var(--st-border)}
table{width:100%;border-collapse:collapse;background:var(--st-white);margin-bottom:0;overflow:hidden}
th,td{padding:14px;border-bottom:1px solid var(--st-border);text-align:left}
th{background:var(--st-red);color:white;white-space:nowrap}
tr:last-child td{border-bottom:0}
.table-top{background:#fff7ed;font-weight:bold}
.table-relegation{background:#fff1f2}
body.dark .table-top{background:#3b2f14}
body.dark .table-relegation{background:#3f1d25}
.results-list,.next-list{display:flex;flex-direction:column;gap:12px}
.match-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:var(--st-soft);
    padding:14px;
    border-radius:14px;
    border:1px solid var(--st-border);
    gap:10px;
}
.match-score{font-size:22px;font-weight:900;color:var(--st-red-dark)}
body.dark .match-score{color:#fecaca}
.text-link{text-decoration:none;color:var(--st-red);font-weight:bold}
footer{text-align:center;padding:34px;color:var(--st-muted)}
.login-box{max-width:420px;background:var(--st-white);margin-top:80px}
.error{color:#b91c1c;font-weight:bold}
.match-form{display:grid;grid-template-columns:1fr 70px 20px 70px 1fr 100px;gap:8px;align-items:center;background:var(--st-white);padding:10px;margin-bottom:8px;border-radius:12px;border:1px solid var(--st-border)}
@media(max-width:768px){
    .topnav{align-items:flex-start}
    .nav-toggle{display:inline-flex;margin-left:auto}
    .nav-links{display:none;width:100%;flex-direction:column;align-items:stretch}
    .nav-links.open{display:flex}
    .topnav a,.theme-toggle{width:100%;text-align:center}
    .match-card{flex-direction:column;align-items:flex-start}
    .match-form{grid-template-columns:1fr}
    .hero-actions{flex-direction:column}
    .btn{text-align:center;width:100%}
    th,td{padding:10px;font-size:14px}
}
