/* ═══════════════════════════════════════════
   BIRTHDAY WEBSITE — Master Stylesheet
   ═══════════════════════════════════════════ */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: #0b0b1a;
  color: #fff;
  overflow-x: hidden;
}

::selection { background: var(--primary); color: #fff; }

/* ── THREE.JS CANVAS ── */
#three-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ── CSS VARIABLES (default theme) ── */
:root {
  --primary: #ff6f91;
  --secondary: #ce93d8;
  --accent: #ffc3a0;
  --bg: #0b0b1a;
  --bg2: #111126;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,111,145,0.2);
  --text: #fff;
  --text-dim: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --btn-bg: linear-gradient(135deg, #ff6f91, #ce93d8);
  --btn-shadow: rgba(255,111,145,0.3);
  transition: --primary 0.8s ease, --secondary 0.8s ease;
}

/* ── UTILITY ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  transition: color 0.6s ease;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 60%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background 0.6s ease;
}

.section-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
  transition: color 0.6s ease;
}

/* ── THEME BADGE ── */
.theme-badge {
  position: fixed;
  top: 24px; right: 24px;
  z-index: 999;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 60px;
  padding: 8px 18px 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  transition: 0.4s;
  pointer-events: none;
}
.theme-badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transition: background 0.6s ease;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.hero-inner {
  text-align: center;
  padding: 20px;
  animation: heroIn 1.2s ease;
  position: relative;
  z-index: 2;
}
@keyframes heroIn {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--primary) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  padding: 6px 24px;
  border-radius: 100px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 600;
  transition: all 0.6s ease;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1.1;
  margin-bottom: 10px;
}
.hero h1 .age {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  transition: background 0.6s ease;
}
.hero h1 .age::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 2px;
  transition: background 0.6s ease;
}
.hero-name {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-dim);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 24px;
  transition: color 0.6s ease;
}
.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  padding: 12px 30px;
  border-radius: 60px;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  transition: all 0.6s ease;
}
.hero-date strong { color: #fff; font-weight: 600; }

/* ── CAKE GIF ── */
.cake-wrap {
  margin: 10px 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cake-gif {
  width: 140px;
  height: auto;
  image-rendering: auto;
  filter: drop-shadow(0 0 20px rgba(255,111,145,0.3));
  animation: cakeFloat 3s ease-in-out infinite;
}
@keyframes cakeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ── COUNTDOWN ── */
.countdown-wrap {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.cd-item {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 20px;
  min-width: 76px;
  transition: 0.3s, background 0.6s ease, border 0.6s ease;
}
.cd-item:hover {
  background: var(--surface-hover);
  transform: translateY(-4px);
}
.cd-item .num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: background 0.6s ease;
}
.cd-item .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 2px;
  transition: color 0.6s ease;
}

.hero-cta {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 36px;
  border-radius: 60px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: 0.3s;
}
.hero-cta:hover {
  background: var(--surface-hover);
  color: #fff;
}

/* ── SECTION COMMON ── */
section {
  position: relative;
  z-index: 1;
  padding: 50px 0;
  transition: background 0.8s ease;
}
section:nth-child(even) { background: var(--bg2); }

/* ── MUSIC SECTION ── */
.music-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  max-width: 650px;
  margin: 0 auto;
  padding: 0 16px;
}
.music-card {
  flex: 1;
  min-width: 0;
}
.wishes-ticker {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(12px);
  transition: all 0.6s ease;
  height: 130px;
}
.wishes-ticker::before,
.wishes-ticker::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 40px;
  z-index: 2;
  pointer-events: none;
}
.wishes-ticker::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg), transparent);
}
.wishes-ticker::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg), transparent);
}
.ticker-track {
  animation: scrollUp 20s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}
.ticker-item {
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dim);
  transition: all 0.6s ease;
}
.ticker-item .ticker-icon {
  margin-right: 6px;
}
@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@media (max-width: 768px) {
  .music-row {
    flex-direction: column;
    gap: 12px;
    align-items: normal;
  }
  .music-card {
    flex: none;
  }
  .wishes-ticker {
    height: 110px;
    flex: none;
    overflow: hidden;
  }
}

.music-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  max-width: 380px;
  margin: 0 auto;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: all 0.6s ease;
}
.music-card .icon { font-size: 2.6rem; margin-bottom: 10px; display: block; }
.music-card .track-name {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  font-weight: 300;
  transition: color 0.6s ease;
}
.music-controls {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.music-controls button {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  color: #fff; width: 48px; height: 48px;
  border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; transition: 0.3s, background 0.6s ease, border 0.6s ease;
  display: flex; align-items: center; justify-content: center;
}
.music-controls button:hover {
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  transform: scale(1.1);
}
.music-controls .play-btn {
  width: 62px; height: 62px;
  background: var(--btn-bg); border: none;
  font-size: 1.4rem;
  box-shadow: 0 8px 30px var(--btn-shadow);
  transition: all 0.6s ease;
}
.music-controls .play-btn:hover {
  box-shadow: 0 12px 40px var(--btn-shadow);
  transform: scale(1.08);
}
.music-progress {
  margin-top: 18px; height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
.music-progress .bar {
  height: 100%; width: 0%;
  background: var(--btn-bg);
  border-radius: 4px;
  transition: width 0.3s, background 0.6s ease;
}
.music-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 1px;
  transition: color 0.6s ease;
}

/* ── PHOTO GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 14px;
}
.photo-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-wrapper .photo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid var(--border);
  background: var(--surface);
}
.photo-wrapper .photo-card:hover {
  transform: scale(1.04);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  border-color: var(--border-hover);
  z-index: 10;
}
.photo-wrapper .photo-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: 0.5s;
}
.photo-wrapper .photo-card:hover img { transform: scale(1.1); }
.photo-wrapper .photo-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--primary) 40%, transparent), transparent);
  opacity: 0;
  transition: 0.3s;
}
.photo-wrapper .photo-card:hover .overlay { opacity: 1; }
.photo-wrapper:nth-child(1) .photo-card { aspect-ratio: auto; height: 100%; }
.photo-wrapper:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.photo-wrapper:nth-child(6) { grid-column: span 2; }

.photo-caption {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.5;
  text-align: center;
  padding: 0 4px;
  transition: color 0.6s ease;
  letter-spacing: 0.3px;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  padding-left: 40px;
  max-width: 700px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--primary), var(--secondary), transparent);
  transition: background 0.8s ease;
}
.timeline-item {
  position: relative;
  margin-bottom: 40px;
  animation: fadeSlide 0.6s ease backwards;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent);
  transition: all 0.6s ease;
}
.timeline-item .tl-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #fff; margin-bottom: 4px;
}
.timeline-item .tl-text {
  color: var(--text-dim);
  font-size: 0.9rem; line-height: 1.6; font-weight: 300;
}
@keyframes fadeSlide {
  0%   { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ── WISH ── */
.wish-form { max-width: 500px; margin: 0 auto; }
.wish-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 120px;
  outline: none;
  transition: 0.3s;
}
.wish-form textarea:focus {
  border-color: color-mix(in srgb, var(--primary) 30%, transparent);
  background: rgba(255,255,255,0.06);
}
.wish-form textarea::placeholder { color: rgba(255,255,255,0.2); }
.wish-form button {
  margin-top: 14px;
  background: var(--btn-bg);
  border: none; color: #fff;
  padding: 14px 40px;
  border-radius: 60px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s, background 0.6s ease;
  letter-spacing: 0.5px;
}
.wish-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px var(--btn-shadow);
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.15);
  font-size: 0.8rem;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.4s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lightbox.open img { transform: scale(1); }
.lightbox .close-lb {
  position: absolute;
  top: 30px; right: 40px;
  font-size: 2rem;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  background: none;
  border: none;
  transition: 0.3s;
}
.lightbox .close-lb:hover { color: #fff; transform: rotate(90deg); }

/* ── CONFETTI ── */
.confetti-piece {
  position: fixed;
  top: -10px;
  z-index: 9999;
  pointer-events: none;
  animation: confettiDrop linear forwards;
}
@keyframes confettiDrop {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .photo-wrapper:nth-child(1) { grid-column: span 1; grid-row: span 1; }
  .photo-wrapper:nth-child(6) { grid-column: span 1; }
  .photo-caption { font-size: 0.75rem; }
}
@media (max-width: 600px) {
  section { padding: 60px 0; }
  .cd-item { padding: 10px 14px; min-width: 62px; }
  .cd-item .num { font-size: 1.4rem; }
  .music-card { padding: 24px 18px; }
  .theme-badge { top: 12px; right: 12px; font-size: 0.6rem; padding: 4px 10px; }
}
