/* Theme Variables */
:root {
  --primary-color: #ff6b81;
  --primary-light: #ffc1cc;
  --accent-color: #ff4d6d;
  --bg-gradient: linear-gradient(135deg, #e0c3fc, #8ec5fc);
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-muted: #777777;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-border: #ffc1cc;
}

.theme-romantic {
  --primary-color: #ff6b81;
  --primary-light: #ffc1cc;
  --accent-color: #ff4d6d;
  --bg-gradient: linear-gradient(135deg, #fff5f6 0%, #ffeef0 100%);
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-muted: #777777;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-border: #ffc1cc;
}

.theme-midnight {
  --primary-color: #ffd700;
  --primary-light: #b8860b;
  --accent-color: #ffd700;
  --bg-gradient: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  --card-bg: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-muted: #cccccc;
  --nav-bg: rgba(15, 12, 41, 0.9);
  --nav-border: #ffd700;
}

.theme-soft {
  --primary-color: #a8e6cf;
  --primary-light: #dcedc1;
  --accent-color: #81c784;
  --bg-gradient: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
  --card-bg: #ffffff;
  --text-primary: #4a4a4a;
  --text-muted: #888888;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-border: #a8e6cf;
}

/* Nav Bar Styles */
.main-nav {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  border: 2px solid var(--nav-border);
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-toggle span {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  margin: 2px 0;
  transition: all 0.3s ease;
}

.nav-links {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: var(--nav-bg);
  backdrop-filter: blur(15px);
  flex-direction: column;
  gap: 1rem;
  padding: 80px 30px 20px 30px;
  transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 5px 0 15px rgba(0,0,0,0.1);
  z-index: 1050;
  border-right: 2px solid var(--nav-border);
  display: flex;
}

.nav-links.active {
  left: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.nav-link:hover {
  color: var(--accent-color);
  transform: scale(1.05);
  background: var(--primary-light);
}

.nav-link.active {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  border-radius: 10px;
}


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

#transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
  transition: opacity 0.8s ease-in-out;
}
#transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Gradient background & fonts */

/* Gradient background & fonts */

/* Guestbook styles */
.guestbook-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.guest-message {
  background: var(--card-bg, #f9f9f9);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  max-width: 80%;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.guest-message-body {
  font-size: 0.95rem;
  color: var(--text-primary, #212121);
  word-break: break-word;
}
.guest-message-time {
  font-size: 0.75rem;
  color: var(--text-muted, #666);
  margin-top: 0.4rem;
  text-align: right;
}
@media (max-width: 600px) {
  .guest-message { max-width: 100%; }
}


/* Now Playing badge */
#now-playing {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.9);
  color: #333;
  padding: 5px 15px;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 1000;
  display: none;
}

body {
  background: var(--bg-gradient);
  font-family: 'Montserrat', sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 1rem;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 2rem;
}

/* Greeting pop‑out animation */
#time-greeting {
  position: relative;
  overflow: hidden;
}
#time-greeting.popup {
  animation: slideFromLeft 6s ease forwards;
}
@keyframes slideFromLeft {
  0%   { transform: translateX(-120%); opacity: 0; }
  15%  { transform: translateX(0);      opacity: 1; }
  85%  { transform: translateX(0);      opacity: 1; }
  100% { transform: translateX(-120%); opacity: 0; }
}
/* Warm, human‑friendly styling for the greeting */
#time-greeting {
  color: #ff7043;        /* warm orange‑red */
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
  transition: color 0.3s ease;
}

.music-btn {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Timeline container */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--text-muted);
  transform: translateX(-50%);
}

/* Card base */
.card {
  position: relative;
  width: 45%;
  padding: 1rem;
  margin: 2rem 0;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered slide for left/right */
.card.left { left: 0; }
.card.right { left: 55%; }

.card.left.visible {
  animation: bloomLeft 0.8s forwards;
}
.card.right.visible {
  animation: bloomRight 0.8s forwards;
}

@keyframes bloomLeft {
  0% { opacity: 0; transform: translateX(-40px) translateY(40px) scale(0.9); }
  100% { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}

@keyframes bloomRight {
  0% { opacity: 0; transform: translateX(40px) translateY(40px) scale(0.9); }
  100% { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}

/* Connector dot */
.card::after {
  content: '';
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--card-bg);
  box-shadow: 0 0 0 4px var(--text-muted);
}
.card.left::after { right: -10px; }
.card.right::after { left: -10px; }

/* Hover shine & scale */
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0), rgba(255,255,255,.3), rgba(255,255,255,0));
  transition: left .4s;
}
.card:hover::before { left: 100%; }

.card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Image Gallery Styles */
.card-gallery {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.card-gallery img {
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  margin-bottom: 0;
}

.card-gallery::-webkit-scrollbar {
  height: 6px;
}

.card-gallery::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

/* Memory Category Themes */
.category-love { border-left: 5px solid #ff6b81; background: #fffafa; }
.category-adventure { border-left: 5px solid #4caf50; background: #f0fff0; }
.category-holiday { border-left: 5px solid #2196f3; background: #f0f8ff; }
.category-milestone { border-left: 5px solid #ffc107; background: #fffff0; }
.category-default { border-left: 5px solid #e0e0e0; background: #fff; }

.card .title { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-primary); }
.card .date { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.card .description { font-size: 1rem; color: var(--text-primary); }

/* Top progress bar */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--primary-color);
  width: 0;
  z-index: 1000;
}

/* Responsive layout */
@media (max-width: 768px) {
  .card {
    width: 90%;
    left: 5% !important;
    margin: 1.5rem 0;
  }
  .timeline::before {
    left: 5%;
  }
  .card::after {
    left: -10px !important;
  }
  h1 { font-size: 2.5rem !important; }
  p { font-size: 1.1rem !important; }
}

@media (max-width: 480px) {
  .card {
    width: 95%;
    left: 2.5% !important;
  }
  .timeline::before {
    left: 2.5%;
  }
  .card::after {
    left: -10px !important;
  }
}

/* Quiz Modal Styles */
.quiz-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 5000;
}

.quiz-container {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 1.5rem 0;
}

.quiz-option {
  padding: 1rem;
  background: #fdf2f4;
  border: 2px solid #ffc1cc;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.quiz-option:hover {
  background: #ffc1cc;
}

.quiz-option.correct {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.quiz-option.wrong {
  background: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.letter-container {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 3rem auto;
  cursor: pointer;
  perspective: 1000px;
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffc1cc;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  z-index: 2;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: #ffb3c1;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transition: transform 0.6s ease-in-out;
  transform-origin: top;
  z-index: 3;
}

.envelope-flap.open {
  transform: rotateX(180deg);
}

.letter {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 280px;
  height: 180px;
  background: #fff;
  padding: 1rem;
  font-family: 'Great Vibes', cursive;
  font-size: 1.2rem;
  color: #333;
  transition: transform 0.6s ease-in-out, z-index 0.6s;
  z-index: 1;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.letter.open {
  transform: translateY(-100px);
  z-index: 4;
  height: auto;
  min-height: 180px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.kiss-greeting {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  z-index: 1000;
  display: none; /* Hidden by default */
}
.kiss-greeting img {
  max-width: 120px;
  max-height: 120px;
  margin: 0 5px;
  animation: float 3s ease-in-out infinite;
}
.kiss-greeting span {
  display: block;
  margin-top: 5px;
  font-size: 1.1rem;
  color: #333;
  font-weight: bold;
}

/* Guestbook styles */
.guestbook-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 3rem;
}
.guest-message {
  background: var(--card-bg, #f9f9f9);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  max-width: 80%;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.guest-message-body {
  font-size: 0.95rem;
  color: var(--text-primary, #212121);
  word-break: break-word;
}
.guest-message-time {
  font-size: 0.75rem;
  color: var(--text-muted, #666);
  margin-top: 0.4rem;
  text-align: right;
}
@media (max-width: 600px) {
  .guest-message { max-width: 100%; }
}

/* Love Quotes styles */
#love-quotes {
  margin-top: 3rem;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
}

/* Profile styles */
#profile-section {
  margin-top: 3rem;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
}

.pdf-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}
/* Quote Card Styles */
#quotes-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  pointer-events: none;
}

.quote-card {
  pointer-events: auto;
  background: #fff;
  padding: 1.2rem;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(255, 107, 129, 0.2);
  border: 2px solid #ffc1cc;
  position: relative;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: slideIn 0.5s ease-out;
  cursor: default;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.quote-card .close {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #ff6b81;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
}

.quote-card {
  font-family: 'Great Vibes', cursive;
  font-size: 1.3rem;
  color: #444;
  text-align: center;
  line-height: 1.4;
}

.quote-card:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 107, 129, 0.3);
}

/* Jar of Hearts Animations */
@keyframes jarShake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.jar-shaking {
  animation: jarShake 0.5s ease-in-out infinite;
}

.note-bloom {
  animation: noteBloom 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes noteBloom {
  0% { opacity: 0; transform: scale(0.5) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
