/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sky-top: #b8d4f0;
  --sky-bottom: #e8f1fa;
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.4);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --accent: #1a1a2e;
  --input-border: #d0d5dd;
  --input-focus: #7eb8e0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, var(--sky-top), var(--sky-bottom));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: none;
}

/* ── Loading Screen ── */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* Panda Face */
.panda-face {
  position: relative;
  width: 120px;
  height: 120px;
  animation: pandaBounce 1.2s ease-in-out infinite;
}

@keyframes pandaBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.panda-head {
  width: 100px;
  height: 95px;
  background: #fff;
  border-radius: 50% 50% 48% 48%;
  position: absolute;
  top: 20px;
  left: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.panda-ear {
  width: 36px;
  height: 36px;
  background: #1a1a2e;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  box-shadow: inset 0 0 0 6px #2a2a4a;
}

.panda-ear-left { left: 5px; }
.panda-ear-right { right: 5px; }

.panda-eye {
  width: 30px;
  height: 26px;
  background: #1a1a2e;
  border-radius: 50%;
  position: absolute;
  top: 28px;
}

.panda-eye-left { left: 14px; }
.panda-eye-right { right: 14px; }

.panda-pupil {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 12px;
  animation: pupilLook 2.5s ease-in-out infinite;
}

@keyframes pupilLook {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
}

.panda-nose {
  width: 14px;
  height: 10px;
  background: #1a1a2e;
  border-radius: 50%;
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
}

.panda-mouth {
  width: 20px;
  height: 10px;
  border-bottom: 3px solid #1a1a2e;
  border-radius: 0 0 50% 50%;
  position: absolute;
  top: 63px;
  left: 50%;
  transform: translateX(-50%);
}

/* Progress Bar */
.loader-bar-wrapper {
  width: 240px;
  height: 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #fff 0%, #e0e0e0 100%);
  border-radius: 6px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.loader-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.loader-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  animation: subtitlePulse 2s ease-in-out infinite;
}

@keyframes subtitlePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 50;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Fullscreen 3D Scene ── */
.fullscreen-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

#threeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}
