/* ==========================================================================
   Birthday Greeting Page - Main Styles
   Base styles, typography, colors, and section layouts
   ========================================================================== */

/* ==========================================================================
   Google Fonts Import
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Nunito:wght@300;400;600;700&display=swap');

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #F2A2B3;
  --color-secondary: #B8860B;
  --color-accent: #E6E6FA;
  --color-background: #FFF5F5;
  --color-text: #2D2D2D;

  /* Derived colors */
  --color-primary-light: #f8c9d4;
  --color-primary-dark: #8b4557;
  --color-secondary-dark: #7B5B00;
  --color-secondary-light: #d4a843;
  --color-accent-dark: #c4c4e8;
  --color-white: #ffffff;
  --color-overlay: rgba(45, 45, 45, 0.7);

  /* Typography */
  --font-display: 'Dancing Script', 'Segoe Script', cursive;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-hero: calc(var(--font-size-base) * 3);
  --font-size-name: calc(var(--font-size-base) * 2);

  /* Spacing */
  --section-padding: 80px 16px;
  --content-max-width: 1200px;
  --mobile-padding: 16px;

  /* Animation */
  --flip-duration: 800ms;
  --flip-perspective: 1000px;
  --scroll-anim-duration: 600ms;
  --particle-count: 50;
  --gradient-cycle: 6s;
  --hero-text-anim-duration: 1200ms;

  /* Interaction */
  --touch-target-min: 44px;
  --hover-transition: 300ms ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-hero);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

p {
  margin-bottom: 1rem;
  font-size: var(--font-size-base);
}

/* ==========================================================================
   Section Base Styles
   ========================================================================== */
.section {
  padding: var(--section-padding);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-secondary-dark);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-padding);
  background: linear-gradient(
    135deg,
    var(--color-background) 0%,
    var(--color-primary-light) 25%,
    var(--color-accent) 50%,
    var(--color-primary-light) 75%,
    var(--color-background) 100%
  );
  background-size: 400% 400%;
  animation: gradientShift var(--gradient-cycle) ease infinite;
  overflow: hidden;
  z-index: 1;
  /* Never hide hero - always visible */
  opacity: 1 !important;
  visibility: visible !important;
}

.hero .section__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Hero top decoration: balloons and garland */
.hero__top-decor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.hero__balloon {
  font-size: 2.5rem;
  display: inline-block;
  animation: floatUpDown 3s ease-in-out infinite;
}

.hero__balloon--1 {
  animation-delay: 0s;
  position: relative;
  left: -2rem;
}

.hero__balloon--2 {
  animation-delay: 0.4s;
  font-size: 3rem;
  margin-top: -1rem;
}

.hero__balloon--3 {
  animation-delay: 0.8s;
  position: relative;
  left: 2rem;
  margin-top: -1rem;
}

.hero__garland {
  font-size: 1.1rem;
  letter-spacing: 0.4rem;
  color: var(--color-secondary-dark);
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* Hero profile photo - circular with decorative border */
.hero__photo-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-white);
  box-shadow: 0 8px 24px rgba(232, 143, 172, 0.35), 0 0 0 4px var(--color-primary);
  margin-bottom: 1.5rem;
  animation: floatUpDown 4s ease-in-out infinite;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--font-size-hero);
  color: var(--color-secondary-dark);
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--font-size-name);
  color: var(--color-secondary-dark);
  font-weight: 700;
}

.hero__name--animated {
  display: inline-block;
  animation: nameGlow var(--hero-text-anim-duration) ease-in-out infinite alternate;
}

.hero__date {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-primary-dark);
  margin-top: 1rem;
  font-weight: 600;
}


/* ==========================================================================
   Flip Card Section
   ========================================================================== */
.section--flipcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--section-padding);
  max-width: var(--content-max-width);
  margin: 0 auto;
}

/* Flip Card Container - provides perspective for 3D effect */
.flipcard {
  perspective: var(--flip-perspective);
  width: 100%;
  max-width: 500px;
  min-width: 280px;
  margin: 0 auto;
}

/* Inner wrapper - handles the 3D rotation */
.flipcard__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  transform-style: preserve-3d;
  transition:
    transform var(--flip-duration) ease-in-out,
    box-shadow var(--flip-duration) ease-in-out;
  cursor: pointer;
  border-radius: 16px;
  box-shadow:
    0 8px 24px rgba(242, 162, 179, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Hover lift effect */
.flipcard__inner:hover {
  box-shadow:
    0 12px 32px rgba(242, 162, 179, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Flipped state */
.flipcard__inner.is-flipped {
  transform: rotateY(180deg);
  box-shadow:
    0 8px 24px rgba(184, 134, 11, 0.2),
    0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Both faces share common styles */
.flipcard__face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Front face - card cover */
.flipcard__face--front {
  background: linear-gradient(
    160deg,
    var(--color-white) 0%,
    var(--color-primary-light) 50%,
    var(--color-accent) 100%
  );
  border: 2px solid var(--color-primary-light);
}

/* Back face - personalized message */
.flipcard__face--back {
  background: linear-gradient(
    160deg,
    var(--color-white) 0%,
    var(--color-accent) 50%,
    var(--color-primary-light) 100%
  );
  border: 2px solid var(--color-secondary-light);
  transform: rotateY(180deg);
  padding: 2rem;
}

/* Card front image */
.flipcard__image {
  width: 80%;
  max-height: 65%;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* Interactive hint text with pulse animation */
.flipcard__hint {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-primary-dark);
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.7);
  animation: flipcardPulse 2s ease-in-out infinite;
}

/* Birthday message on back face */
.flipcard__message {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  text-align: center;
  line-height: 1.8;
  max-height: 100%;
  overflow-y: auto;
}

.flipcard__message p {
  margin-bottom: 0.5rem;
}

/* Pulse animation for hint text */
@keyframes flipcardPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* ==========================================================================
   Wishes Section
   ========================================================================== */
.section--wishes {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.wishes-section {
  padding: var(--section-padding);
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center;
}

.wishes__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.wishes__heading::before,
.wishes__heading::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--font-size-lg);
  color: var(--color-primary);
  opacity: 0.7;
}

.wishes__heading::before {
  left: -2rem;
}

.wishes__heading::after {
  right: -2rem;
}

.wishes__content {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  line-height: 2;
  color: var(--color-text);
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 2.5rem;
  background: linear-gradient(
    135deg,
    var(--color-white) 0%,
    rgba(242, 162, 179, 0.05) 50%,
    rgba(230, 230, 250, 0.1) 100%
  );
  border-radius: 20px;
  box-shadow:
    0 4px 20px rgba(242, 162, 179, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-primary-light);
  position: relative;
}

.wishes__content::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
}

.wishes__content::after {
  content: '"';
  position: absolute;
  bottom: 0.5rem;
  right: 1.5rem;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
}

.wishes__content p {
  position: relative;
  z-index: 1;
  text-align: left;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.wishes__decorations {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 1.5rem;
}

.decoration {
  display: inline-block;
  animation: floatUpDown 3s ease-in-out infinite;
}

.decoration--flower { animation-delay: 0s; }
.decoration--heart { animation-delay: 0.5s; }
.decoration--star { animation-delay: 1s; }

/* Love Quote */
.wishes__quote {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  color: var(--color-secondary-dark);
  font-style: italic;
  border-left: 4px solid var(--color-primary);
  background: linear-gradient(90deg, rgba(242, 162, 179, 0.08) 0%, transparent 100%);
  border-radius: 0 12px 12px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.wishes__quote p {
  margin: 0;
  line-height: 1.8;
}

.wishes-section__message {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--color-text);
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--color-white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(242, 162, 179, 0.15);
  border: 1px solid var(--color-primary-light);
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.section--gallery {
  padding: var(--section-padding);
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.gallery__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  text-align: center;
  margin-bottom: 2rem;
  color: var(--color-secondary-dark);
}

/* Gallery Grid */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Gallery Item */
.gallery__item {
  list-style: none;
}

/* Image Wrapper - decorative frame container */
.gallery__image-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--color-white);
  border: 3px solid var(--color-primary-light);
  box-shadow: 0 4px 12px rgba(242, 162, 179, 0.15);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.gallery__image-wrapper:hover,
.gallery__image-wrapper:focus-visible {
  transform: scale(1.07);
  box-shadow:
    0 8px 24px rgba(242, 162, 179, 0.35),
    0 0 12px rgba(242, 162, 179, 0.2);
  outline: none;
}

.gallery__image-wrapper:active {
  transform: scale(1.02);
}

/* Gallery Image */
.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

/* Decorative frame overlay */
.gallery__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  border: 2px solid rgba(242, 162, 179, 0.2);
  pointer-events: none;
  box-shadow: inset 0 0 20px rgba(242, 162, 179, 0.08);
}

/* Error state for failed image loads */
.gallery__image-wrapper--error {
  border-color: var(--color-accent-dark);
  background-color: #f8e8ec;
}

.gallery__image-wrapper--error .gallery__image {
  object-fit: contain;
  padding: 1rem;
}

.gallery__image-wrapper--error .gallery__frame {
  border-color: rgba(196, 196, 232, 0.3);
}

/* ==========================================================================
   Lightbox Overlay
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.lightbox--active {
  display: flex;
}

.lightbox[aria-hidden="true"] {
  display: none;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

/* Lightbox Image */
.lightbox__image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Lightbox Close Button */
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
  z-index: 10;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Lightbox Navigation Buttons */
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
  z-index: 10;
}

.lightbox__prev {
  left: 1rem;
}

.lightbox__next {
  right: 1rem;
}

.lightbox__prev:hover,
.lightbox__prev:focus-visible,
.lightbox__next:hover,
.lightbox__next:focus-visible {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.section--footer {
  position: relative;
  background: linear-gradient(
    180deg,
    var(--color-background) 0%,
    var(--color-primary-light) 100%
  );
  border-top: 1px solid rgba(242, 162, 179, 0.2);
}

.footer {
  padding: var(--section-padding);
  max-width: var(--content-max-width);
  margin: 0 auto;
  text-align: center;
  color: var(--color-text);
}

.footer__message {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-secondary-dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.footer__message::before {
  content: '— ';
  opacity: 0.5;
}

.footer__message::after {
  content: ' —';
  opacity: 0.5;
}

.footer__copyright {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  opacity: 0.6;
  margin-top: 0.5rem;
}

.footer__love-note {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
  opacity: 0.9;
}

.footer__attribution {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  opacity: 0.7;
}

/* ==========================================================================
   Gradient Background Animation (Hero)
   ========================================================================== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ==========================================================================
   Name Decorative Animation
   ========================================================================== */
@keyframes nameGlow {
  0% {
    text-shadow:
      0 0 4px rgba(184, 134, 11, 0.3),
      0 0 8px rgba(242, 162, 179, 0.2);
  }
  100% {
    text-shadow:
      0 0 8px rgba(184, 134, 11, 0.5),
      0 0 16px rgba(242, 162, 179, 0.4),
      0 0 24px rgba(230, 230, 250, 0.3);
  }
}

/* ==========================================================================
   Canvas Particle Layer
   ========================================================================== */
.particles-canvas,
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Music Button (Floating)
   ========================================================================== */
.music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  min-height: var(--touch-target-min);
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(242, 162, 179, 0.4);
  z-index: 1000;
  transition: transform var(--hover-transition), box-shadow var(--hover-transition);
}

.music-btn:hover,
.music-btn:focus {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(242, 162, 179, 0.6);
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

.music-btn--hidden {
  display: none;
}

/* ==========================================================================
   Cursor Follower
   ========================================================================== */
.cursor-follower {
  position: fixed;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  transition: transform 150ms ease-out;
  opacity: 0.8;
}

/* ==========================================================================
   Intro Overlay
   ========================================================================== */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFF0F3 0%, #F8C9D4 50%, #F3E5F5 100%);
  cursor: pointer;
}

.intro-overlay--hidden {
  display: none;
}

.intro-overlay__content {
  text-align: center;
  animation: floatUpDown 3s ease-in-out infinite;
}

.intro-overlay__emoji {
  font-size: 5rem;
  display: block;
  margin-bottom: 1.5rem;
  animation: flipcardPulse 2s ease-in-out infinite;
}

.intro-overlay__text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--color-secondary-dark);
  margin-bottom: 0.5rem;
}

.intro-overlay__subtext {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-primary-dark);
  opacity: 0.8;
  animation: flipcardPulse 2s ease-in-out infinite;
  margin-top: 1rem;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible styles for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Ensure minimum contrast for links */
a:visited {
  color: var(--color-secondary-dark);
}


/* ==========================================================================
   Decorative Floating Elements - Section Positioning
   Consistent visual theme using CSS custom properties
   Requirements: 1.3, 1.2
   ========================================================================== */

/* Hero section decoratives need relative parent for absolute positioning */
.section--hero {
  position: relative;
  overflow: hidden;
}

/* Hero decorations positioning */
.decor-hero {
  font-size: 1.5rem;
  opacity: 0.7;
  z-index: 1;
}

.decor-hero--1 {
  top: 10%;
  left: 8%;
  font-size: 1.8rem;
}

.decor-hero--2 {
  top: 15%;
  right: 10%;
  font-size: 1.2rem;
}

.decor-hero--3 {
  bottom: 25%;
  left: 5%;
  font-size: 1.6rem;
}

.decor-hero--4 {
  bottom: 15%;
  right: 8%;
  font-size: 1.4rem;
}

.decor-hero--5 {
  top: 40%;
  left: 3%;
  font-size: 1rem;
}

.decor-hero--6 {
  top: 35%;
  right: 5%;
  font-size: 1.5rem;
}

/* Wishes section decoratives */
.decor-wishes {
  font-size: 1.4rem;
  opacity: 0.6;
  z-index: 1;
}

.decor-wishes--1 {
  top: 10%;
  left: 5%;
  font-size: 1.6rem;
}

.decor-wishes--2 {
  top: 20%;
  right: 6%;
  font-size: 1.3rem;
}

.decor-wishes--3 {
  bottom: 15%;
  left: 8%;
  font-size: 1.5rem;
}

.decor-wishes--4 {
  bottom: 10%;
  right: 4%;
  font-size: 1.2rem;
}

/* Gallery section decoratives */
.section--gallery {
  position: relative;
  overflow: hidden;
}

.decor-gallery {
  font-size: 1.3rem;
  opacity: 0.5;
  z-index: 1;
}

.decor-gallery--1 {
  top: 5%;
  right: 8%;
  font-size: 1.2rem;
}

.decor-gallery--2 {
  top: 50%;
  left: 3%;
  font-size: 1.5rem;
}

.decor-gallery--3 {
  bottom: 8%;
  right: 5%;
  font-size: 1.1rem;
}

/* ==========================================================================
   Countdown / Age Counter Section
   ========================================================================== */
.section--countdown {
  text-align: center;
  padding: 60px 16px;
}

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.countdown__label {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  opacity: 0.8;
}

.countdown__number {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: var(--color-secondary-dark);
  line-height: 1;
  text-shadow: 0 4px 12px rgba(196, 125, 46, 0.2);
}

.countdown__subtitle {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-primary-dark);
}

/* ==========================================================================
   Blow Candle Section
   ========================================================================== */
.section--candle {
  text-align: center;
  padding: 60px 16px;
}

.candle__instruction {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  margin-bottom: 2rem;
}

.candle__scene {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 200px;
  cursor: pointer;
}

.candle__cake {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candle__stick {
  width: 12px;
  height: 80px;
  background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.candle__flame {
  font-size: 2.5rem;
  position: absolute;
  top: -35px;
  animation: flameFlicker 0.5s ease-in-out infinite alternate;
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: pointer;
}

.candle__flame--blown {
  opacity: 0;
  transform: scale(0) translateY(-20px);
}

.candle__wish-text {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-secondary-dark);
  margin-top: 2rem;
  animation: bounceIn 0.8s ease-out;
}

.candle__post-blow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  animation: fadeIn 1s ease-out 0.5s both;
}

.candle__post-emoji {
  font-size: 2rem;
}

.candle__post-message {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  opacity: 0.8;
}

.candle__continue-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary) 0%, #FF69B4 100%);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(232, 143, 172, 0.3);
  transition: transform 250ms ease, box-shadow 250ms ease;
  min-height: var(--touch-target-min);
  margin-top: 0.5rem;
}

.candle__continue-btn:hover,
.candle__continue-btn:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(232, 143, 172, 0.45);
}

/* ==========================================================================
   Confetti Cannon Section
   ========================================================================== */
.section--confetti {
  text-align: center;
  padding: 40px 16px;
}

.confetti-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-primary) 0%, #FF69B4 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(232, 143, 172, 0.4);
  transition: transform 300ms ease, box-shadow 300ms ease;
  min-height: var(--touch-target-min);
}

.confetti-btn:hover,
.confetti-btn:focus-visible {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 30px rgba(232, 143, 172, 0.5);
}

.confetti-btn:active {
  transform: scale(0.95);
}

.confetti-btn__icon {
  font-size: 1.5rem;
  display: inline-block;
  animation: bounceIn 1s ease-out infinite alternate;
}

/* ==========================================================================
   Hero Scroll Indicator
   ========================================================================== */
.hero__scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  opacity: 0.7;
  animation: scrollBounce 2s ease-in-out infinite;
  z-index: 10;
}

.hero__scroll-arrow {
  font-size: 1.5rem;
  color: var(--color-secondary-dark);
  background-color: rgba(255, 240, 243, 0.7);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__scroll-text {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  opacity: 0.8;
  background-color: rgba(255, 240, 243, 0.6);
  padding: 2px 8px;
  border-radius: 8px;
}

/* ==========================================================================
   Love Meter Section
   ========================================================================== */
.section--love-meter {
  text-align: center;
  padding: 60px 16px;
}

.love-meter__title {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  margin-bottom: 2rem;
}

.love-meter__bar-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.love-meter__bar {
  flex: 1;
  height: 24px;
  background-color: rgba(232, 143, 172, 0.15);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--color-primary-light);
}

.love-meter__fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #FF69B4 0%, #FF1493 50%, #E88FAC 100%);
  border-radius: 10px;
  transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.love-meter__percent {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-secondary-dark);
  min-width: 60px;
}

.love-meter__label {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  opacity: 0.8;
  margin-bottom: 1rem;
  min-height: 1.5em;
}

.love-meter__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-white);
  background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
  transition: transform 250ms ease, box-shadow 250ms ease;
  min-height: var(--touch-target-min);
}

.love-meter__btn:hover,
.love-meter__btn:focus-visible {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.45);
}

.love-meter__btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
}

/* ==========================================================================
   Timeline / Memories Section
   ========================================================================== */
.section--timeline {
  padding: 80px 16px;
  overflow: hidden;
}

.timeline__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  text-align: center;
  color: var(--color-secondary-dark);
  margin-bottom: 3rem;
}

.timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Center line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline__item {
  position: relative;
  width: 50%;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.timeline__item--left {
  padding-right: 2.5rem;
  text-align: right;
}

.timeline__item--right {
  margin-left: 50%;
  padding-left: 2.5rem;
  text-align: left;
}

/* Dot on the timeline */
.timeline__item::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background-color: var(--color-primary);
  border: 3px solid var(--color-white);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.timeline__item--left::after {
  right: -7px;
}

.timeline__item--right::after {
  left: -7px;
}

.timeline__card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(232, 143, 172, 0.12);
  border: 1px solid var(--color-primary-light);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.timeline__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(232, 143, 172, 0.2);
}

.timeline__icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

.timeline__text {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
}

/* Mobile: stack timeline items */
@media screen and (max-width: 600px) {
  .timeline::before {
    left: 20px;
  }

  .timeline__item {
    width: 100%;
    padding-left: 50px;
    padding-right: 1rem;
    text-align: left;
  }

  .timeline__item--left {
    padding-right: 1rem;
    text-align: left;
  }

  .timeline__item--right {
    margin-left: 0;
    padding-left: 50px;
  }

  .timeline__item::after {
    left: 13px;
    right: auto;
  }

  .timeline__item--left::after {
    right: auto;
    left: 13px;
  }
}

/* ==========================================================================
   Page Progress Bar
   ========================================================================== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary) 0%, #FF69B4 50%, var(--color-secondary) 100%);
  z-index: 99999;
  transition: width 100ms linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(232, 143, 172, 0.5);
}

/* ==========================================================================
   Countdown to Birthday
   ========================================================================== */
.countdown-birthday {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(232, 143, 172, 0.12);
  border: 1px solid var(--color-primary-light);
}

.countdown-birthday__label {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.countdown-birthday__timer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.countdown-birthday__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.countdown-birthday__value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-secondary-dark);
  line-height: 1;
  min-width: 50px;
}

.countdown-birthday__name {
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  opacity: 0.7;
}

.countdown-birthday__passed {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-secondary-dark);
  margin-top: 1rem;
}

/* ==========================================================================
   Scratch Card / Gift Box
   ========================================================================== */
.section--scratch {
  text-align: center;
  padding: 60px 16px;
}

.scratch__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  margin-bottom: 0.5rem;
}

.scratch__instruction {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  opacity: 0.8;
  margin-bottom: 2rem;
}

.scratch__gift-box {
  display: inline-block;
  cursor: pointer;
  padding: 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.05) 0%, rgba(243, 229, 245, 0.3) 100%);
  border: 2px dashed var(--color-primary);
  transition: transform 300ms ease, box-shadow 300ms ease;
  min-width: 200px;
}

.scratch__gift-box:hover,
.scratch__gift-box:focus-visible {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(232, 143, 172, 0.25);
}

.scratch__gift-closed {
  position: relative;
}

.scratch__gift-emoji {
  font-size: 5rem;
  display: block;
  animation: bounceIn 1s ease-out infinite alternate;
}

.scratch__gift-sparkle {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.5rem;
  animation: twinkle 1.5s ease-in-out infinite;
}

.scratch__gift-opened {
  animation: bounceIn 0.8s ease-out;
}

.scratch__gift-reveal-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

.scratch__gift-message {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-secondary-dark);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.scratch__gift-message strong {
  color: #FF1493;
  font-size: 1.3em;
}

.scratch__gift-sub {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  opacity: 0.8;
}

/* ==========================================================================
   Gallery Masonry-style layout
   ========================================================================== */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 1rem;
}

/* Make some items span 2 rows for masonry effect */
.gallery__item:nth-child(1) { grid-row: span 2; }
.gallery__item:nth-child(4) { grid-row: span 2; }

.gallery__image-wrapper {
  height: 100%;
}

.gallery__image {
  height: 100%;
}

/* ==========================================================================
   Handwriting Card Section
   ========================================================================== */
.section--handwriting {
  padding: 60px 16px;
  text-align: center;
}

.handwriting__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  margin-bottom: 0.5rem;
}

.handwriting__instruction {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.handwriting__card {
  display: inline-block;
  background: var(--color-white);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 32px rgba(232, 143, 172, 0.15);
  border: 2px solid var(--color-primary-light);
  max-width: 100%;
}

.handwriting__canvas {
  display: block;
  width: 100%;
  max-width: 600px;
  height: 350px;
  border-radius: 12px;
  background: linear-gradient(180deg, #FFFAF0 0%, #FFF5F5 100%);
  cursor: crosshair;
  touch-action: none;
  border: 1px solid rgba(232, 143, 172, 0.2);
}

.handwriting__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.handwriting__color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease;
}

.handwriting__color-btn:hover {
  transform: scale(1.15);
}

.handwriting__color-btn--active {
  border-color: var(--color-secondary-dark);
  transform: scale(1.1);
}

.handwriting__separator {
  width: 1px;
  height: 24px;
  background-color: var(--color-primary-light);
  margin: 0 0.25rem;
}

.handwriting__tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-primary-light);
  background: var(--color-white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, transform 200ms ease;
}

.handwriting__tool-btn:hover {
  background: rgba(232, 143, 172, 0.1);
  transform: scale(1.1);
}

/* ==========================================================================
   Firework Show Section
   ========================================================================== */
.section--firework {
  padding: 40px 16px;
  text-align: center;
  position: relative;
  min-height: 450px;
  overflow: hidden;
}

.firework__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  margin-bottom: 1rem;
}

.firework__canvas {
  width: 100%;
  height: 400px;
  max-width: 800px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: block;
  margin: 0 auto;
}

.firework__message {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-secondary-dark);
  margin-top: 1.5rem;
  animation: bounceIn 0.8s ease-out;
}

/* ==========================================================================
   Quiz - Anh Biết Em
   ========================================================================== */
.section--quiz {
  padding: 60px 16px;
  text-align: center;
}

.quiz__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  margin-bottom: 2rem;
}

.quiz__card {
  background: var(--color-white);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(232, 143, 172, 0.12);
  border: 1px solid var(--color-primary-light);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.quiz__question {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  font-weight: 600;
  margin: 0;
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 350px;
}

.quiz__option-btn {
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: rgba(232, 143, 172, 0.06);
  border: 2px solid var(--color-primary-light);
  border-radius: 12px;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: left;
}

.quiz__option-btn:hover {
  background: rgba(232, 143, 172, 0.15);
  border-color: var(--color-primary);
  transform: translateX(4px);
}

.quiz__option-btn--correct {
  background: rgba(76, 175, 80, 0.15) !important;
  border-color: #4CAF50 !important;
}

.quiz__option-btn--wrong {
  background: rgba(244, 67, 54, 0.1) !important;
  border-color: #F44336 !important;
  opacity: 0.7;
}

.quiz__reveal {
  font-family: var(--font-display);
  font-size: var(--font-size-base);
  color: var(--color-secondary-dark);
  padding: 0.75rem;
  background: rgba(232, 143, 172, 0.08);
  border-radius: 10px;
  margin: 0;
}

.quiz__next-btn {
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-primary);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 200ms ease;
}

.quiz__next-btn:hover {
  transform: scale(1.05);
}

.quiz__progress {
  max-width: 500px;
  margin: 0 auto;
}

.quiz__progress-text {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  opacity: 0.7;
  display: block;
  margin-bottom: 0.5rem;
}

.quiz__progress-bar {
  height: 6px;
  background: rgba(232, 143, 172, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.quiz__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), #FF69B4);
  border-radius: 3px;
  transition: width 400ms ease;
}

.quiz__result {
  text-align: center;
  padding: 2rem;
}

.quiz__result-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.quiz__result-text {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  color: var(--color-secondary-dark);
}

/* ==========================================================================
   Photo Stories (Instagram-style)
   ========================================================================== */
.section--stories {
  padding: 60px 16px;
  text-align: center;
}

.stories__heading {
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--color-secondary-dark);
  margin-bottom: 1.5rem;
}

.stories__viewer {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9/16;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.stories__progress-bar {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 10;
}

.stories__progress-segment {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.stories__progress-segment--active {
  background: rgba(255, 255, 255, 0.9);
}

.stories__progress-segment--fill {
  position: relative;
}

.stories__progress-segment--fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
  animation: storyFill 5s linear forwards;
}

@keyframes storyFill {
  from { width: 0%; }
  to { width: 100%; }
}

.stories__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.stories__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  text-align: left;
  z-index: 5;
}

.stories__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 8;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  transition: color 200ms ease;
}

.stories__nav:hover {
  color: #fff;
}

.stories__nav--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 0.5rem;
}

.stories__nav--next {
  right: 0;
  justify-content: flex-end;
  padding-right: 0.5rem;
}

/* ==========================================================================
   Avatar Stories Row (Instagram Highlights Style)
   ========================================================================== */
.section--avatar-stories {
  padding: 24px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.avatar-stories__row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0.5rem 0;
}

.avatar-stories__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.avatar-stories__item:hover {
  transform: scale(1.08);
}

.avatar-stories__ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #FF69B4 0%, #FFD700 50%, #E88FAC 100%);
  background-size: 200% 200%;
  animation: glowBorderRotate 3s ease infinite;
}

.avatar-stories__img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-white);
}

.avatar-stories__label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--color-text);
  opacity: 0.8;
  max-width: 68px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Lightbox for avatar click - reuses existing lightbox */
.avatar-stories__item:focus-visible .avatar-stories__ring {
  box-shadow: 0 0 0 3px var(--color-secondary);
}

/* ==========================================================================
   Countdown Top Section (after hero)
   ========================================================================== */
.section--countdown-top {
  padding: 24px 16px;
}

.section--countdown-top .countdown-birthday {
  margin-bottom: 0;
}
