:root {
  --bg: #f3f5f2; --card: #ffffff; --text: #17201a; --muted: #6b766e; --line: #dfe5df;
  --brand: #0c7a43; --brand-2: #0a5c33; --c1: #1f8a52; --cx: #9aa39c; --c2: #2f6fb3;
  --warn-bg: #fff6dc; --warn: #7a5a00; --ok: #16803c; --no: #c0392b; --value: #b8860b;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1411; --card: #18201b; --text: #e7ece8; --muted: #93a097; --line: #2a352e;
    --brand: #1fa463; --brand-2: #0d3b23; --c1: #26a464; --cx: #5d6862; --c2: #3b82c9;
    --warn-bg: #3a3112; --warn: #f0d78a; --ok: #4cc77a; --no: #ef6f61; --value: #e2b33b;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; padding: 40px 0; }

.top { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { font-size: 20px; letter-spacing: .3px; } .brand b { font-weight: 800; }
#league { font: inherit; padding: 8px 10px; border-radius: 8px; border: 0; min-width: 220px; max-width: 100%; }

.banner { background: var(--warn-bg); color: var(--warn); padding: 10px 16px; text-align: center; font-size: 14px; }
.banner code { background: rgba(0,0,0,.08); padding: 1px 5px; border-radius: 4px; }

.tabs { display: flex; gap: 4px; overflow-x: auto; margin-top: 14px; margin-bottom: 6px; }
.tabs button { font: inherit; border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--brand); color: #fff; }

.day { margin: 22px 0 8px; font-size: 14px; text-transform: capitalize; color: var(--muted); }
.match { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s; }
.match:hover, .match:focus { border-color: var(--brand); outline: none; }
.m-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.live { color: var(--no); }
.m-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.team { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.team.away { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.tn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.team img, .tcell img, h2 img { width: 24px; height: 24px; object-fit: contain; }
.nologo { width: 24px; height: 24px; border-radius: 50%; background: var(--line); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.xg { text-align: center; } .xg b { display: block; font-size: 20px; } .xg small { color: var(--muted); font-size: 11px; white-space: nowrap; }

.form { display: inline-flex; gap: 2px; }
.form i, .fl i { font-style: normal; font-size: 10px; font-weight: 700; width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 3px; color: #fff; }
.f-G { background: var(--ok); } .f-B { background: var(--cx); } .f-M { background: var(--no); }

.bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: 10px 0 8px; font-size: 11px; font-weight: 600; color: #fff; }
.bar span { display: flex; align-items: center; justify-content: center; min-width: 38px; white-space: nowrap; }
.b1 { background: var(--c1); } .bx { background: var(--cx); } .b2 { background: var(--c2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.tags span { background: var(--bg); border-radius: 999px; padding: 3px 10px; }
.tags .pick { background: var(--brand); color: #fff; font-weight: 600; }
.tags .pick.c-Düşük { background: var(--cx); }
.tags .pick small { font-weight: 400; opacity: .85; }
.tags .value, .hero .value { background: var(--value); color: #fff; }

.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table.std { width: 100%; border-collapse: collapse; font-size: 13px; }
.std th, .std td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.std .l { text-align: left; } .std thead th { color: var(--muted); font-weight: 600; }
.tcell { display: inline-flex; align-items: center; gap: 6px; }
.ok { color: var(--ok); font-weight: 700; } .no { color: var(--no); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; }
.stat b { font-size: 24px; } .stat small { color: var(--muted); } .stat span { font-size: 12px; }

.warn { background: var(--warn-bg); color: var(--warn); padding: 10px 12px; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.error { background: var(--card); border: 1px solid var(--no); color: var(--no); padding: 14px; border-radius: var(--radius); margin-top: 20px; }
.about { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 14px; }
.about li { margin-bottom: 8px; }

dialog { border: 0; border-radius: 16px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.55); }
#detail-body { padding: 18px 20px 24px; position: relative; }
#detail-body h2 { font-size: 19px; margin: 0 30px 2px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#detail-body h3 { font-size: 15px; margin: 20px 0 8px; }
.close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 28px; color: var(--muted); cursor: pointer; }
.hero { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.hero > div { flex: 1 1 150px; background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.hero small { opacity: .8; font-size: 12px; } .hero b { font-size: 20px; } .hero span { font-size: 12px; opacity: .85; }
.scores { display: flex; gap: 6px; flex-wrap: wrap; }
.scores span { background: var(--bg); border-radius: 8px; padding: 4px 10px; font-size: 13px; }
table.grid { border-collapse: collapse; font-size: 12px; }
.grid th { color: var(--muted); padding: 4px 8px; font-weight: 600; }
.grid td { padding: 6px 8px; text-align: center; background: color-mix(in srgb, var(--brand) calc(var(--a) * 85%), transparent); border: 1px solid var(--card); min-width: 44px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fl { list-style: none; padding: 0; margin: 0; font-size: 13px; } .fl li { margin-bottom: 4px; }
form.odds { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; }
form.odds label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
form.odds input { font: inherit; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.btns { grid-column: 1 / -1; display: flex; gap: 8px; }
.btns button { font: inherit; border: 0; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.btns .ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 30px 16px 40px; }

@media (max-width: 560px) {
  .m-teams { grid-template-columns: 1fr; gap: 4px; }
  .team.away { flex-direction: row; justify-content: flex-start; text-align: left; }
  .xg { text-align: left; display: flex; gap: 8px; align-items: baseline; order: 3; }
  .xg b { display: inline; font-size: 16px; }
  .two { grid-template-columns: 1fr; }
  #league { min-width: 0; width: 100%; }
}
