.worldcup-page { display: grid; gap: var(--space-4); }

/* ── 이미지 출처 버튼 + 툴팁 ── */
.wc-credit-btn {
  position: absolute;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #b0bac6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
  flex-shrink: 0;
}

.wc-credit-btn svg {
  width: 18px;
  height: 18px;
}

.wc-credit-btn:hover,
.wc-credit-btn:focus-visible {
  color: #64748b;
}

.wc-credit-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 272px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.75;
  padding: 12px 14px;
  border-radius: 12px;
  pointer-events: auto;
  white-space: normal;
  text-align: left;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  z-index: 100;
  animation: wc-tooltip-in 0.12s ease;
}

@keyframes wc-tooltip-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wc-credit-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 7px;
  border: 7px solid transparent;
  border-top-color: #1e293b;
}

.wc-credit-btn:hover .wc-credit-tooltip,
.wc-credit-btn:focus-visible .wc-credit-tooltip,
.wc-credit-tooltip.is-open {
  display: block;
}

.wc-credit-tooltip a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 2px;
  pointer-events: auto;
}

.wc-credit-license {
  display: inline-block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.68rem;
}

/* ── Layout ── */
.wc-layout {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 1040px) {
  .wc-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.6fr);
    align-items: start;
  }
}

.wc-stage { padding: var(--space-5); }
.wc-stage__content { margin-top: var(--space-4); }

.wc-side { display: grid; gap: var(--space-5); }
.wc-control { padding: var(--space-5); }

.wc-eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #f43f5e;
}
.wc-side-title {
  margin: 0 0 var(--space-4);
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

/* ── Intro ── */
.wc-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-5) 0;
}
.wc-intro__emoji { font-size: 3.5rem; line-height: 1; }
.wc-intro__title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.wc-intro__desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.wc-intro__sets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.wc-intro__start {
  min-height: 52px;
  padding: 0 32px;
  font-size: 1rem;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  margin-top: var(--space-2);
}

/* ── Progress ── */
.wc-progress {
  margin-bottom: var(--space-5);
}
.wc-progress__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.wc-progress__round {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #f43f5e;
}
.wc-progress__count {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
}
.wc-progress__bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.12);
  overflow: hidden;
}
.wc-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f43f5e, #fb7185);
  transition: width 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── VS Match ── */
.wc-vs-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-3);
  align-items: stretch;
}

.wc-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  min-height: 200px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(23, 32, 51, 0.07);
  background: linear-gradient(160deg, #fff 0%, #fff5f5 100%);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background 200ms ease;
  position: relative;
  overflow: hidden;
}

.wc-choice::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244,63,94,0.06), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.wc-choice:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.35);
}
.wc-choice:hover::before { opacity: 1; }

.wc-choice.is-picked {
  animation: wcPickPop 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
  border-color: #f43f5e;
  background: linear-gradient(160deg, #fff0f2, #ffe4e8);
}

.wc-choice.is-dismissed {
  opacity: 0.22;
  filter: grayscale(0.5);
  transform: scale(0.96);
}

@keyframes wcPickPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); box-shadow: 0 20px 50px rgba(244,63,94,0.32); }
  100% { transform: scale(1); }
}

.wc-choice__emoji {
  font-size: clamp(2.8rem, 6vw, 4rem);
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
}
.wc-choice__name {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}
.wc-choice__hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── VS badge ── */
.wc-vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  align-self: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 20px rgba(244, 63, 94, 0.4);
  flex-shrink: 0;
}

/* ── Result ── */
.wc-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  animation: wcResultIn 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes wcResultIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}

.wc-result__label {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f43f5e;
  letter-spacing: 0.04em;
}
.wc-result__champion {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, #fff0f2, #ffe4e8);
  border: 2px solid rgba(244, 63, 94, 0.2);
  box-shadow: 0 20px 48px rgba(244, 63, 94, 0.15);
  min-width: 200px;
}
.wc-result__emoji {
  font-size: 5rem;
  line-height: 1;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.14));
  animation: wcChampionFloat 2.4s ease-in-out infinite;
}
@keyframes wcChampionFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.wc-result__name {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #be123c;
}
.wc-result__sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.wc-result__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}
.wc-result__actions .btn--primary {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

/* ── History ── */
.wc-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(244,63,94,0.2) transparent;
}
.wc-history__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(23, 32, 51, 0.06);
  background: #fff;
}
.wc-history__empty {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: var(--space-3) 0;
}
.wc-history__rank {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}
.wc-history__emoji { font-size: 1.1rem; flex-shrink: 0; }
.wc-history__name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-history__set {
  font-size: 0.76rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── 라운드 전환 연출 ── */
.wc-announce {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-8) 0;
  animation: wcAnnounceIn 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes wcAnnounceIn {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}
.wc-announce__emoji {
  font-size: 4rem;
  line-height: 1;
  animation: wcAnnouncePulse 0.6s ease-in-out infinite alternate;
}
@keyframes wcAnnouncePulse {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}
.wc-announce__badge {
  font-size: clamp(2.4rem, 8vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.wc-announce__sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── 그만두기 버튼 ── */
.wc-quit-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: var(--space-5);
}
.wc-quit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 24px;
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid rgba(23, 32, 51, 0.12);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
}
.wc-quit-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(23, 32, 51, 0.22);
  color: var(--text-secondary);
}

/* ── 브라켓 크기 선택 ── */
.wc-intro__size-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.wc-intro__size-label {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}
.wc-intro__size-btns {
  display: flex;
  gap: 8px;
}
.wc-size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  height: 40px;
  border-radius: 999px;
  border: 1.5px solid rgba(23, 32, 51, 0.12);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms, transform 100ms;
}
.wc-size-chip:hover {
  border-color: rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  transform: translateY(-1px);
}
.wc-size-chip.is-active {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.3);
  color: #f43f5e;
}

/* ── 그룹명 ── */
.wc-choice__group {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.wc-result__group {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f43f5e;
  letter-spacing: 0.02em;
}

/* ── 이미지 모드 ── */
.wc-choice__img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  display: block;
}
.wc-result__img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  display: block;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  animation: wcChampionFloat 2.4s ease-in-out infinite;
}

/* ── preset-chip active override ── */
.wc-intro__sets .preset-chip.is-active,
.wc-control .preset-chip.is-active {
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  border-color: rgba(244, 63, 94, 0.2);
}

@media (max-width: 600px) {
  .wc-choice { min-height: 150px; padding: var(--space-5) var(--space-3); }
  .wc-vs-badge { width: 36px; height: 36px; font-size: 0.7rem; }
  .wc-choice__img { max-height: 130px; }
}
