/* ==========================================================================
   SWEET 47 - LUXURY 3D BIRTHDAY MICROSITE FOR MOM
   Color Palette: Deep Imperial Purple, Luminous Gold, Soft Ivory
   ========================================================================== */

:root {
  --bg-deep-purple: #0b0314;
  --bg-purple-dark: #150628;
  --bg-purple-mid: #250d44;
  --bg-purple-light: #3b166b;
  
  --gold-primary: #d4af37;
  --gold-light: #ffe58f;
  --gold-bright: #ffd700;
  --gold-shimmer: #fff3bf;
  --gold-deep: #aa7c11;
  --gold-shadow: rgba(212, 175, 55, 0.35);

  --ivory-pure: #fffdf5;
  --ivory-soft: #fcf6e8;
  --ivory-muted: #e6ddc8;

  --glass-bg: rgba(25, 10, 45, 0.55);
  --glass-border: rgba(212, 175, 55, 0.28);
  --glass-glow: rgba(168, 85, 247, 0.15);

  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-script: 'Great Vibes', 'Alex Brush', cursive;
  --font-burmese: 'Noto Sans Myanmar', 'Padauk', 'Myanmar Text', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep-purple);
  background: radial-gradient(circle at 50% 35%, #240d42 0%, #130524 50%, #08020e 100%);
  color: var(--ivory-soft);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  user-select: none;
}

/* Atmospheric Background Vignette & Depth of Field */
.depth-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(5, 1, 10, 0.75) 100%);
  z-index: 2;
}

.ambient-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  top: 15%;
  left: 10%;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
  animation-delay: -6s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ==========================================================================
   3D CANVAS CONTAINER
   ========================================================================== */
#webgl-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3;
  cursor: grab;
}

#webgl-container:active {
  cursor: grabbing;
}

/* ==========================================================================
   FLOATING LUXURY NAVIGATION BAR
   ========================================================================== */
.floating-header {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 50;
  padding: 0 20px;
}

.floating-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45), 0 0 20px var(--glass-glow), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  border-radius: 40px;
  animation: floatNav 6s ease-in-out infinite alternate;
}

@keyframes floatNav {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-4px); }
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--ivory-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nav-btn:hover {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.nav-btn.active {
  color: #120422;
  background: linear-gradient(135deg, #ffd700 0%, #e5b839 50%, #d4af37 100%);
  font-weight: 600;
  box-shadow: 0 2px 16px rgba(255, 215, 0, 0.45), inset 0 1px 1px #fff;
}

.nav-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Audio Wave Button */
.music-toggle {
  margin-left: 6px;
  border-left: 1px solid rgba(212, 175, 55, 0.25);
  padding-left: 14px;
}

.music-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}

.music-wave span {
  display: block;
  width: 3px;
  height: 100%;
  background: var(--gold-primary);
  border-radius: 2px;
  transform: scaleY(0.3);
  transition: transform 0.3s;
}

.music-wave.playing span:nth-child(1) { animation: wave 1.1s ease-in-out infinite alternate; }
.music-wave.playing span:nth-child(2) { animation: wave 0.8s ease-in-out infinite 0.2s alternate; }
.music-wave.playing span:nth-child(3) { animation: wave 1.3s ease-in-out infinite 0.4s alternate; }

@keyframes wave {
  0% { transform: scaleY(0.2); }
  100% { transform: scaleY(1); }
}

/* ==========================================================================
   PRIMARY HERO & TYPOGRAPHY
   ========================================================================== */
.hero-content {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 95px 24px 36px 24px;
  pointer-events: none;
  z-index: 10;
}

/* Top Typography Section */
.title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
}

.header-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.main-header {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff2a8 0%, #ffd700 35%, #d4af37 65%, #fff6cc 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 16px rgba(255, 215, 0, 0.4));
  animation: shineGold 8s linear infinite;
  text-align: center;
}

@keyframes shineGold {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Glowing Gold Heart Outline */
.glowing-heart {
  width: clamp(24px, 3.5vw, 38px);
  height: clamp(24px, 3.5vw, 38px);
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glowing-heart:hover {
  transform: scale(1.25) rotate(-5deg);
}

.glowing-heart path {
  fill: none;
  stroke: url(#heartGoldGrad);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.75));
  animation: pulseHeart 2.2s ease-in-out infinite;
}

@keyframes pulseHeart {
  0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6)); }
  14% { transform: scale(1.18); filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.95)); }
  28% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6)); }
  42% { transform: scale(1.12); filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)); }
  70% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6)); }
}

/* Sub-Header: Sweet 47 */
.sub-header {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 400;
  color: var(--ivory-pure);
  text-shadow: 0 0 20px rgba(255, 235, 150, 0.5), 0 2px 4px rgba(0, 0, 0, 0.6);
  margin-top: -6px;
  letter-spacing: 0.02em;
  transform: rotate(-2deg);
}

/* Bottom Burmese Text & Interactive Controls */
.bottom-controls-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  pointer-events: auto;
  margin-bottom: 8px;
}

/* Burmese Typography Integration */
.burmese-blessing {
  font-family: var(--font-burmese);
  font-size: clamp(1.2rem, 2.5vw, 1.85rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  background: linear-gradient(135deg, #fffdf2 0%, #ffd966 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(212, 175, 55, 0.35));
  padding: 6px 18px;
  border-radius: 16px;
  background-color: rgba(22, 7, 38, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.burmese-subtext {
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: rgba(255, 253, 245, 0.6);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -12px;
}

/* ==========================================================================
   INTERACTIVE CANDLE BUTTON (မီးရှုက်ပါ)
   ========================================================================== */
.light-candle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 34px;
  font-family: var(--font-burmese);
  font-size: 1.15rem;
  font-weight: 600;
  color: #16042a;
  background: linear-gradient(135deg, #ffea8a 0%, #ffd700 45%, #d4af37 85%, #b8860b 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 28px rgba(255, 215, 0, 0.55), 0 8px 24px rgba(22, 7, 40, 0.7), inset 0 2px 2px rgba(255, 255, 255, 0.7);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.light-candle-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 65%);
  transform: scale(0);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.light-candle-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 45px rgba(255, 215, 0, 0.8), 0 12px 30px rgba(168, 85, 247, 0.4), inset 0 2px 2px #fff;
}

.light-candle-btn:hover::before {
  transform: scale(1);
}

.light-candle-btn:active {
  transform: translateY(1px) scale(0.98);
}

.light-candle-btn.lit {
  background: linear-gradient(135deg, #7e22ce 0%, #a855f7 50%, #d4af37 100%);
  color: #ffffff;
  box-shadow: 0 0 35px rgba(168, 85, 247, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.btn-arrow-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.light-candle-btn:hover .btn-arrow-icon {
  transform: translateX(4px);
}

.btn-arrow-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
}

/* ==========================================================================
   SLIDE-OVER / MODAL PANELS (GALLERY & WISHES)
   ========================================================================== */
.content-panel {
  position: fixed;
  top: 90px;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  width: min(92vw, 840px);
  background: rgba(18, 6, 32, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(168, 85, 247, 0.2);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.content-panel.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.panel-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-panel-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--ivory-pure);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.close-panel-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  color: var(--gold-light);
  transform: rotate(90deg);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar */
.panel-body::-webkit-scrollbar {
  width: 6px;
}
.panel-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}
.panel-body::-webkit-scrollbar-thumb {
  background: var(--gold-primary);
  border-radius: 10px;
}

/* ==========================================================================
   SWEET MEMORIES GALLERY
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.polaroid-card {
  background: #ffffff;
  padding: 12px 12px 24px 12px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  border: 2px solid #ecdca0;
  transition: all 0.35s ease;
  transform: rotate(var(--rot, 0deg));
  cursor: pointer;
  color: #2b1145;
}

.polaroid-card:hover {
  transform: scale(1.06) rotate(0deg) !important;
  z-index: 10;
  box-shadow: 0 18px 40px rgba(212, 175, 55, 0.45);
}

.polaroid-img-box {
  width: 100%;
  aspect-ratio: 1;
  background: #1e0a35;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.polaroid-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gold-light);
  padding: 16px;
  text-align: center;
}

.polaroid-placeholder svg {
  width: 36px;
  height: 36px;
  stroke: var(--gold-primary);
}

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.45rem;
  text-align: center;
  margin-top: 12px;
  color: #3b1668;
}

.gallery-upload-zone {
  border: 2px dashed rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-upload-zone:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-bright);
}

/* ==========================================================================
   HEARTFELT WISHES SECTION
   ========================================================================== */
.wishes-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wish-composer {
  background: rgba(43, 16, 75, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 20px;
}

.composer-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.wish-input-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.wish-input {
  background: rgba(10, 3, 20, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ivory-pure);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s;
}

.wish-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.wish-author {
  flex: 1;
}

.wish-textarea {
  width: 100%;
  height: 75px;
  resize: none;
  margin-bottom: 12px;
  font-family: var(--font-burmese);
}

.send-wish-btn {
  background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
  color: #120422;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 20px;
  padding: 9px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.send-wish-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
}

.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wish-card {
  background: linear-gradient(135deg, rgba(38, 14, 66, 0.6) 0%, rgba(20, 7, 36, 0.8) 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-left: 4px solid var(--gold-bright);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s, border-color 0.2s;
}

.wish-card:hover {
  transform: translateX(4px);
  border-color: var(--gold-light);
}

.wish-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wish-card-author {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gold-light);
}

.wish-card-heart-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  transition: color 0.2s, transform 0.2s;
}

.wish-card-heart-btn:hover {
  color: #ff4081;
  transform: scale(1.15);
}

.wish-card-heart-btn.liked {
  color: #ff4081;
}

.wish-card-text {
  font-family: var(--font-burmese);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ivory-soft);
}

/* ==========================================================================
   CONFETTI CANVAS & CELEBRATION EFFECTS
   ========================================================================== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}

/* ==========================================================================
   RESPONSIVE DESIGN FOR ALL SCREENS
   ========================================================================== */
@media (max-width: 768px) {
  .floating-header {
    top: 14px;
  }
  
  .floating-nav {
    padding: 4px 8px;
    gap: 4px;
  }

  .nav-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .hero-content {
    padding: 75px 16px 20px 16px;
  }

  .main-header {
    font-size: 1.55rem;
    letter-spacing: 0.1em;
  }

  .sub-header {
    font-size: 2.3rem;
  }

  .burmese-blessing {
    font-size: 1.15rem;
    padding: 6px 12px;
  }

  .light-candle-btn {
    padding: 12px 26px;
    font-size: 1.05rem;
  }

  .content-panel {
    width: 95vw;
    top: 75px;
    bottom: 16px;
    padding: 20px 16px;
  }
}
