/* =========================================================
   한국 vs 체코 스코어 맞히기 — 2026 월드컵 캠페인
   네이버 월드컵 페이지의 "무드"만 참고(코발트/네이비/색동).
   FIFA 공식 엠블럼·공식 경기구·네이버 일러스트 등 공식/창작 자산 미사용.
   ========================================================= */

:root {
  --wc-base: #1e2be6;   /* 코발트 블루(공통 베이스) */
  --wc-card: #16205c;   /* 네이비 카드 */
  --wc-card-2: #101a4d;
  --accent: #36e0d0;    /* 시안 포인트 */
  --brand: #03264f;     /* 고객사 강조색(JS로 주입) */
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.66);
  --line: rgba(255, 255, 255, 0.12);
  --danger: #ff6b6b;
  --radius: 16px;
  --maxw: 480px;
}

* { box-sizing: border-box; }

html { margin: 0; padding: 0; background: #0a1040; }
body { margin: 0; padding: 0; }

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 외부 배경은 단색 네이비(#0a1040) — 아임웹 섹션 배경과 동일하게 맞춰 이음새 제거.
     레드 색감(알림톡 톤)은 히어로 카드에만 유지한다. */
  background: #0a1040;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 8px 28px; /* 카드 영역을 넓혀 배경 여백 최소화 */
}

.screen[hidden] { display: none; }

.section-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: var(--text);
}

/* ===== 히어로 상·하단 얇은 민트 액센트 라인(깔끔) ===== */
.saekdong {
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(54, 224, 208, 0) 0%,
    rgba(54, 224, 208, 0.85) 50%,
    rgba(54, 224, 208, 0) 100%
  );
}

/* ===== 히어로 ===== */
.hero {
  margin-top: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, #1b2566 0%, #121b54 100%);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}
.hero-body { padding: 24px 18px 26px; text-align: center; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(54, 224, 208, 0.14);
  border: 1px solid rgba(54, 224, 208, 0.42);
}
.hero-title {
  font-size: 30px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 15px 0 0;
}
.hero-title .team { color: var(--accent); }
.hero-title .vs { color: #fff; margin: 0 5px; }
.hero-title-sub {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}
.hero-desc { margin: 13px 0 0; font-size: 14px; color: var(--muted); }
.hero-host { margin: 15px 0 0; font-size: 13px; font-weight: 700; }

/* ===== 카운트다운 ===== */
.countdown {
  margin-top: 16px;
  padding: 18px 16px 14px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(54, 224, 208, 0.12), rgba(30, 43, 230, 0.16));
  border: 1px solid var(--line);
  text-align: center;
}
.countdown.is-ended { background: rgba(255, 255, 255, 0.06); }
.countdown-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.countdown-clock {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.countdown-units {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

/* ===== 경기 카드 ===== */
.matches { margin-top: 22px; }
.match-list { display: flex; flex-direction: column; gap: 10px; }
.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.match-card.is-target {
  background: linear-gradient(135deg, rgba(54, 224, 208, 0.16), rgba(255, 255, 255, 0.05));
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(54, 224, 208, 0.35), 0 6px 20px rgba(54, 224, 208, 0.18);
}
.match-teams { display: flex; align-items: center; gap: 8px; }
.match-vs { font-size: 12px; color: var(--muted); }
.match-opp { font-size: 15px; font-weight: 700; margin-left: 2px; }
.match-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.match-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.match-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  color: #04261f;
  background: var(--accent);
}

/* 둥근 국기 뱃지(로열티프리 flagcdn) */
.flag {
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.flag-sm { width: 26px; height: 26px; }
.mini-flag {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  vertical-align: -3px;
}
.mini-flag[data-flag="kr"] { background-image: url("https://flagcdn.com/w80/kr.png"); }
.mini-flag[data-flag="cz"] { background-image: url("https://flagcdn.com/w80/cz.png"); }

/* ===== 투표(스코어 입력) ===== */
.vote { margin-top: 26px; }
.score-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 22px 10px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--wc-card) 0%, var(--wc-card-2) 100%);
  border: 1px solid var(--line);
}
.score-team { display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 0; }
.score-team .flag { width: 56px; height: 56px; }
.team-name { font-size: 15px; font-weight: 700; }
.score-colon { font-size: 30px; font-weight: 800; color: var(--muted); padding-bottom: 26px; }

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  max-width: 150px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 999px;
  padding: 5px;
}
.step-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.step-btn:hover { background: rgba(255, 255, 255, 0.2); }
.step-btn:active { transform: scale(0.94); }
.step-btn:disabled { opacity: 0.35; cursor: default; }
.step-val {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-preview {
  margin: 16px 0 0;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}
.score-preview b { color: var(--accent); font-size: 19px; padding: 0 2px; }

/* ===== CTA ===== */
.cta {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  transition: filter 0.15s, transform 0.05s;
  -webkit-tap-highlight-color: transparent;
}
.cta:hover { filter: brightness(1.08); }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: 0.6; cursor: default; filter: none; }

.form-error {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 107, 107, 0.16);
  border: 1px solid rgba(255, 107, 107, 0.5);
  text-align: center;
}
.form-error[hidden] { display: none; }

/* ===== 결과 ===== */
.result { margin-top: 26px; }
.result-head { text-align: center; margin-bottom: 22px; }
.result-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(54, 224, 208, 0.14);
  border: 1px solid rgba(54, 224, 208, 0.4);
}
.result-mine { margin: 14px 0 0; font-size: 22px; font-weight: 800; }
.result-mine b { color: var(--accent); padding: 0 2px; }
.result-summary { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.result-summary b { color: var(--text); }
.result-help { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ===== 분포 막대 그래프(순수 CSS) ===== */
.dist { margin-top: 8px; }
.dist-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 10px;
}
.bar-label {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bar-label em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  color: #04261f;
  background: var(--accent);
}
.bar-track {
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.5s ease;
}
.bar-row.mine .bar-fill { background: var(--brand); box-shadow: 0 0 10px rgba(54, 224, 208, 0.35); }
.bar-row.mine .bar-label { color: var(--accent); }
.bar-val { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist-empty { text-align: center; font-size: 14px; color: var(--muted); padding: 18px 0; line-height: 1.7; }

/* ===== 마감 ===== */
.closed { margin-top: 26px; }
.closed-head { text-align: center; margin-bottom: 20px; }
.closed-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
}
.closed-desc { margin: 13px 0 0; font-size: 14px; color: var(--muted); }

/* ===== 푸터 ===== */
.foot {
  margin-top: 30px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--line);
}
.foot-title { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 8px; }
.foot-notes { margin: 0; padding-left: 16px; }
.foot-notes li { font-size: 12px; color: var(--muted); margin-bottom: 5px; line-height: 1.55; }
.foot-disclaimer {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== 안내 화면(유효하지 않은 접근) ===== */
.notice-card {
  margin-top: 60px;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--wc-card) 0%, var(--wc-card-2) 100%);
  border: 1px solid var(--line);
}
.notice-emoji { font-size: 44px; }
.notice-title { font-size: 20px; font-weight: 800; margin: 14px 0 0; }
.notice-desc { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

@media (max-width: 360px) {
  .hero-title { font-size: 26px; }
  .countdown-clock { font-size: 27px; }
  .countdown-units { gap: 26px; }
  .bar-row { grid-template-columns: 72px 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill, .cta, .step-btn { transition: none; }
}
