
:root { color-scheme: dark; --bg:#101418; --panel:#171d23; --line:#2a333d; --text:#edf2f7; --muted:#9ba8b5; --accent:#27c7a7; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: var(--bg); color: var(--text); }
.shell { max-width: 1280px; margin: 0 auto; padding: 28px 24px 40px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 16px; margin-bottom: 14px; }
p, label { color: var(--muted); font-size: 13px; }
.filters { display: flex; gap: 8px; }
.grid { display: grid; grid-template-columns: minmax(520px, 1.05fr) minmax(420px, .95fr); gap: 18px; align-items: start; }
.detailGrid { grid-template-columns: minmax(420px, .86fr) minmax(560px, 1.14fr); margin-top: 18px; margin-bottom: 0; }
.panelStack { display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.hidden { display: none !important; }
.backLink { display: inline-block; color: var(--accent); font-size: 13px; margin-bottom: 8px; text-decoration: none; }
.matchStrip { margin-bottom: 16px; }
.panelTitleRow { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panelTitleRow h2 { margin-bottom: 4px; }
.subtleText { color: var(--muted); font-size: 12px; margin: 0; }
.compactSelect { width: auto; min-width: 170px; padding: 7px 9px; font-size: 12px; }
.sectionHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.matchScheduleTools { display: flex; justify-content: flex-end; align-items: center; }
.scheduleDate { width: 42px; height: 38px; min-width: 42px; padding: 0; color: transparent; color-scheme: dark; background: #202832; border-color: #2b3541; cursor: pointer; }
.scheduleDate::-webkit-calendar-picker-indicator { width: 22px; height: 22px; margin: 0 auto; cursor: pointer; filter: invert(74%) sepia(69%) saturate(533%) hue-rotate(7deg) brightness(98%) contrast(89%); }
.scheduleDate::-webkit-datetime-edit { display: none; }
.dateTabs { display: grid; grid-template-columns: repeat(var(--date-tab-count, 4), minmax(0, 1fr)); width: 100%; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #111820; margin: 0 0 12px; overflow: hidden; }
.dateTabs .dateTab { width: 100%; min-width: 0; margin: 0; border: 0; border-right: 1px solid #202a34; border-radius: 0; padding: 7px 8px; background: transparent; color: var(--muted); text-align: center; cursor: pointer; font-size: 11px; line-height: 1.15; font-weight: 700; }
.dateTabs .dateTab:last-child { border-right: 0; }
.dateTabs .dateTab strong { display: block; color: #dbe5f4; font-size: 12px; font-weight: 900; }
.dateTabs .dateTab.live strong { color: #ff5b66; }
.dateTabs .dateTab.active { box-shadow: inset 0 0 0 1px #d6c56b; background: #2b3038; color: #dfe8f7; }
.dateTabs .dateTab.active strong { color: #ffffff; }
.matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.match { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #111820; color: var(--text); cursor: pointer; font: inherit; text-align: inherit; text-decoration: none; }
.match:hover { border-color: var(--accent); }
.match .backLink { color: var(--accent); margin: 10px 0 0; }
.matchMeta { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; font-weight: 800; }
.versus span:last-child { text-align: right; }
.cardTeam { display: grid; justify-items: center; gap: 6px; min-width: 0; text-align: center; }
.cardTeam img { width: 44px; height: 44px; object-fit: contain; }
.cardTeam span { color: var(--text); overflow-wrap: anywhere; }
.matchCenter { margin-bottom: 16px; }
.selectedMatch { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 10px; }
.selectedMatch.twoTeams { grid-template-columns: minmax(0, 280px) minmax(0, 280px); justify-content: center; }
.teamBlock { display: grid; align-items: center; justify-items: center; gap: 6px; min-width: 0; }
.teamRecords { min-height: 20px; display: grid; place-items: center; gap: 2px; }
.teamBlock img { width: 64px; height: 64px; object-fit: contain; }
.teamBlock strong { text-align: center; overflow-wrap: anywhere; }
.teamRecord { color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; }
.teamSeriesRecord { color: var(--text); font-size: 16px; font-weight: 800; text-align: center; }
.winnerSlot { min-height: 22px; display: grid; place-items: center; }
.winnerBadge { border-radius: 999px; background: rgba(56, 215, 123, .16); border: 1px solid rgba(56, 215, 123, .45); color: #38d77b; padding: 2px 8px; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.winPill { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; color: var(--muted); text-align: center; }
.matchScorePill { min-width: 120px; display: grid; place-items: center; gap: 4px; color: var(--muted); font-weight: 800; }
.matchScorePill strong { color: var(--text); font-size: 22px; line-height: 1; }
.matchInfo { min-width: 200px; color: var(--text); text-align: center; display: grid; gap: 5px; }
.matchInfoLeague { font-size: 16px; font-weight: 900; }
.matchInfoBo { color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: 0; }
.matchInfoScore { font-size: 13px; color: var(--muted); }
.matchInfoVs { font-size: 24px; line-height: 1; font-weight: 900; color: var(--text); margin: 0; }
.matchInfoStart { color: var(--muted); font-size: 13px; font-weight: 800; margin-top: 2px; }
#centerPrediction, #detailPrediction { color: var(--accent); font-size: 22px; }
.modelSandboxValue { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 12px; background: #10161d; color: var(--muted); font-size: 12px; }
.detailHero { margin-bottom: 18px; padding: 14px 16px; }
.detailHero .sectionHead { margin-bottom: 18px; }
.draftGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.draftSlot { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.draftSlot.live b { color: var(--accent); }
.liveState { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.liveState.active { border-color: var(--accent); color: var(--accent); }
.livePanel { background: #10191d; padding: 0 24px 20px; overflow: hidden; margin: 0 0 22px; width: 100%; border-radius: 4px; }
.liveBoard { color: #c8dbff; }
.liveContent { max-width: 1080px; margin: 0 auto; }
.liveTabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -24px 24px; }
.liveTab { width: 100%; margin: 0; border: 0; border-right: 2px solid #11161b; border-radius: 0; background: #2b3038; box-shadow: inset 0 -2px 5px rgba(0,0,0,.45); padding: 9px 10px; text-align: center; font-size: 16px; font-weight: 500; color: #c7d8fb; cursor: pointer; }
.liveTab:hover, .liveTab:focus-visible { background: #343b46; outline: 1px solid #52627a; outline-offset: -1px; }
.liveTab.active { background: #11181d; }
.liveTop { display: grid; grid-template-columns: 1fr 190px 1fr; align-items: end; gap: 18px; margin-bottom: 22px; }
.liveTeamHead { display: grid; justify-items: center; gap: 10px; min-width: 0; }
.liveTeamHead img { width: 64px; height: 64px; object-fit: contain; border-radius: 4px; background: #2a2f37; padding: 6px; }
.liveTeamHead strong { color: #d7e5ff; text-align: center; overflow-wrap: anywhere; }
.liveCenter { display: grid; justify-items: center; gap: 5px; align-self: center; }
.liveBadge { background: #2f8a35; border-radius: 999px; padding: 5px 12px; color: #f5fff5; font-size: 16px; font-weight: 900; text-align: center; }
.liveBadge.warning { background: #6b5a2e; color: #ffe9a8; }
.liveTimer { font-size: 18px; font-weight: 900; color: #cdddff; }
.liveStatsLine { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 18px; position: relative; }
.liveStatsLine::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: linear-gradient(90deg, #36a9e8 0 50%, #ff456a 50% 100%); opacity: .95; }
.liveStatsSide { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.liveStat { display: grid; justify-items: center; gap: 4px; color: #c9d9f6; font-size: 18px; font-weight: 500; }
.liveStat b { color: #43b9f6; font-size: 12px; }
.liveStatsSide.red .liveStat b { color: #ff4770; }
.livePlayers { display: grid; gap: 4px; padding-top: 8px; }
.liveTeamRows { display: grid; grid-template-columns: 190px 240px 186px 70px 30px 30px 30px 116px 120px; gap: 0; column-gap: 3px; align-items: center; width: 100%; }
.liveTeamRows + .liveTeamRows { margin-top: 4px; }
.liveRowsHeader { color: #cdddff; font-weight: 900; }
.liveRowsTitle { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livePlayer { color: #d7e5ff; }
.liveChampion { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: center; min-width: 0; }
.liveChampion img { width: 32px; height: 32px; border-radius: 50%; background: #262c35; }
.liveChampionPlaceholder { width: 24px; height: 24px; border-radius: 50%; background: #202833; border: 1px solid #3a4554; display: grid; place-items: center; color: #8290a3; font-size: 9px; font-weight: 900; }
.liveChampion strong, .liveChampion span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liveChampion strong { font-size: 16px; line-height: 1.05; }
.liveChampion small { display: block; color: #b7c6df; font-size: 9px; margin-top: 1px; }
.liveChampion.pending strong { color: #aab7c9; font-size: 12px; text-transform: uppercase; }
.healthBar { height: 28px; border-radius: 4px; background: #2a3138; overflow: hidden; position: relative; }
.healthFill { height: 100%; background: #3f9638; min-width: 0; }
.healthText { position: absolute; inset: 0; display: grid; place-items: center; color: #d9e6ff; font-size: 12px; }
.liveCell { background: #2c313a; border-radius: 4px; min-height: 28px; display: grid; place-items: center; color: #d8e5ff; font-size: 12px; }
.liveCell.delta { font-weight: 900; }
.liveCell.delta.positive { color: #38d77b; }
.liveCell.delta.negative { color: #ff4c72; }
.liveCell.delta.neutral { color: #d8e5ff; }
.liveItems { min-height: 20px; }
.itemSlots { display: grid; grid-template-columns: repeat(7, 24px); gap: 3px; align-items: center; justify-content: start; }
.itemSlot { width: 24px; height: 24px; border-radius: 3px; background: #242a33; border: 1px solid #343d49; }
.itemSlot img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; display: block; }
.liveRefreshMeta { margin-top: 8px; font-size: 12px; }
.rosterList { display: grid; gap: 8px; }
.playerCard { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #10161d; }
.playerCardTop { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.playerCard strong { color: var(--text); }
.playerMeta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.gameList { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.gameItem { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #10161d; font-size: 12px; }
.gameItem b { display: block; margin-bottom: 4px; }
.gameWinner { display: inline-block; margin-top: 5px; color: #38d77b; font-weight: 900; }
.loadingState { color: var(--muted); font-size: 13px; padding: 18px 0; text-align: center; width: 100%; }
.formGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: grid; gap: 6px; }
input, select, button { width: 100%; border-radius: 6px; border: 1px solid var(--line); background: #0f1419; color: var(--text); padding: 10px; }
button { margin-top: 14px; background: var(--accent); color: #08110f; font-weight: 700; cursor: pointer; }
output { display: block; margin-top: 12px; font-size: 28px; font-weight: 800; }
.table { display: grid; gap: 6px; }
.row { display: grid; grid-template-columns: minmax(120px, 1fr) 70px 70px 80px; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.row.header { color: var(--muted); font-size: 12px; }
.standingsTable .row { grid-template-columns: 42px minmax(160px, 1fr) 70px 80px 80px; align-items: center; }
.rankCell { color: var(--muted); font-weight: 900; }
.championMetaRow { grid-template-columns: minmax(160px, 1fr) 50px 54px 54px 54px; gap: 6px; align-items: center; }
.championMetaCell { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 800; }
.championMetaCell img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #222b35; border: 1px solid #344150; }
.championMetaCell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compactTable .row { grid-template-columns: minmax(80px, 1fr) 80px 80px 80px; padding: 6px 0; }
.subsectionTitle { margin-top: 14px; }
.h2hPanel { background: #2d343d; border-color: #343d49; padding: 10px 16px 12px; }
.h2hPanel h2 { color: #d5dbe4; font-size: 15px; margin-bottom: 10px; }
.h2hList { display: grid; gap: 0; }
.h2hLogoStrip { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 3px; overflow: hidden; margin-bottom: 10px; background: #4f4566; }
.h2hLogoCell { min-height: 38px; display: grid; place-items: center; border-right: 1px solid #323945; }
.h2hLogoCell:last-child { border-right: 0; }
.h2hLogoCell img { width: 22px; height: 22px; object-fit: contain; }
.h2hLogoFallback { color: #ff3d4e; font-size: 11px; font-weight: 900; }
.h2hRow { display: grid; grid-template-columns: 64px minmax(86px, 1fr) 22px 54px 22px minmax(80px, 1fr); gap: 8px; align-items: center; border-top: 1px solid #3b444f; padding: 10px 0; font-size: 13px; min-width: 0; }
.h2hDate { color: #b2bdc9; white-space: nowrap; }
.h2hTeam { color: #b7c0cc; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-align: right; }
.h2hTeam.isWinner { color: #f1f5f9; }
.h2hTeam.isLoser { color: #a4afbd; font-weight: 700; }
.h2hTeam.isRight { text-align: left; }
.h2hMiniLogo { width: 20px; height: 20px; display: grid; place-items: center; }
.h2hMiniLogo img { width: 20px; height: 20px; object-fit: contain; }
.h2hScore { justify-self: center; border-radius: 5px; padding: 4px 10px; background: #252b34; color: #f3f6fb; font-weight: 900; line-height: 1; white-space: nowrap; }
.h2hEmpty { color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) { .liveTeamRows { grid-template-columns: 160px minmax(120px, 1fr) 70px 30px 30px 30px 92px; } .liveItems, .liveRowsHeader.items, .liveCell.delta, .liveRowsHeader.delta { display: none; } }
@media (max-width: 900px) { .topbar, .filters { align-items: stretch; flex-direction: column; } .grid { grid-template-columns: 1fr; } .formGrid, .draftGrid { grid-template-columns: 1fr; } .liveTop { grid-template-columns: 1fr; } .liveStatsLine { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .shell { padding: 12px 10px 28px; }
  h1 { font-size: 22px; line-height: 1.15; }
  h2 { font-size: 15px; margin-bottom: 8px; }
  .panel { padding: 12px; border-radius: 7px; }
  .sectionHead, .panelTitleRow { align-items: stretch; flex-direction: column; gap: 8px; }
  .compactSelect, .filters select { width: 100%; min-width: 0; }
  .matches { grid-template-columns: 1fr; }
  .match { padding: 10px; }
  .matchMeta { font-size: 11px; }
  .matches { gap: 7px; }
  .match .backLink { display: none; }
  .versus { gap: 5px; }
  .cardTeam { gap: 3px; }
  .cardTeam img { width: 30px; height: 30px; }
  .matchCenter { margin-bottom: 12px; }
  .selectedMatch { gap: 10px; }
  .selectedMatch.twoTeams { grid-template-columns: 1fr 1fr; }
  .teamBlock img { width: 48px; height: 48px; }
  .teamBlock strong { font-size: 13px; }
  .matchScorePill { min-width: 0; }
  .gameList { grid-template-columns: 1fr; }
  .row { font-size: 12px; gap: 6px; }
  .championMetaRow { grid-template-columns: minmax(118px, 1fr) 46px 50px 50px 50px; gap: 5px; }
  .championMetaCell { gap: 7px; }
  .championMetaCell img { width: 24px; height: 24px; }
  .standingsTable .row { grid-template-columns: minmax(126px, 1fr) 54px 54px 58px; gap: 6px; }
  .standingsTable .row > span:first-child { display: none; }
}
@media (max-width: 640px) { .h2hRow { grid-template-columns: 58px minmax(64px, 1fr) 18px 48px 18px minmax(64px, 1fr); gap: 5px; font-size: 12px; } }
@media (max-width: 520px) {
  .dateTabs .dateTab { padding: 6px 4px; }
  .dateTabs .dateTab strong { font-size: 11px; }
  .dateTabs .dateTab span { font-size: 10px; }
  .versus { gap: 6px; font-size: 12px; }
  .championMetaRow { grid-template-columns: minmax(104px, 1fr) 40px 44px 44px 44px; }
  .standingsTable .row { grid-template-columns: minmax(112px, 1fr) 48px 48px 52px; }
}
