/* ==========================================
   ROOT DESIGN SYSTEM - Love Letter for Clara
   ========================================== */

:root {
  --rose-100: #fff0f3;
  --rose-200: #ffd6e0;
  --rose-300: #ffb3c6;
  --rose-400: #ff8fab;
  --rose-500: #ff6b8a;
  --rose-600: #ee4466;
  --rose-700: #c9184a;
  
  --gold-100: #fef3e2;
  --gold-200: #fde5b6;
  --gold-300: #fdd58d;
  --gold-400: #fcc254;
  --gold-500: #daa520;
  --gold-600: #b8860b;
  
  --lavender-100: #f3e8ff;
  --lavender-200: #e0c3fc;
  --lavender-300: #c49cde;
  --lavender-400: #a678c8;
  
  --cream: #faf5ef;
  --parchment: #f5e6d0;
  --brown-dark: #3a1c00;
  --brown-medium: #654321;
  
  --font-romantic: 'Dancing Script', cursive;
  --font-elegant: 'Cormorant Garamond', serif;
  --font-display: 'Playfair Display', serif;
  
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-elegant);
  background: #0a0a0a;
  color: var(--brown-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   SECTIONS
   ========================================== */

.section {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.section.active {
  display: flex;
}

/* ==========================================
   SECTION 1: PASSWORD
   ========================================== */

#password-section {
  background: linear-gradient(135deg, #1a0a1e 0%, #2d1233 25%, #1e0a2e 50%, #2d1233 75%, #1a0a1e 100%);
  overflow: hidden;
}

.password-particles {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}

.password-particles .particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--rose-400), transparent);
  animation: particleFloat linear infinite; opacity: 0;
}

@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.password-container {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: clamp(2rem, 5vw, 4rem);
}

.password-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,200,220,0.12);
  border-radius: 32px;
  padding: clamp(2.5rem, 6vw, 4rem);
  max-width: 480px; width: 100%; text-align: center;
  box-shadow: 0 32px 64px rgba(0,0,0,0.4), 0 0 120px rgba(238,68,102,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: cardAppear 1.2s var(--transition-smooth) forwards;
  transform: translateY(30px); opacity: 0;
}

@keyframes cardAppear { to { transform: translateY(0); opacity: 1; } }

.heart-icon { margin-bottom: 1.5rem; }

.heart-svg {
  width: 60px; height: 60px;
  animation: heartBeat 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(238,68,102,0.5));
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

.password-title {
  font-family: var(--font-romantic);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  color: var(--rose-200); font-weight: 600;
  text-shadow: 0 0 30px rgba(255,179,198,0.3);
}

.password-subtitle {
  font-family: var(--font-elegant);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: rgba(255,200,220,0.6);
  margin-bottom: 2rem; font-weight: 300; font-style: italic;
}

.input-wrapper { position: relative; margin-bottom: 1.5rem; }

#password-input {
  width: 100%; padding: 1rem 1.5rem;
  font-family: var(--font-elegant);
  font-size: 1.3rem; text-align: center; letter-spacing: 3px;
  border: 2px solid rgba(255,179,198,0.2);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  color: var(--rose-100); outline: none;
  transition: all 0.4s var(--transition-smooth);
}

#password-input::placeholder { color: rgba(255,179,198,0.3); letter-spacing: 4px; }

#password-input:focus {
  border-color: var(--rose-400);
  box-shadow: 0 0 30px rgba(238,68,102,0.15), inset 0 0 20px rgba(255,143,171,0.05);
}

.input-glow {
  position: absolute; inset: -2px; border-radius: 18px;
  background: linear-gradient(45deg, var(--rose-400), var(--lavender-300), var(--rose-400));
  opacity: 0; z-index: -1; transition: opacity 0.4s; filter: blur(8px);
}

#password-input:focus ~ .input-glow { opacity: 0.3; }

.btn-romantic {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-elegant);
  font-size: 1.05rem; font-weight: 500;
  border: none; border-radius: 50px;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  color: white; cursor: pointer;
  position: relative; overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
  box-shadow: 0 8px 32px rgba(238,68,102,0.3), 0 2px 8px rgba(238,68,102,0.2);
}

.btn-romantic::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%); transition: transform 0.6s;
}

.btn-romantic:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(238,68,102,0.4), 0 4px 12px rgba(238,68,102,0.3);
}

.btn-romantic:hover::before { transform: translateX(100%); }
.btn-romantic:active { transform: translateY(0) scale(0.98); }

.password-error {
  font-family: var(--font-elegant); font-size: 1rem;
  color: var(--rose-300); margin-top: 1rem;
  opacity: 0; transform: translateY(-10px);
  transition: all 0.4s var(--transition-smooth); font-style: italic;
}

.password-error.visible { opacity: 1; transform: translateY(0); }
.password-error.hidden { display: block; opacity: 0; }

.password-hint {
  margin-top: 2rem; font-family: var(--font-elegant);
  font-size: 0.85rem; color: rgba(255,200,220,0.3);
  font-style: italic;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.hint-sparkle { font-size: 0.7rem; animation: sparkle 2s ease-in-out infinite; }

@keyframes sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.shake { animation: shake 0.5s ease-in-out; }

/* ==========================================
   SECTION 2: MAIN SCENE
   ========================================== */

#main-section {
  min-height: 100vh;
  overflow: visible;
  background: #1a0e05;
  justify-content: flex-start;
}

/* --- Fixed Animated Background --- */
.scene-background {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-image {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 60%;
  animation: bgBreath 12s ease-in-out infinite;
}

@keyframes bgBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.bg-overlay {
  position: absolute; inset: 0;
  background: 
    radial-gradient(ellipse at center 70%, transparent 30%, rgba(26,14,5,0.2) 70%),
    linear-gradient(to bottom, rgba(26,14,5,0) 0%, transparent 30%, transparent 60%, rgba(26,14,5,0.3) 100%);
}

/* --- Animated CSS Flowers --- */
.flowers-layer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35vh;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.css-flower {
  position: absolute;
  bottom: 0;
  transform-origin: bottom center;
}

.flower-stem {
  width: 3px;
  background: linear-gradient(to top, #2d5016, #4a7c23);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.flower-head {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.flower-petal {
  position: absolute;
  border-radius: 50% 50% 50% 0;
  transform-origin: bottom right;
}

/* Flower swaying animation */
@keyframes flowerSway {
  0%, 100% { transform: rotate(-3deg); }
  25% { transform: rotate(2deg); }
  50% { transform: rotate(-2deg); }
  75% { transform: rotate(4deg); }
}

@keyframes flowerSway2 {
  0%, 100% { transform: rotate(2deg); }
  33% { transform: rotate(-4deg); }
  66% { transform: rotate(3deg); }
}

@keyframes flowerSway3 {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(5deg); }
}

/* Petals Canvas */
#petals-canvas {
  position: fixed; inset: 0;
  z-index: 3; pointer-events: none;
}

/* Fireflies */
.fireflies { position: fixed; inset: 0; z-index: 4; pointer-events: none; }

.firefly {
  position: absolute;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-400);
  box-shadow: 0 0 6px var(--gold-400), 0 0 12px var(--gold-500), 0 0 24px rgba(218,165,32,0.3);
  animation: fireflyFloat linear infinite;
}

@keyframes fireflyFloat {
  0%   { opacity: 0; transform: translate(0,0) scale(0.5); }
  20%  { opacity: 1; transform: translate(var(--dx1),var(--dy1)) scale(1); }
  40%  { opacity: 0.6; transform: translate(var(--dx2),var(--dy2)) scale(0.8); }
  60%  { opacity: 1; transform: translate(var(--dx3),var(--dy3)) scale(1); }
  80%  { opacity: 0.5; transform: translate(var(--dx4),var(--dy4)) scale(0.7); }
  100% { opacity: 0; transform: translate(var(--dx5),var(--dy5)) scale(0.3); }
}

/* Sun Rays */
.sun-rays {
  position: fixed; top: 15%; left: 50%;
  transform: translateX(-50%);
  z-index: 1; pointer-events: none;
}

.ray {
  position: absolute;
  width: 3px; height: 200px;
  background: linear-gradient(to bottom, rgba(255,223,150,0.35), transparent);
  transform-origin: top center;
  animation: rayPulse 4s ease-in-out infinite;
}

.ray-1 { transform: rotate(-30deg); animation-delay: 0s; left: -80px; }
.ray-2 { transform: rotate(-15deg); animation-delay: 0.5s; left: -40px; }
.ray-3 { transform: rotate(0deg); animation-delay: 1s; left: 0px; }
.ray-4 { transform: rotate(15deg); animation-delay: 0.5s; left: 40px; }
.ray-5 { transform: rotate(30deg); animation-delay: 0s; left: 80px; }

@keyframes rayPulse {
  0%, 100% { opacity: 0.3; height: 200px; }
  50% { opacity: 0.6; height: 250px; }
}

/* --- Main Content (scrollable over fixed bg) --- */
.main-content {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-area {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem;
}

/* Scene Title */
.scene-title {
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0; transform: translateY(-30px);
}

.scene-title.visible {
  animation: fadeSlideDown 1.5s var(--transition-smooth) forwards;
}

@keyframes fadeSlideDown {
  to { opacity: 1; transform: translateY(0); }
}

.scene-heading {
  font-family: var(--font-romantic);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  color: var(--cream);
  text-shadow: 0 2px 20px rgba(255,200,150,0.4), 0 0 60px rgba(255,180,120,0.2);
  font-weight: 700;
}

.scene-subtext {
  font-family: var(--font-elegant);
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(250,245,239,0.7);
  margin-top: 0.5rem; font-style: italic; font-weight: 300;
}

/* Sword */
.sword-container {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transition: transform 0.5s var(--transition-smooth);
}

.sword-container:hover { transform: scale(1.05); }
.sword-container:hover .sword-glow { opacity: 1; }

.sword-container.opened {
  transform: scale(0.9) translateY(-20px);
  opacity: 0.7;
  pointer-events: none;
}

.sword-glow {
  position: absolute; width: 110%; height: 200%;
  background: radial-gradient(ellipse, rgba(255,220,150,0.15), transparent 70%);
  pointer-events: none; opacity: 0; transition: opacity 0.6s; z-index: -1;
}

.sword {
  width: clamp(280px, 60vw, 550px); height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
  transition: filter 0.4s;
}

.sword-container:hover .sword {
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5)) drop-shadow(0 0 30px rgba(255,200,100,0.3));
}

.sword-hint {
  font-family: var(--font-elegant);
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: rgba(250,245,239,0.5); letter-spacing: 3px;
  text-transform: uppercase; font-weight: 300;
  animation: hintPulse 2.5s ease-in-out infinite;
}

.sword-container.opened .sword-hint { display: none; }

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* --- Letter Panel (slides down from sword) --- */
.letter-panel {
  width: 100%;
  max-width: 780px;
  padding: 0 1.5rem 4rem;
  overflow: hidden;
  /* Initially collapsed */
  max-height: 0;
  opacity: 0;
  transition: max-height 1.8s var(--transition-smooth), 
              opacity 1.2s 0.3s var(--transition-smooth);
}

.letter-panel.open {
  max-height: 6000px;
  opacity: 1;
}

.letter-connector {
  width: 3px;
  height: 60px;
  margin: 0 auto 0;
  background: linear-gradient(to bottom, rgba(218,165,32,0.6), rgba(218,165,32,0.1));
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.8s 0.5s;
}

.letter-panel.open .letter-connector { opacity: 1; }

.letter-parchment {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 1px rgba(101,67,33,0.5);
}

.parchment-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.35; z-index: 0;
}

.letter-content {
  position: relative; z-index: 1;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(180deg,
    rgba(245,230,208,0.93) 0%,
    rgba(240,220,190,0.95) 50%,
    rgba(235,215,180,0.93) 100%
  );
  border: 3px solid rgba(139,105,20,0.2);
  border-radius: 12px;
  box-shadow: inset 0 0 60px rgba(139,105,20,0.08), inset 0 0 120px rgba(218,165,32,0.05);
}

.letter-title {
  font-family: var(--font-romantic);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--brown-dark); text-align: center;
  margin-bottom: 2rem; padding-bottom: 1.5rem;
  border-bottom: 2px solid rgba(139,105,20,0.15);
  text-shadow: 0 1px 2px rgba(139,105,20,0.1);
}

.letter-title::after {
  content: '❤️'; display: block; font-size: 1.2rem; margin-top: 0.5rem;
}

.letter-body p {
  font-family: var(--font-elegant);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.9; color: var(--brown-dark);
  margin-bottom: 1.2rem; text-indent: 2rem;
  opacity: 0; transform: translateY(15px);
  text-align: justify;
}

.letter-body p.visible {
  animation: letterFadeIn 0.8s var(--transition-smooth) forwards;
}

@keyframes letterFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.letter-final {
  font-family: var(--font-display) !important;
  font-style: italic; font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem) !important;
  text-align: center !important; text-indent: 0 !important;
  color: var(--rose-600) !important;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(139,105,20,0.1);
  border-bottom: 1px solid rgba(139,105,20,0.1);
}

.letter-signature {
  font-family: var(--font-romantic) !important;
  font-size: clamp(1.3rem, 3vw, 1.6rem) !important;
  text-align: right !important; text-indent: 0 !important;
  color: var(--brown-medium) !important;
  margin-top: 1.5rem !important; line-height: 1.6 !important;
}

.letter-signature em { font-size: 1.1em; }

.letter-footer {
  text-align: center; margin-top: 2rem;
  padding-top: 1.5rem; border-top: 2px solid rgba(139,105,20,0.1);
}

.btn-gallery {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  box-shadow: 0 8px 32px rgba(218,165,32,0.3), 0 2px 8px rgba(218,165,32,0.2);
}

.btn-gallery:hover {
  box-shadow: 0 12px 40px rgba(218,165,32,0.4), 0 4px 12px rgba(218,165,32,0.3);
}

/* ==========================================
   SECTION 3: GALLERY
   ========================================== */

#gallery-section {
  min-height: 100vh;
  background: linear-gradient(180deg, #1a0e05 0%, #2d1a0e 15%, #1e0a2e 50%, #2d1233 80%, #1a0a1e 100%);
  padding: clamp(2rem,5vw,4rem) 0;
  display: none; flex-direction: column;
}

#gallery-section.active { display: flex; }

.gallery-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(238,68,102,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(196,156,222,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.gallery-particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.gallery-header {
  position: relative; z-index: 1; text-align: center;
  padding: 3rem clamp(2rem,5vw,4rem) 2rem;
}

.gallery-title {
  font-family: var(--font-romantic);
  font-size: clamp(2.2rem,6vw,3.5rem);
  color: var(--rose-200);
  text-shadow: 0 0 40px rgba(255,179,198,0.3);
}

.gallery-subtitle {
  font-family: var(--font-elegant);
  font-size: clamp(0.95rem,2.5vw,1.2rem);
  color: rgba(255,200,220,0.6); font-style: italic;
}

.gallery-divider {
  margin-top: 1.5rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
}

.gallery-divider::before, .gallery-divider::after {
  content: ''; width: 80px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,179,198,0.3), transparent);
}

.divider-heart { color: var(--rose-400); font-size: 1rem; animation: heartBeat 2s ease-in-out infinite; }

.gallery-container {
  position: relative; z-index: 1;
  max-width: 800px; width: 100%; margin: 0 auto;
  padding: 1rem clamp(2rem,5vw,4rem);
  display: flex; flex-direction: column; gap: 2rem;
}

.gallery-item {
  position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 1px rgba(255,200,220,0.3);
  opacity: 0; transform: translateY(40px) scale(0.95);
  transition: all 0.8s var(--transition-smooth);
}

.gallery-item.visible { opacity: 1; transform: translateY(0) scale(1); }

.gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 40px rgba(238,68,102,0.1);
}

.gallery-item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.6s var(--transition-smooth);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26,10,30,0.3) 100%);
  pointer-events: none;
}

.gallery-item .photo-number {
  position: absolute; bottom: 1rem; right: 1rem;
  font-family: var(--font-romantic); font-size: 1.5rem;
  color: rgba(255,255,255,0.7); text-shadow: 0 2px 8px rgba(0,0,0,0.5); z-index: 2;
}

.gallery-footer {
  position: relative; z-index: 1; text-align: center;
  padding: 3rem clamp(2rem,5vw,4rem);
}

.btn-special {
  font-size: 1.15rem; padding: 1.1rem 2.8rem;
  background: linear-gradient(135deg, var(--lavender-300), var(--rose-500));
  box-shadow: 0 8px 32px rgba(196,156,222,0.3), 0 2px 8px rgba(238,68,102,0.2);
}

.btn-special:hover {
  box-shadow: 0 12px 40px rgba(196,156,222,0.4), 0 4px 12px rgba(238,68,102,0.3);
}

.btn-sparkle { font-size: 1rem; animation: sparkle 1.5s ease-in-out infinite; }

/* ==========================================
   SECTION 4: SPECIAL
   ========================================== */

#special-section {
  min-height: 100vh;
  background: linear-gradient(180deg, #1a0a1e 0%, #0d0518 30%, #0a0214 60%, #1a0a1e 100%);
  display: none; flex-direction: column; align-items: center;
  padding: clamp(2rem,5vw,4rem);
}

#special-section.active { display: flex; }

.special-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(218,165,32,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(238,68,102,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.special-stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.star {
  position: absolute; width: 2px; height: 2px;
  background: white; border-radius: 50%;
  animation: starTwinkle ease-in-out infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.special-container {
  position: relative; z-index: 1;
  max-width: 600px; width: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex: 1;
}

.special-card { width: 100%; text-align: center; }

.special-title {
  font-family: var(--font-romantic);
  font-size: clamp(1.8rem,5vw,2.8rem);
  color: var(--gold-300);
  text-shadow: 0 0 40px rgba(218,165,32,0.3);
  margin-bottom: 2.5rem;
  opacity: 0; animation: fadeSlideDown 1s 0.3s var(--transition-smooth) forwards;
}

/* Album */
.album-container {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  margin-bottom: 2rem;
  opacity: 0; animation: fadeSlideDown 1s 0.6s var(--transition-smooth) forwards;
}

.album-vinyl {
  position: absolute; right: -30px; top: 10px; z-index: 0; opacity: 0.7;
  transition: transform 1s var(--transition-smooth);
}

.album-container:hover .album-vinyl { transform: translateX(40px); }

.vinyl-disc {
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle,
    #1a1a1a 25%, #0d0d0d 26%, #1a1a1a 27%, #111 30%, #1a1a1a 35%,
    #111 40%, #1a1a1a 45%, #111 50%, #1a1a1a 55%, #111 60%,
    #1a1a1a 65%, #0d0d0d 90%);
  box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.3);
  animation: vinylSpin 8s linear infinite;
  animation-play-state: paused;
}

.album-container:hover .vinyl-disc { animation-play-state: running; }

@keyframes vinylSpin { to { transform: rotate(360deg); } }

.vinyl-grooves {
  position: absolute; inset: 15%; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
}

.vinyl-label {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-romantic); font-size: 0.9rem; color: white; font-weight: 700;
}

.album-cover-wrapper {
  position: relative; z-index: 1;
  width: 240px; height: 240px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 1px rgba(218,165,32,0.5);
  transition: transform 0.5s var(--transition-smooth);
}

.album-cover-wrapper:hover { transform: scale(1.03) rotate(-2deg); }

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

.album-shine {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.05) 55%, transparent 70%);
  pointer-events: none;
}

.album-info { position: relative; z-index: 1; }

.album-name {
  font-family: var(--font-display); font-size: 1.5rem;
  color: var(--cream); font-weight: 600;
}

.album-artist {
  font-family: var(--font-elegant); font-size: 1.1rem;
  color: rgba(250,245,239,0.6); font-style: italic; margin-top: 0.3rem;
}

/* Dedication Text */
.dedication-text {
  margin-bottom: 1.5rem;
  opacity: 0; animation: fadeSlideDown 1s 0.9s var(--transition-smooth) forwards;
}

.dedication-body {
  font-family: var(--font-elegant);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  line-height: 1.8;
  color: rgba(255,240,243,0.7);
  font-style: italic;
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
}

/* Spotify */
.spotify-reveal {
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  opacity: 0; animation: fadeSlideDown 1s 1.2s var(--transition-smooth) forwards;
}

.btn-spotify {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 1rem 2.2rem;
  font-family: var(--font-elegant); font-size: 1.05rem; font-weight: 500;
  border: none; border-radius: 50px;
  background: #1db954; color: white; cursor: pointer;
  transition: all 0.4s var(--transition-smooth);
  box-shadow: 0 8px 32px rgba(29,185,84,0.3), 0 2px 8px rgba(29,185,84,0.2);
  position: relative; overflow: hidden;
}

.btn-spotify::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%); transition: transform 0.6s;
}

.btn-spotify:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 40px rgba(29,185,84,0.4), 0 4px 12px rgba(29,185,84,0.3);
  background: #1ed760;
}

.btn-spotify:hover::before { transform: translateX(100%); }

.spotify-icon { flex-shrink: 0; }

.spotify-link-container {
  width: 100%; max-width: 500px; overflow: hidden;
  transition: all 0.8s var(--transition-smooth);
}

.spotify-link-container.hidden {
  max-height: 0; opacity: 0; transform: translateY(-20px);
}

.spotify-link-container.visible {
  max-height: 1200px; opacity: 1; transform: translateY(0);
}

.spotify-embed-wrapper {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.spotify-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-elegant); font-size: 1rem;
  color: #1db954; text-decoration: none;
  border: 2px solid rgba(29,185,84,0.3); border-radius: 50px;
  background: rgba(29,185,84,0.08);
  transition: all 0.3s; margin-bottom: 2rem;
}

.spotify-link:hover {
  background: rgba(29,185,84,0.15);
  border-color: #1db954; transform: translateY(-2px);
}

.final-message {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,200,220,0.1);
  border-radius: 24px;
  padding: clamp(2rem,5vw,3rem); text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 60px rgba(238,68,102,0.03);
}

.message-decoration { font-size: 1.5rem; margin: 0.5rem 0; animation: heartBeat 2s ease-in-out infinite; }

.final-text {
  font-family: var(--font-elegant);
  font-size: clamp(1rem,2.5vw,1.15rem);
  line-height: 1.9; color: rgba(255,240,243,0.8);
  margin: 1rem 0; font-weight: 300;
}

.final-text-emphasis {
  font-family: var(--font-display);
  font-size: clamp(1.1rem,2.5vw,1.3rem);
  line-height: 1.8; color: var(--rose-300);
  font-style: italic; font-weight: 400; margin: 1.5rem 0;
}

.final-signature {
  font-family: var(--font-romantic);
  font-size: clamp(1.3rem,3vw,1.6rem);
  color: var(--gold-300); margin-top: 1.5rem; line-height: 1.6;
}

.final-signature em { font-size: 1.1em; }

.back-to-top { position: relative; z-index: 1; text-align: center; margin-top: 3rem; padding-bottom: 2rem; }

.btn-back {
  padding: 0.7rem 1.8rem;
  font-family: var(--font-elegant); font-size: 0.95rem;
  border: 1px solid rgba(255,200,220,0.2); border-radius: 50px;
  background: transparent; color: rgba(255,200,220,0.5);
  cursor: pointer; transition: all 0.3s;
}

.btn-back:hover {
  border-color: var(--rose-400); color: var(--rose-300);
  background: rgba(238,68,102,0.1);
}

/* ==========================================
   PAGE TRANSITIONS
   ========================================== */

.page-transition-out {
  animation: pageOut 0.8s var(--transition-smooth) forwards;
}

@keyframes pageOut {
  to { opacity: 0; transform: scale(0.95); filter: blur(10px); }
}

.page-transition-in {
  animation: pageIn 0.8s var(--transition-smooth) forwards;
}

@keyframes pageIn {
  from { opacity: 0; transform: scale(1.05); filter: blur(10px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
  .sword { width: 90vw; max-width: 400px; }
  .album-vinyl { display: none; }
  .album-cover-wrapper { width: 200px; height: 200px; }
  .letter-content { padding: 1.5rem; }
  .letter-panel { padding: 0 1rem 3rem; }
}

@media (max-width: 480px) {
  .password-card { padding: 2rem 1.5rem; border-radius: 24px; }
  .scene-heading { font-size: 2rem; }
  .sword { max-width: 300px; }
  .album-cover-wrapper { width: 180px; height: 180px; }
}

/* ==========================================
   SCROLLBAR & UTILITY
   ========================================== */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(238,68,102,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(238,68,102,0.5); }

.hidden { display: none !important; }
