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

:root {
  --primary-rose: #ff4d79;
  --secondary-rose: #ff758c;
  --accent-gold: #f9d423;
  --dark-ruby: #2c0919;
  --bg-gradient-start: #1a0410;
  --bg-gradient-mid: #2e091d;
  --bg-gradient-end: #12020b;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.16);
  --card-hover-border: rgba(255, 117, 140, 0.5);
  --text-main: #fff0f5;
  --text-muted: #e6b8c8;
  --text-dark: #331522;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-glow: 0 10px 30px rgba(255, 77, 121, 0.3);
  --font-main: 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Caveat', cursive;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at 50% 20%, var(--bg-gradient-mid), var(--bg-gradient-start) 60%, var(--bg-gradient-end));
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* FLOATING PARTICLES CANVAS */
#hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* AUDIO TOGGLE BUTTON */
.audio-control {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.audio-control button {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 10px 18px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.audio-control button:hover {
  background: rgba(255, 77, 121, 0.3);
  transform: translateY(-2px);
  border-color: var(--primary-rose);
}

.audio-control button.playing {
  background: linear-gradient(135deg, var(--primary-rose), var(--secondary-rose));
  box-shadow: var(--shadow-glow);
}

/* MAIN WRAPPER */
.main-wrapper {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* HERO SECTION */
.hero-section {
  text-align: center;
  padding: 80px 15px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255, 77, 121, 0.2);
  border: 1px solid rgba(255, 77, 121, 0.4);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffdbe4;
  margin-bottom: 25px;
  animation: pulseBadge 2.5s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 77, 121, 0); }
  50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 77, 121, 0.5); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 24px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(255, 77, 121, 0.4);
}

.highlight-name {
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 50%, #f9d423 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 35px;
  font-weight: 300;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ff4d79, #ff758c);
  color: #fff;
  box-shadow: 0 8px 25px rgba(255, 77, 121, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 77, 121, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-grand {
  background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
  color: #fff;
  font-size: 1.2rem;
  padding: 18px 40px;
  box-shadow: 0 10px 35px rgba(255, 8, 68, 0.5);
  letter-spacing: 0.5px;
}

.btn-grand:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 40px rgba(255, 8, 68, 0.7);
}

.scroll-indicator {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.8;
  animation: floatDown 2s infinite ease-in-out;
}

@keyframes floatDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* SECTIONS COMMON */
.section {
  margin-bottom: 70px;
  scroll-margin-top: 50px;
}

.section-header {
  text-align: center;
  margin-bottom: 35px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255, 77, 121, 0.15);
  border: 1px solid rgba(255, 77, 121, 0.3);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff9ebb;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 2.7rem);
  color: #fff;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* GLASS PANEL */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--card-hover-border);
}

/* TIMER SECTION */
.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 30px 0 20px;
}

.timer-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 10px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform 0.3s ease;
}

.timer-box:hover {
  transform: translateY(-5px);
  background: rgba(255, 77, 121, 0.1);
  border-color: rgba(255, 77, 121, 0.4);
}

.timer-val {
  display: block;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff, #ffd6e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.timer-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-settings {
  text-align: center;
  margin-top: 15px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.link-btn:hover {
  color: #fff;
}

/* ENVELOPE & LOVE LETTER */
.envelope-container {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  background: #fffdfa;
  color: var(--text-dark);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 25px rgba(255, 77, 121, 0.25);
  padding: 40px 35px;
  position: relative;
  overflow: hidden;
  border: 2px solid #f1dfd3;
}

.envelope-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(45deg, #ff4d79, #ff4d79 15px, #fff 15px, #fff 30px, #4d8aff 30px, #4d8aff 45px, #fff 45px, #fff 60px);
}

.paper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d8c3b5;
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.letter-date {
  font-size: 0.9rem;
  color: #8c7365;
  font-style: italic;
}

.letter-stamp {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d81b60;
  border: 2px solid #d81b60;
  padding: 4px 10px;
  border-radius: 6px;
  transform: rotate(-4deg);
}

.letter-body {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #2b1810;
}

.letter-body p {
  margin-bottom: 18px;
}

.letter-sign {
  margin-top: 30px;
  text-align: right;
  font-size: 1rem;
}

.handwritten {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: #c2185b;
  display: block;
  margin-top: 5px;
}

/* REASONS GRID */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.reason-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: all 0.3s ease;
}

.reason-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 117, 140, 0.6);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px rgba(255, 77, 121, 0.2);
}

.reason-icon {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.reason-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #fff;
}

.reason-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* PHOTO GALLERY / POLAROIDS */
.photo-uploader-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 35px;
  padding: 20px 25px;
}

.uploader-info strong {
  color: #fff;
}

.uploader-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.uploader-info code {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ff9ebb;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  justify-items: center;
}

.polaroid-card {
  background: #ffffff;
  color: #2b1810;
  padding: 15px 15px 22px;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 280px;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.polaroid-card:nth-child(3n+1) {
  transform: rotate(-2deg);
}
.polaroid-card:nth-child(3n+2) {
  transform: rotate(2.5deg);
}
.polaroid-card:nth-child(3n+3) {
  transform: rotate(-1.5deg);
}

.polaroid-card:hover {
  transform: translateY(-10px) rotate(0deg) scale(1.04);
  box-shadow: 0 20px 40px rgba(255, 77, 121, 0.35);
  z-index: 10;
}

.pin {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.polaroid-img-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f7f1e5;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.polaroid-card:hover .polaroid-img-wrapper img {
  transform: scale(1.05);
}

.placeholder-art {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 15px;
}

.art-1 { background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%); }
.art-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.art-3 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.art-4 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

.art-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}

.art-text {
  font-weight: 600;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.35rem;
  line-height: 1.3;
  margin-top: 14px;
  text-align: center;
  color: #381926;
  font-weight: 700;
}

/* LOVE METER */
.slider-wrapper {
  max-width: 500px;
  margin: 30px auto 10px;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  transition: all 0.3s ease;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff4d79;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 77, 121, 0.8);
  border: 3px solid #fff;
  transition: transform 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-value-display {
  font-size: 2.8rem;
  font-weight: 800;
  color: #ff758c;
  margin-top: 15px;
}

.slider-status {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffdbe4;
  margin-top: 10px;
  min-height: 30px;
}

/* COMFORT / QUOTE JAR */
.quote-display-box {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--primary-rose);
  padding: 25px;
  border-radius: 8px;
  margin: 25px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quote-text {
  font-size: 1.2rem;
  font-style: italic;
  color: #fff;
  transition: opacity 0.3s ease;
}

/* PROMISES LIST */
.promises-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 650px;
  margin: 0 auto;
}

.promise-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease;
}

.promise-item:hover {
  transform: translateX(8px);
  border-color: rgba(255, 117, 140, 0.4);
}

.check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary-rose);
  color: #fff;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.promise-item h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 3px;
}

.promise-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* SURPRISE SECTION */
.surprise-box {
  padding: 50px 30px;
}

.surprise-box h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.surprise-box p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 40px 20px 20px;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 60px;
}

.footer strong {
  color: #ff9ebb;
}

.small-sub {
  font-size: 0.8rem;
  margin-top: 8px;
  opacity: 0.7;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 0, 5, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-card {
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.custom-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 1.1rem;
  margin: 20px 0;
  outline: none;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.floating-hearts-emoji {
  font-size: 3rem;
  margin-bottom: 15px;
  animation: pulseBadge 1.8s infinite;
}

.surprise-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #fff;
  margin-bottom: 20px;
}

.hug-badge {
  display: inline-block;
  background: rgba(255, 77, 121, 0.25);
  border: 1px solid var(--primary-rose);
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 600;
  color: #ffdbe4;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

/* LIGHTBOX */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-caption {
  margin-top: 15px;
  color: #fff;
  font-size: 1.2rem;
  font-family: var(--font-script);
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}

/* UTILITY */
.text-center { text-align: center; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .photo-uploader-bar {
    flex-direction: column;
    text-align: center;
  }
  .timer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .glass-panel {
    padding: 30px 20px;
  }
}
