/* ===================================
   For Tashu — Valentine Styles ❄️🔥
   =================================== */

/* CSS Variables - Winter Theme (Default) */
:root {
  --frosted-lavender: #E9E6F7;
  --pale-ice-blue: #E8F4FF;
  --misty-stone: #E6E6E8;
  --soft-rose: #F7D6DA;
  --pale-gold: #F3E8D9;
  
  /* Extended Palette */
  --deep-lavender: #B8B0D9;
  --warm-rose: #E4A5AE;
  --soft-shadow: rgba(0, 0, 0, 0.08);
  --text-primary: #3D3D4A;
  --text-secondary: #5A5A6E;
  --text-light: #7A7A8E;
  
  /* Theme Colors */
  --bg-gradient-1: var(--frosted-lavender);
  --bg-gradient-2: var(--pale-ice-blue);
  --bg-gradient-3: var(--misty-stone);
  --accent-color: var(--deep-lavender);
  --highlight-color: var(--warm-rose);
  
  /* Animation Timing */
  --transition-fast: 150ms;
  --transition-medium: 300ms;
  --transition-slow: 600ms;
}

/* Fire Theme */
body.fire-theme {
  --frosted-lavender: #2D1810;
  --pale-ice-blue: #3D1F15;
  --misty-stone: #1A0F0A;
  --soft-rose: #FF6B35;
  --pale-gold: #FFB347;
  --deep-lavender: #FF4500;
  --warm-rose: #FF6347;
  --text-primary: #FFF5E6;
  --text-secondary: #FFD4B8;
  --text-light: #E8C4A8;
  --bg-gradient-1: #1A0F0A;
  --bg-gradient-2: #2D1810;
  --bg-gradient-3: #3D1F15;
  --accent-color: #FF4500;
  --highlight-color: #FFD700;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.8s ease, color 0.5s ease;
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.reduce-motion *, 
.reduce-motion *::before, 
.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* Theme Switcher */
.theme-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  box-shadow: 0 4px 20px var(--soft-shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: 30px;
  background: transparent;
  cursor: pointer;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

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

.theme-btn.active {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body.fire-theme .theme-switcher {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 69, 0, 0.3);
}

body.fire-theme .theme-btn {
  color: var(--text-primary);
}

body.fire-theme .theme-btn.active {
  background: linear-gradient(135deg, #FF6B35 0%, #FFB347 100%);
  color: #1A0F0A;
}

.theme-btn span:first-child {
  font-size: 1.2rem;
}

.theme-label {
  font-style: italic;
  letter-spacing: 0.05em;
}

@media (max-width: 480px) {
  .theme-switcher {
    top: 10px;
    right: 10px;
    padding: 6px;
  }
  
  .theme-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
  
  .theme-label {
    display: none;
  }
}

/* Snowfall Canvas */
#snowfall {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--warm-rose), transparent);
  margin: 0.8rem auto 0;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 40px 20px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Letter A Placeholder */
.letter-placeholder {
  font-family: 'Cinzel', serif;
  font-size: 6rem;
  font-weight: 600;
  color: var(--text-primary);
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  background: linear-gradient(135deg, var(--pale-gold) 0%, var(--soft-rose) 50%, var(--frosted-lavender) 100%);
  border-radius: 50%;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.1),
    inset 0 0 30px rgba(255, 255, 255, 0.5);
  position: relative;
  animation: gentleFloat 6s ease-in-out infinite;
  transition: all 0.5s ease;
}

body.fire-theme .letter-placeholder {
  background: linear-gradient(135deg, #FF4500 0%, #FFD700 50%, #FF6B35 100%);
  box-shadow: 
    0 10px 40px rgba(255, 69, 0, 0.4),
    inset 0 0 30px rgba(255, 215, 0, 0.5),
    0 0 60px rgba(255, 69, 0, 0.3);
  animation: gentleFloat 6s ease-in-out infinite, fireGlow 2s ease-in-out infinite;
}

@keyframes fireGlow {
  0%, 100% {
    box-shadow: 
      0 10px 40px rgba(255, 69, 0, 0.4),
      inset 0 0 30px rgba(255, 215, 0, 0.5),
      0 0 60px rgba(255, 69, 0, 0.3);
  }
  50% {
    box-shadow: 
      0 10px 50px rgba(255, 69, 0, 0.6),
      inset 0 0 40px rgba(255, 215, 0, 0.7),
      0 0 80px rgba(255, 69, 0, 0.5);
  }
}

/* Photo Placeholder - replaces letter A */
.photo-placeholder {
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.15),
    0 0 0 4px rgba(255, 255, 255, 0.5),
    0 0 0 8px var(--deep-lavender);
  position: relative;
  animation: gentleFloat 6s ease-in-out infinite, photoGlow 4s ease-in-out infinite;
  transition: all 0.5s ease;
}

.photo-placeholder.large {
  width: 220px;
  height: 220px;
}

@media (max-width: 768px) {
  .photo-placeholder {
    width: 150px;
    height: 150px;
  }
  
  .photo-placeholder.large {
    width: 180px;
    height: 180px;
  }
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-placeholder:hover .profile-photo {
  transform: scale(1.1);
}

.bw-photo {
  filter: grayscale(0);
  transition: filter 0.5s ease, transform 0.5s ease;
}

.photo-placeholder:hover .bw-photo {
  filter: grayscale(0);
}

@keyframes photoGlow {
  0%, 100% {
    box-shadow: 
      0 10px 40px rgba(0, 0, 0, 0.15),
      0 0 0 4px rgba(255, 255, 255, 0.5),
      0 0 0 8px var(--deep-lavender);
  }
  50% {
    box-shadow: 
      0 15px 50px rgba(0, 0, 0, 0.2),
      0 0 0 4px rgba(255, 255, 255, 0.7),
      0 0 0 8px var(--warm-rose),
      0 0 30px rgba(228, 165, 174, 0.4);
  }
}

body.fire-theme .photo-placeholder {
  box-shadow: 
    0 10px 40px rgba(255, 69, 0, 0.3),
    0 0 0 4px rgba(255, 107, 53, 0.5),
    0 0 0 8px #FF4500;
  animation: gentleFloat 6s ease-in-out infinite, firePhotoGlow 2s ease-in-out infinite;
}

@keyframes firePhotoGlow {
  0%, 100% {
    box-shadow: 
      0 10px 40px rgba(255, 69, 0, 0.3),
      0 0 0 4px rgba(255, 107, 53, 0.5),
      0 0 0 8px #FF4500;
  }
  50% {
    box-shadow: 
      0 15px 50px rgba(255, 69, 0, 0.5),
      0 0 0 4px rgba(255, 215, 0, 0.7),
      0 0 0 8px #FFD700,
      0 0 40px rgba(255, 69, 0, 0.4);
  }
}

/* Side photo in note section */
.note-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.8);
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

.note-photo:hover {
  transform: scale(1.05);
}

.side-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.letter-placeholder.large {
  width: 200px;
  height: 200px;
  font-size: 7rem;
}

.sigil-container {
  position: relative;
  display: inline-block;
}

.sigil-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--soft-rose) 0%, transparent 70%);
  opacity: 0.6;
  animation: glowPulse 4s ease-in-out infinite;
  z-index: -1;
}

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

@keyframes glowPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

/* Title Styling */
.title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
  animation: fadeSlideUp 1.2s ease-out;
  transition: all 0.5s ease;
}

body.fire-theme .title {
  text-shadow: 2px 2px 20px rgba(255, 69, 0, 0.5);
}

.subtitle {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--warm-rose);
  animation: fadeSlideUp 1.2s ease-out 0.3s both, sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: fadeSlideUp 1.2s ease-out 0.6s both;
}

.scroll-indicator span {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  display: block;
  margin-bottom: 8px;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--deep-lavender);
  border-bottom: 2px solid var(--deep-lavender);
  transform: rotate(45deg);
  margin: 0 auto;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% {
    transform: rotate(45deg) translateY(0);
    opacity: 1;
  }
  50% {
    transform: rotate(45deg) translateY(8px);
    opacity: 0.6;
  }
}

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

/* ===================================
   SECTIONS
   =================================== */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

/* Reveal Animation */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   PARCHMENT STYLES
   =================================== */
.parchment {
  background: linear-gradient(180deg, #FFFEFA 0%, var(--pale-gold) 100%);
  border-radius: 8px;
  padding: 60px 50px;
  position: relative;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.08),
    inset 0 0 80px rgba(243, 232, 217, 0.5);
  max-width: 700px;
  margin: 0 auto;
  transition: all 0.5s ease;
}

body.fire-theme .parchment {
  background: linear-gradient(180deg, #2D1810 0%, #1A0F0A 100%);
  box-shadow: 
    0 15px 50px rgba(255, 69, 0, 0.2),
    inset 0 0 80px rgba(255, 69, 0, 0.1);
  border: 1px solid rgba(255, 69, 0, 0.3);
}

.parchment::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  border-radius: 8px;
}

/* Candle */
.candle-container {
  position: absolute;
  top: -30px;
  right: 40px;
}

.candle {
  width: 20px;
  height: 60px;
  background: linear-gradient(180deg, #F5E6D3 0%, #E8D5C4 100%);
  border-radius: 3px 3px 0 0;
  position: relative;
}

.flame {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 25px;
  background: radial-gradient(ellipse at bottom, #FFD700 0%, #FF8C00 40%, #FF4500 70%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker 0.8s ease-in-out infinite alternate;
  filter: blur(1px);
}

.flame::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 12px;
  background: radial-gradient(ellipse, #FFFACD 0%, #FFD700 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) scale(1) rotate(-2deg);
    opacity: 1;
  }
  25% {
    transform: translateX(-50%) scale(1.02) rotate(1deg);
  }
  50% {
    transform: translateX(-50%) scale(0.98) rotate(-1deg);
    opacity: 0.95;
  }
  75% {
    transform: translateX(-50%) scale(1.01) rotate(2deg);
  }
  100% {
    transform: translateX(-50%) scale(1) rotate(-1deg);
    opacity: 1;
  }
}

/* Letter Content */
.letter-content {
  font-size: 1.15rem;
  line-height: 2;
}

.letter-content p {
  margin-bottom: 1.5rem;
}

.salutation {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ===================================
   WINTER OF THE HEART
   =================================== */
.winter-heart {
  background: linear-gradient(180deg, transparent 0%, rgba(232, 244, 255, 0.3) 50%, transparent 100%);
}

.content-block {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.decorative-line {
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--deep-lavender), transparent);
  margin: 0 auto 2rem;
}

.quote {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text-secondary);
  padding: 30px 40px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  border-left: 3px solid var(--soft-rose);
  margin-bottom: 3rem;
}

.quote p {
  margin-bottom: 1rem;
}

.quote p:last-child {
  margin-bottom: 0;
}

/* Sigils Row */
.sigils-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.sigil-item {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--deep-lavender);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-medium);
  position: relative;
}

.sigil-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(184, 176, 217, 0.3);
  border-color: var(--warm-rose);
}

.sigil-item::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--text-primary);
  color: white;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.sigil-item:hover::after {
  opacity: 1;
}

.sigil-svg {
  width: 50px;
  height: 50px;
  color: var(--deep-lavender);
  transition: color var(--transition-medium);
}

.sigil-item:hover .sigil-svg {
  color: var(--warm-rose);
}

/* ===================================
   HOUSES AS EMOTIONS
   =================================== */
.houses-emotions {
  background: linear-gradient(180deg, transparent 0%, rgba(247, 214, 218, 0.15) 50%, transparent 100%);
}

.houses-grid {
  text-align: center;
}

.house-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 3rem;
}

.house-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), background 0.5s ease;
  border: 1px solid rgba(184, 176, 217, 0.3);
}

body.fire-theme .house-card {
  background: rgba(45, 24, 16, 0.8);
  border: 1px solid rgba(255, 69, 0, 0.3);
}

body.fire-theme .house-card:hover {
  box-shadow: 0 20px 50px rgba(255, 69, 0, 0.3);
}

.house-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.house-sigil {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--frosted-lavender) 0%, var(--pale-ice-blue) 100%);
  transition: transform var(--transition-medium);
}

.house-card:hover .house-sigil {
  transform: scale(1.1);
}

.house-sigil .sigil-svg {
  width: 60px;
  height: 60px;
}

.house-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.house-card p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ===================================
   THE PROMISE
   =================================== */
.the-promise {
  background: linear-gradient(180deg, transparent 0%, rgba(243, 232, 217, 0.2) 50%, transparent 100%);
}

.promise-letter {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.letter-seal {
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.seal-wax {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 30% 30%, #E87A7A 0%, #C94040 50%, #A02020 100%);
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(160, 32, 32, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: sealPulse 3s ease-in-out infinite;
}

.seal-wax::after {
  content: 'A';
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

@keyframes sealPulse {
  0%, 100% {
    box-shadow: 0 5px 15px rgba(160, 32, 32, 0.3);
  }
  50% {
    box-shadow: 0 5px 25px rgba(160, 32, 32, 0.5);
  }
}

.letter-paper {
  background: linear-gradient(180deg, #FFFEFA 0%, #FDF8F0 100%);
  border-radius: 8px;
  padding: 70px 50px 50px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.08),
    inset 0 0 60px rgba(243, 232, 217, 0.3);
  transform-origin: top center;
  transition: all 0.5s ease;
}

body.fire-theme .letter-paper {
  background: linear-gradient(180deg, #2D1810 0%, #1A0F0A 100%);
  box-shadow: 
    0 20px 60px rgba(255, 69, 0, 0.2),
    inset 0 0 60px rgba(255, 69, 0, 0.1);
}

.letter-paper.unfold {
  animation: unfoldLetter 1s ease-out forwards;
  animation-play-state: paused;
}

.letter-paper.unfold.animate {
  animation-play-state: running;
}

@keyframes unfoldLetter {
  0% {
    transform: perspective(1000px) rotateX(-60deg) scale(0.9);
    opacity: 0;
  }
  50% {
    transform: perspective(1000px) rotateX(-30deg) scale(0.95);
  }
  100% {
    transform: perspective(1000px) rotateX(0) scale(1);
    opacity: 1;
  }
}

.letter-body {
  text-align: left;
}

.letter-body .dear {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.letter-body p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 2;
}

.signature-line {
  margin-top: 2rem;
  color: var(--text-secondary);
}

.signature {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--warm-rose);
  margin-top: 0.5rem;
}

/* ===================================
   PHOTO GALLERY
   =================================== */
.photo-gallery {
  background: linear-gradient(180deg, transparent 0%, rgba(233, 230, 247, 0.2) 50%, transparent 100%);
  overflow: hidden;
}

body.fire-theme .photo-gallery {
  background: linear-gradient(180deg, transparent 0%, rgba(255, 69, 0, 0.1) 50%, transparent 100%);
}

.gallery-content {
  text-align: center;
}

.gallery-frames {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 40px 0;
}

.photo-frame {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  animation: frameFloat 4s ease-in-out infinite;
  animation-delay: var(--delay);
  transition: all 0.4s ease;
}

.photo-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--deep-lavender), var(--warm-rose), var(--pale-gold), var(--deep-lavender));
  background-size: 300% 300%;
  animation: borderRotate 4s linear infinite;
  z-index: -1;
}

.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-frame:hover::after {
  opacity: 1;
}

.photo-frame:hover {
  transform: scale(1.15) translateY(-10px);
  z-index: 10;
}

.photo-frame.featured {
  width: 200px;
  height: 200px;
}

.frame-border {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.8);
  z-index: 2;
  pointer-events: none;
}

.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-frame:hover .gallery-photo {
  transform: scale(1.1);
}

@keyframes frameFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(2deg);
  }
  75% {
    transform: translateY(-4px) rotate(-2deg);
  }
}

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

body.fire-theme .photo-frame::before {
  background: linear-gradient(135deg, #FF4500, #FFD700, #FF6B35, #FF4500);
  background-size: 300% 300%;
}

body.fire-theme .frame-border {
  border-color: rgba(255, 215, 0, 0.6);
}

.gallery-caption {
  font-family: 'Great Vibes', cursive;
  font-size: 1.8rem;
  color: var(--warm-rose);
  margin-top: 2rem;
  animation: sparkle 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .gallery-frames {
    gap: 15px;
  }
  
  .photo-frame {
    width: 100px;
    height: 100px;
  }
  
  .photo-frame.featured {
    width: 140px;
    height: 140px;
  }
  
  .gallery-caption {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .photo-frame {
    width: 80px;
    height: 80px;
  }
  
  .photo-frame.featured {
    width: 120px;
    height: 120px;
  }
}

/* ===================================
   CLOSING
   =================================== */
.closing {
  text-align: center;
  padding-bottom: 60px;
}

.closing-content {
  max-width: 600px;
  margin: 0 auto;
}

.final-sigil {
  margin-bottom: 2rem;
}

.closing-quote {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding: 20px;
}

.closing-note {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Rose Petals */
.rose-petals {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 2rem;
}

.petal {
  width: 20px;
  height: 30px;
  background: linear-gradient(135deg, var(--soft-rose) 0%, var(--warm-rose) 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: petalFall 4s ease-in-out infinite;
  opacity: 0.7;
}

.petal:nth-child(2) {
  animation-delay: 1.3s;
}

.petal:nth-child(3) {
  animation-delay: 2.6s;
}

@keyframes petalFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  20% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(40px) rotate(45deg);
    opacity: 0;
  }
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, transparent 0%, rgba(233, 230, 247, 0.5) 100%);
  position: relative;
  z-index: 2;
}

.footer p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer .copyright {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
  .parchment {
    padding: 40px 30px;
  }
  
  .letter-paper {
    padding: 60px 30px 40px;
  }
  
  .sigils-row {
    gap: 20px;
  }
  
  .sigil-item {
    width: 60px;
    height: 60px;
  }
  
  .sigil-svg {
    width: 35px;
    height: 35px;
  }
  
  .letter-placeholder {
    width: 140px;
    height: 140px;
    font-size: 4.5rem;
  }
  
  .letter-placeholder.large {
    width: 160px;
    height: 160px;
    font-size: 5.5rem;
  }
  
  .candle-container {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .parchment {
    padding: 30px 20px;
  }
  
  .letter-paper {
    padding: 50px 20px 30px;
  }
  
  .house-cards {
    gap: 20px;
  }
  
  .house-card {
    padding: 30px 20px;
  }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* ===================================
   MUSIC PLAYER
   =================================== */
.music-player {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.music-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--deep-lavender), var(--warm-rose));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
}

.music-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.music-icon {
  font-size: 1.4rem;
  transition: opacity 0.3s ease;
}

.music-waves {
  position: absolute;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.music-waves span {
  width: 4px;
  background: white;
  border-radius: 2px;
  animation: musicWave 0.8s ease-in-out infinite;
}

.music-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.music-waves span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.music-waves span:nth-child(3) { height: 12px; animation-delay: 0.4s; }

.music-btn.playing .music-icon {
  opacity: 0;
}

.music-btn.playing .music-waves {
  opacity: 1;
}

@keyframes musicWave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

body.fire-theme .music-btn {
  background: linear-gradient(135deg, #FF4500, #FFD700);
}

/* ===================================
   STARS CANVAS
   =================================== */
#stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body.fire-theme #stars {
  opacity: 0;
}

/* ===================================
   HEARTS CANVAS
   =================================== */
#hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* ===================================
   PHOTO LIGHTBOX
   =================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.8);
  transition: transform 0.4s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 20px 15px;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.5rem;
    padding: 15px 10px;
  }
  
  .lightbox-close {
    font-size: 2rem;
  }
}

/* ===================================
   CONFETTI CANVAS
   =================================== */
#confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1500;
}

/* ===================================
   STORY BADGE
   =================================== */
.story-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 2rem;
  padding: 15px 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 214, 218, 0.9));
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  animation: badgePulse 3s ease-in-out infinite;
}

.story-heart {
  font-size: 1.5rem;
  animation: heartBeat 1.5s ease-in-out infinite;
}

.story-text {
  font-family: 'Great Vibes', cursive;
  font-size: 1.4rem;
  color: var(--text-secondary);
  background: linear-gradient(90deg, var(--warm-rose), var(--deep-lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(228, 165, 174, 0.3);
  }
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
}

body.fire-theme .story-badge {
  background: linear-gradient(135deg, rgba(45, 24, 16, 0.9), rgba(61, 31, 21, 0.9));
  border: 1px solid rgba(255, 69, 0, 0.3);
}

body.fire-theme .story-text {
  background: linear-gradient(90deg, #FF6B35, #FFD700);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ===================================
   TYPEWRITER EFFECT
   =================================== */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--warm-rose);
  white-space: nowrap;
  animation: blink 0.7s infinite;
  display: inline-block;
  min-height: 1em;
}

.typewriter.done {
  border-right: none;
  animation: none;
}

@keyframes blink {
  0%, 50% { border-color: var(--warm-rose); }
  51%, 100% { border-color: transparent; }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-contrast: high) {
  .letter-placeholder,
  .parchment,
  .letter-paper,
  .house-card {
    border: 2px solid var(--text-primary);
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 3px solid var(--warm-rose);
  outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text-primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}
