/* ==========================================================================
   css/main.css - 공통 레이아웃, 상단바, 밤하늘, 조명, 네비게이션
   ========================================================================== */

/* 상단 상태바 */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(15, 23, 42, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.15rem;
  cursor: pointer;
  color: var(--primary);
  transition: transform 0.15s;
}

.logo-area:active {
  transform: scale(0.95);
}

.logo-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.top-badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
  color: white;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* 밤하늘 배경 */
#night-sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle linear infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* 전구 조명 스트링 (개장 시 점등) */
.light-string {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  z-index: 999;
  opacity: 0.2;
  transition: opacity 1.2s ease;
}

.light-string.lit {
  opacity: 1;
}

.bulb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FDE047;
  box-shadow: 0 0 10px #FDE047;
  animation: bulbGlow 1.5s infinite alternate;
}

.bulb:nth-child(even) {
  background: #FF8FAB;
  box-shadow: 0 0 10px #FF8FAB;
  animation-delay: 0.75s;
}

.bulb:nth-child(3n) {
  background: #38BDF8;
  box-shadow: 0 0 10px #38BDF8;
  animation-delay: 0.4s;
}

@keyframes bulbGlow {
  from { filter: brightness(0.6); }
  to { filter: brightness(1.4); }
}

/* 메인 컨테이너 및 뷰 전환 */
main {
  padding-top: 80px;
  padding-bottom: 100px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.section-view {
  display: none;
  width: 100%;
  max-width: 1050px;
  padding: 20px;
  margin: 0 auto;
  animation: fadeIn 0.4s ease-out forwards;
}

.section-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 하단 고정 네비게이션 */
.attraction-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  padding: 8px 14px;
  border-radius: 999px;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-dot {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: all 0.25s ease;
  font-weight: 600;
}

.nav-dot.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(255, 143, 171, 0.4);
}

/* 야간 퍼레이드 트랙 (이스터에그 1) */
#parade-track {
  position: fixed;
  top: 68px;
  left: -600px;
  z-index: 10000;
  pointer-events: none;
  font-size: 2.6rem;
  white-space: nowrap;
}

@keyframes runParade {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 800px)); }
}

/* 이스터에그 모달 팝업 */
.easter-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.82);
  z-index: 20000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.easter-modal-content {
  background: #1E293B;
  border: 2px solid var(--accent);
  border-radius: 24px;
  padding: 35px 25px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 50px rgba(253, 224, 71, 0.4);
}

/* 오버레이 캔버스 (컨페티 & 불꽃놀이) */
#confetti-canvas, #fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#confetti-canvas { z-index: 9999; }
#fireworks-canvas { z-index: 9998; }

/* 모바일 반응형 */
@media (max-width: 640px) {
  .attraction-nav {
    width: 92%;
    justify-content: space-between;
    padding: 6px 10px;
  }
  .nav-dot span.label {
    display: none;
  }
}
