/* ==========================================================================
   [Stage 2] 16강 짤드컵 전용 스타일시트
   ========================================================================== */

.stage2-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 상단 라운드 헤더 바 */
.stage2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.6rem;
  border-radius: 16px;
}

.stage2-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stage2-badge {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.stage2-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.stage2-round-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.round-pill {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.4rem 1.1rem;
  border-radius: 30px;
  background: linear-gradient(135deg, #ff4d6d, #ff758c);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.3);
}

.match-counter-pill {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: var(--text-main);
}

/* ==========================================================================
   매치 아레나 (양자택일 2카드 + 중앙 VS)
   ========================================================================== */
.worldcup-arena {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  position: relative;
  min-height: 480px;
}

/* 중앙 VS 엠블럼 */
.vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  z-index: 5;
}

.vs-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 77, 109, 0.4);
  animation: vsPulse 2s infinite ease-in-out;
}

@keyframes vsPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 8px 26px rgba(245, 158, 11, 0.55); }
}

.vs-hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* 후보 카드 */
.candidate-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.candidate-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #ff758c;
  box-shadow: 0 16px 36px rgba(255, 117, 140, 0.25);
}

.candidate-card:active {
  transform: translateY(-2px) scale(0.99);
}

.candidate-img-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  position: relative;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.candidate-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.candidate-card:hover .candidate-img {
  transform: scale(1.05);
}

.candidate-tag-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

/* 후보 텍스트 정보 */
.candidate-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: center;
}

.candidate-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.candidate-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: keep-all;
}

.select-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.candidate-card:hover .select-btn {
  background: linear-gradient(135deg, #ff4d6d, #ff758c);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 77, 109, 0.35);
}

/* 카드 선택 시 전환 애니메이션 */
.candidate-card.chosen {
  transform: scale(1.05);
  border-color: #f59e0b;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.45);
  z-index: 10;
}

.candidate-card.eliminated {
  opacity: 0.25;
  filter: grayscale(80%);
  transform: scale(0.95);
  pointer-events: none;
}

/* ==========================================================================
   최종 우승작 쇼케이스 화면
   ========================================================================== */
.stage2-winner-view {
  display: none;
  width: 100%;
  max-width: 720px;
  margin: 1.5rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeInUp 0.5s ease both;
}

.winner-crown {
  font-size: 3.5rem;
  animation: bounceTrophy 1.5s infinite alternate ease-in-out;
}

.winner-headline {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.winner-highlight-card {
  width: 100%;
  max-width: 480px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #f59e0b;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}

.winner-img-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.winner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
}

.winner-notice {
  font-size: 0.88rem;
  color: #ea580c;
  font-weight: 700;
  background: #fffbeb;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.stage2-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.restart-wc-btn {
  padding: 0.85rem 1.6rem;
  border-radius: 30px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.restart-wc-btn:hover {
  background: #f8fafc;
  color: #1e293b;
}

.stage3-bridge-btn {
  padding: 0.85rem 1.8rem;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.stage3-bridge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.55);
}

/* ==========================================================================
   반응형 최적화
   ========================================================================== */
@media (max-width: 860px) {
  .worldcup-arena {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .vs-divider {
    flex-direction: row;
    padding: 0.5rem 0;
  }

  .vs-badge {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }

  .stage2-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}
