/* ===================================================
   우주국어 2.0 - 은하전쟁 (Galaxy War) 마스터 테마
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Orbit&family=Noto+Sans+KR:wght@400;600;800;900&display=swap');

:root {
  --primary-cyan: #38bdf8;
  --neon-gold: #f59e0b;
  --alert-red: #ef4444;
  --matrix-green: #10b981;
  --purple-warp: #a855f7;
  --dark-bg: #020617;
  --card-bg: rgba(15, 23, 42, 0.92);
  --glass-border: rgba(56, 189, 248, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  color: #f8fafc;
  font-family: 'Orbit', 'Noto Sans KR', sans-serif;
  overflow: hidden;
  user-select: none;
}

/* 우주 캔버스 배경 */
.space-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(ellipse at bottom, #0f172a 0%, #020617 100%);
  overflow: hidden;
}

/* 별 생성 효과 */
.cosmic-star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0.6;
  animation: starTwinkle 3s infinite alternate;
}
@keyframes starTwinkle {
  0% { opacity: 0.3; transform: scale(0.8); }
  100% { opacity: 0.9; transform: scale(1.2); }
}

/* 마스터 글로벌 HUD */
.master-hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  height: 52px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.2);
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-pill {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-val {
  font-weight: 900;
  color: var(--primary-cyan);
}

.rank-badge-pill {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--neon-gold);
  color: var(--neon-gold);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 900;
}

/* 3-Phase 스테퍼 바 */
.phase-stepper-bar {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 90;
}

.phase-step-item {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #94a3b8;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phase-step-item.active {
  border-color: var(--primary-cyan);
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.phase-step-item.completed {
  border-color: var(--matrix-green);
  background: rgba(16, 185, 129, 0.2);
  color: var(--matrix-green);
}

/* 대형 레이더 조준경 HUD */
.target-radar-hud {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 850px;
  background: rgba(15, 23, 42, 0.96);
  border: 2px solid var(--primary-cyan);
  border-radius: 14px;
  padding: 14px 24px;
  text-align: center;
  z-index: 80;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.35);
  animation: radarGlow 2s infinite alternate;
}

@keyframes radarGlow {
  0% { box-shadow: 0 0 20px rgba(56, 189, 248, 0.25); }
  100% { box-shadow: 0 0 35px rgba(56, 189, 248, 0.5); }
}

.radar-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--neon-gold);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.radar-content {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  font-family: 'Noto Sans KR', sans-serif;
}

/* 공통 모달 및 카드 */
.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(10px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.cyber-card {
  background: rgba(15, 23, 42, 0.98);
  border: 2px solid var(--primary-cyan);
  border-radius: 16px;
  padding: 30px 40px;
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.35);
  text-align: center;
}

.btn-primary-start {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 1.2rem;
  font-weight: 900;
  font-family: 'Orbit', sans-serif;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transition: all 0.2s;
}

.btn-primary-start:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.btn-secondary-pill {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 1.1rem;
  font-weight: 900;
  font-family: 'Orbit', sans-serif;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  transition: all 0.2s;
}

.btn-secondary-pill:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}
