/* [월드컵 경우의 수] — 다크 프리미엄 축구 테마 · Pretendard · 모바일 우선
   배경: 야간 스타디움 / 헤더: 붉은악마 응원. 솔리드 색상, 그라데이션·라운드 없음. */
:root {
  --ink: #eef1f6;
  --muted: #9aa3b2;
  --faint: #6b7480;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --panel: rgba(13,16,21,0.92);
  --panel2: rgba(255,255,255,0.04);
  --track: rgba(255,255,255,0.10);
  --red: #ff3d49;     /* 태극 적(다크용 선명) */
  --blue: #3d7bff;    /* 태극 청 */
  --green: #1fb673;   /* 진출 */
  --amber: #ffab2e;   /* 경합 */
  --promo: #7c5cff;   /* 광고1(AI 코치) 액센트 */
  --promo2: #e6b400;  /* 광고2(미장 라이브 PRO) 액센트 */
  --korbg: rgba(255,61,73,0.13);
  --good: var(--green);
  --bad: var(--red);
  --warn: var(--amber);
  --text: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #070a0e;
  color: var(--ink);
  font-family: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
/* 고정 스타디움 배경 + 솔리드 어둠 오버레이(그라데이션 아님) */
body::before { content: ""; position: fixed; inset: 0; z-index: -2;
  background: url("assets/bg-stadium.webp") center top / cover no-repeat; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(6,9,13,0.80); }

.wrap { width: 100%; max-width: 660px; margin: 0 auto; padding: 0 18px; }
button, input, select { font-family: inherit; }

/* 헤더 (스타디움 위) */
.topbar { border-bottom: 1px solid var(--line); }
.topbar .wrap { padding: 18px 18px 16px; }
.brand { display: flex; align-items: center; gap: 13px; }
.flag { width: 6px; height: 40px; flex: none; background: var(--red); }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.6px; }
.topbar .sub { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* 본문 컬럼: 읽기 좋은 반투명 패널 */
main.wrap { background: var(--panel); border-inline: 1px solid var(--line); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }

/* HERO — 붉은악마 배너 + 진출 확률 */
.hero { position: relative; margin: 0 -18px; padding: 26px 20px 22px; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("assets/hero-korea.webp") center 28% / cover no-repeat; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(8,10,14,0.62); }
.hero > * { position: relative; z-index: 2; }
.hero .prob-label { font-size: 13px; font-weight: 700; color: #e9d2d4; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.prob-value { font-size: 72px; font-weight: 800; letter-spacing: -2.5px; line-height: 1; margin: 6px 0 0; font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.prob-value.calc { color: #d6dae2; }
.prob-bar { height: 9px; background: rgba(255,255,255,0.22); margin: 16px 0 10px; overflow: hidden; }
.prob-bar-fill { height: 100%; width: 0; background: var(--green); transition: width .35s ease; }
.prob-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prob-status { font-size: 13px; font-weight: 800; padding: 3px 11px; background: rgba(0,0,0,0.45); border: 1px solid currentColor; }
.prob-meta { color: #d3d8e0; font-size: 12px; font-weight: 500; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.explain { font-size: 13.5px; color: #eef1f6; margin: 16px 0 0; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.explain b { font-weight: 800; color: #fff; }
.kor-line { margin-top: 14px; padding: 11px 13px; background: rgba(8,10,14,0.55); border-left: 3px solid var(--red); font-size: 12.5px; font-weight: 500; }
.kor-line b { color: #ff6e76; font-weight: 800; }

/* 광고 카로셀 (홀릭스) */
.promo-carousel { position: relative; margin: 0 -18px; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.promo-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); will-change: transform; }

.promo { --accent: var(--promo); --accent-soft: rgba(124,92,255,0.18); --accent-text: #b9a8ff; --accent-on: #fff;
  position: relative; flex: 0 0 100%; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px;
  padding: 15px 18px 26px; background: #15131f; border-left: 3px solid var(--accent);
  text-decoration: none; color: var(--ink); }
.promo--invest { --accent: var(--promo2); --accent-soft: rgba(230,180,0,0.16); --accent-text: #ffd766; --accent-on: #1a1206; background: #161410; }
.promo:hover { filter: brightness(1.12); }
.promo-tag { position: absolute; top: 8px; right: 10px; font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--faint); border: 1px solid var(--line-strong); padding: 1px 5px; }
.promo-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; color: var(--accent-on); background: var(--accent); flex: none; }
.promo-body { min-width: 0; }
.promo-title { display: block; font-size: 15px; font-weight: 800; letter-spacing: -0.3px; }
.promo-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.promo-desc b { color: var(--accent-text); font-weight: 800; }
.promo-code-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.promo-code-label { font-size: 10.5px; color: var(--faint); font-weight: 600; }
.promo-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #fff; background: var(--accent-soft); border: 1px solid var(--accent); padding: 2px 9px; }
.promo-copy { font-size: 11px; font-weight: 700; color: var(--accent-text); background: none; border: 1px solid var(--line-strong); padding: 3px 9px; cursor: pointer; }
.promo-copy:hover { border-color: var(--accent); color: #fff; }
.promo-copy.done { color: var(--green); border-color: var(--green); }
.promo-cta { grid-column: 1 / -1; text-align: center; background: var(--accent); color: var(--accent-on); font-weight: 800; font-size: 13px; padding: 11px 14px; margin-top: 4px; white-space: nowrap; }

.promo-dots { position: absolute; left: 0; right: 0; bottom: 9px; display: flex; gap: 7px; justify-content: center; z-index: 3; }
.promo-dot { width: 18px; height: 4px; padding: 0; border: none; cursor: pointer; background: rgba(255,255,255,0.28); }
.promo-dot.is-active { background: #fff; }

@media (min-width: 560px) {
  .promo { grid-template-columns: auto 1fr auto; padding: 16px 18px 24px; }
  .promo-cta { grid-column: auto; text-align: left; margin-top: 0; }
}

/* 라운드별 확률 (퍼널) */
.round-list { display: flex; flex-direction: column; }
.round-row { display: grid; grid-template-columns: 92px 1fr 54px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.round-row:last-child { border-bottom: none; }
.r-label { font-size: 14px; font-weight: 800; display: flex; flex-direction: column; line-height: 1.2; }
.r-note { font-size: 10.5px; font-weight: 500; color: var(--faint); }
.r-bar { height: 14px; background: var(--track); }
.r-bar-fill { display: block; height: 100%; background: var(--blue); }
.round-row:first-child .r-bar-fill { background: var(--green); }
.r-pct { text-align: right; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* 섹션 */
.block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.block:last-of-type { border-bottom: none; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 0 2px; }
.block-head h2 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.hint { color: var(--muted); font-weight: 500; font-size: 11.5px; text-align: right; }

/* 조 3위 표 */
.third-table { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: 26px 1fr 30px 38px 40px 34px; gap: 8px; align-items: center; padding: 11px 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.trow.head { color: var(--faint); font-size: 11px; font-weight: 700; padding: 4px 8px; border-bottom: 1px solid var(--line-strong); }
.trow.in .pos { color: var(--green); font-weight: 800; }
.trow.out { color: var(--muted); }
.trow.kor { background: var(--korbg); }
.trow.kor .team { color: #ff6e76; font-weight: 800; }
.trow .pos { color: var(--faint); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.trow .team { font-weight: 600; }
.trow .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.trow.kor .num { color: #ff8a90; }
.prov { font-size: 9.5px; font-weight: 700; color: var(--amber); border: 1px solid var(--amber); padding: 0 4px; margin-left: 6px; vertical-align: middle; line-height: 1.5; }
.cutlabel { font-size: 10.5px; color: var(--faint); text-align: center; padding: 9px 0 5px; font-weight: 700; letter-spacing: 1px; position: relative; }
.cutlabel::before, .cutlabel::after { content: ""; position: absolute; top: 60%; width: 26%; height: 1px; background: var(--line-strong); }
.cutlabel::before { left: 6%; } .cutlabel::after { right: 6%; }

/* 그룹/경기 */
.groups { display: grid; grid-template-columns: 1fr; gap: 0; }
.group { padding: 14px 2px; border-bottom: 1px solid var(--line); }
.group:last-child { border-bottom: none; }
.group h3 { margin: 0 0 3px; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.group .gmeta { color: var(--muted); font-size: 11.5px; margin-bottom: 6px; font-weight: 500; }
.match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 9px 8px; }
.match + .match, .gmeta + .match { border-top: 1px solid var(--line); }
.match.pending { background: var(--panel2); }
.match .team { font-size: 13px; font-weight: 600; }
.match .team.h { text-align: right; }
.match .team.kor { color: #ff6e76; font-weight: 800; }
.score { display: flex; align-items: center; gap: 5px; }
.score input { width: 34px; height: 34px; text-align: center; background: rgba(255,255,255,0.06); color: #fff; border: 1px solid var(--line-strong); padding: 0; font-size: 15px; font-weight: 700; -moz-appearance: textfield; }
.score input:focus { outline: none; border-color: var(--blue); background: rgba(61,123,255,0.12); }
.score input.pred { color: var(--faint); border-style: dashed; }
.score input.pred::placeholder { color: var(--faint); }
.score input::-webkit-outer-spin-button, .score input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.score .sep { color: var(--faint); font-weight: 700; }
.wdl { grid-column: 1 / -1; font-size: 11px; color: var(--muted); text-align: center; padding-top: 5px; font-weight: 500; }
.mclear { grid-column: 1 / -1; text-align: center; padding-top: 3px; }
.mclear button { font-size: 11px; color: var(--blue); background: none; border: none; cursor: pointer; padding: 2px; font-weight: 600; }
.mclear button:hover { text-decoration: underline; }

.tag { font-size: 10px; padding: 2px 8px; font-weight: 700; vertical-align: middle; }
.tag.q { background: var(--green); color: #04130c; }
.tag.done { color: var(--faint); border: 1px solid var(--line-strong); }
.tag.live { color: var(--blue); border: 1px solid var(--blue); }

/* 컨트롤 */
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 0 2px; }
.btn { border: 1px solid var(--line-strong); background: rgba(255,255,255,0.05); color: var(--ink); padding: 9px 16px; cursor: pointer; font-size: 13px; font-weight: 700; }
.btn:hover { border-color: var(--red); color: #fff; }
.sims { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; font-weight: 600; }
select { background: #11151b; color: var(--ink); border: 1px solid var(--line-strong); padding: 8px 9px; font-weight: 600; }

.foot { color: var(--muted); font-size: 11.5px; margin: 6px 0 0; padding: 18px 2px 40px; font-weight: 500; line-height: 1.65; border-top: 1px solid var(--line); }

/* 큰 화면 */
@media (min-width: 600px) {
  .groups { grid-template-columns: 1fr 1fr; column-gap: 26px; }
  .group { padding: 14px 10px; }
  .prob-value { font-size: 84px; }
  .hero { padding: 32px 24px 26px; }
}
