/* ==========================================================================
   To My Love ❤️ — Cinematic Birthday Love Letter Website
   CSS Stylesheet — 100% Static & Standalone
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Great+Vibes&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

/* Reset & Root Variables */
:root {
  --bg-dark: #0a0908;
  --bg-[#1c100b]: #1c100b;
  --paper-bg: #f4ecd8;
  --paper-shadow: rgba(0, 0, 0, 0.85);
  --burgundy: #3a0e16;
  --burgundy-light: #52090e;
  --rose-gold: #b76e79;
  --gold: #d4af37;
  --cream: #f4ecd8;
  --ink: #2b1d17;
  
  --font-title: 'Great Vibes', cursive;
  --font-letter: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Poppins', sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  color: var(--cream);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--burgundy);
  color: var(--cream);
}

/* Typography Classes */
.font-title { font-family: var(--font-title); }
.font-letter { font-family: var(--font-letter); }
.font-body { font-family: var(--font-body); }

/* Background Canvas & Atmospheric Effects */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at center, transparent 35%, rgba(10, 9, 8, 0.9) 90%);
}

.candle-glow-1 {
  position: fixed;
  bottom: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(183, 110, 121, 0.1) 40%, transparent 70%);
  animation: candleFlicker 3s infinite ease-in-out;
  pointer-events: none;
  z-index: 2;
}

.candle-glow-2 {
  position: fixed;
  bottom: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.2) 0%, rgba(183, 110, 121, 0.08) 40%, transparent 70%);
  animation: candleFlicker 3.5s infinite ease-in-out reverse;
  pointer-events: none;
  z-index: 2;
}

@keyframes candleFlicker {
  0%, 100% { opacity: 0.85; transform: scale(1) translate(0, 0); }
  25% { opacity: 0.7; transform: scale(0.98) translate(-2px, 2px); }
  50% { opacity: 0.95; transform: scale(1.02) translate(2px, -2px); }
  75% { opacity: 0.78; transform: scale(0.99) translate(-1px, -1px); }
}

/* Antique Parchment Paper */
.antique-paper {
  background-color: var(--paper-bg);
  background-image: radial-gradient(#e2d5b5 1px, transparent 1px),
                    radial-gradient(#d3c29e 1px, #f4ecd8 1px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.9),
              inset 0 0 80px rgba(74, 14, 23, 0.15),
              inset 0 0 20px rgba(120, 80, 20, 0.2);
  border: 1px solid #d3c29e;
  border-radius: 1rem;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

/* Wax Seal Texture */
.wax-seal {
  background: radial-gradient(circle at 30% 30%, #a8202a, #52090e);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(255, 200, 200, 0.3);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.wax-seal:hover {
  transform: scale(1.08);
}

/* Ink text style */
.ink-text {
  color: #2b1d17;
  text-shadow: 0 0 1px rgba(43, 29, 23, 0.3);
}

/* Ken Burns effect */
@keyframes kenBurns {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.08) translate(-1%, -1%); }
  100% { transform: scale(1) translate(0, 0); }
}

.ken-burns {
  animation: kenBurns 18s ease-in-out infinite alternate;
}

/* Layout Container */
#app-root {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Single Volume Button & Slider Popup */
.volume-control-wrapper {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.volume-slider-popup {
  background: rgba(28, 16, 11, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 9999px;
  padding: 0.4rem 0.8rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.volume-slider-popup input[type="range"] {
  width: 5rem;
  height: 4px;
  accent-color: var(--gold);
  cursor: pointer;
}

.volume-btn {
  background: rgba(28, 16, 11, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--cream);
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.volume-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: scale(1.05);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3a0e16 0%, #52090e 50%, #3a0e16 100%);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.3);
  border-color: var(--gold);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  border-color: rgba(212, 175, 55, 0.2);
}

@keyframes spinCustom {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-custom {
  animation: spinCustom 0.9s linear infinite;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: rgba(28, 16, 11, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--gold);
  transform: scale(1.05);
}

.btn-secondary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #0a0908;
}
::-webkit-scrollbar-thumb {
  background: #3a0e16;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4af37;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .btn-primary {
    padding: 0.75rem 1.4rem;
    font-size: 0.75rem;
  }
}
