/* ==========================================================================
   حكايتنا (Q & M) — Luxury Dark Velvet Rose Design System
   Refactored Production Stylesheet (Strict Mobile-First Architecture)
   ========================================================================== */

:root {
  /* Luxury Velvet Rose Palette */
  --bg-obsidian: #0c040a;
  --bg-gradient-top: #1e0817;
  --card-glass: rgba(28, 10, 22, 0.75);
  
  /* Rose Accents */
  --rose-quartz: #ff758f;
  --rose-neon: #ff4d6d;
  --rose-soft: #ffccd5;
  --rose-deep: #800f2f;
  --border-rose: rgba(255, 117, 143, 0.25);
  --border-rose-glow: rgba(255, 117, 143, 0.55);

  /* Typography */
  --text-ivory: #fff0f3;
  --text-muted: #c9a0af;
  --text-dim: #8c6778;

  /* Errors & States */
  --ruby-error: #ff3355;
  --ruby-glow: rgba(255, 51, 85, 0.45);

  /* Safe Area Insets for iOS Viewports */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================================================
   Global Reset & Strict Mobile Constraints
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
  user-select: auto;
  -webkit-user-select: auto;
}

html, body {
  background-color: var(--bg-obsidian);
  color: var(--text-ivory);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   SCREEN 1: "بوابة الدخول" (The Lamp Gate - Overlay Only)
   ========================================================================== */

#gate-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #160511 0%, #080206 100%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 16px) 20px calc(var(--safe-bottom) + 16px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
  overflow-y: auto;
  overflow-x: hidden;
}

.gate-top-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--rose-soft);
  letter-spacing: 0.8px;
  margin-bottom: 26px;
  text-align: center;
  text-shadow: 0 0 14px rgba(255, 117, 143, 0.45);
  position: relative;
  z-index: 10;
}

.lamp-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 38px; /* Plenty of breathing room (at least 35px) between lamp and card */
  z-index: 10;
}

/* Soft, cinematic, diffused radial glow (No rigid triangles) */
.lamp-light-cone {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%) scale(0.65);
  width: 340px;
  height: 380px;
  background: radial-gradient(ellipse 60% 70% at 50% 20%, rgba(255, 77, 109, 0.35) 0%, rgba(255, 117, 143, 0.1) 50%, transparent 80%);
  filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.lamp-svg {
  width: 136px;
  height: 106px;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(255, 77, 109, 0.35));
  transition: filter 0.4s ease;
  position: relative;
  z-index: 5;
}

/* Delicate, Tiny Pull-Cord strictly 25px–30px below lamp shade */
.pull-cord-btn {
  margin-top: -3px; /* Hangs right below the bottom edge of the lamp shade */
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transform-origin: top center;
  z-index: 6;
}

.cord-touch-area {
  position: absolute;
  width: 50px;
  height: 50px;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
}

.cord-string {
  width: 2px;
  height: 26px; /* strictly 26px below shade */
  background: linear-gradient(to bottom, #ff758f, #ffccd5);
  border-radius: 1px;
  box-shadow: 0 0 4px rgba(255, 117, 143, 0.4);
}

.cord-pendant {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ff758f 60%, #800f2f 100%);
  box-shadow: 0 0 10px var(--rose-quartz);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: -1px;
}

.pull-cord-btn:hover .cord-pendant,
.pull-cord-btn:active .cord-pendant {
  transform: scale(1.3);
  box-shadow: 0 0 16px rgba(255, 117, 143, 0.95);
}

/* Passcode Entrance Card */
.gate-auth-card {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 340px;
  background: rgba(28, 10, 22, 0.85);
  border: 1px solid rgba(255, 117, 143, 0.28);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 24px 22px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(255, 77, 109, 0.15);
  z-index: 10;
  pointer-events: none;
  position: relative;
}

.gate-auth-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gate-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-ivory);
  margin-bottom: 18px;
  text-align: center;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(255, 117, 143, 0.3);
}

/* Dedicated Rounded Input Container (Height 48px, Radius 24px) */
.gate-input-box {
  width: 100%;
  height: 48px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 117, 143, 0.3);
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
}

.gate-input-box:focus-within {
  border-color: var(--rose-quartz);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 16px rgba(255, 117, 143, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.gate-input-box.input-error {
  border-color: var(--ruby-error) !important;
  box-shadow: 0 0 18px var(--ruby-glow) !important;
}

.gate-input-field {
  flex: 1;
  min-width: 0;
  height: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 2px;
  padding-left: 24px; /* visually balances text despite the eye icon on the left */
}

.gate-input-field::placeholder {
  color: rgba(201, 160, 175, 0.65);
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: 400;
  text-align: center;
}

.btn-toggle-eye {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rose-soft);
  cursor: pointer;
  opacity: 0.75;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn-toggle-eye:hover {
  opacity: 1;
  color: var(--rose-neon);
  transform: scale(1.1);
}

.eye-icon {
  width: 18px;
  height: 18px;
}

/* Separate Full-Width Pill Button Placed Under Input */
.gate-submit-btn {
  width: 100%;
  height: 44px;
  margin-top: 14px;
  background: linear-gradient(135deg, var(--rose-neon), #ba1342);
  border: none;
  border-radius: 22px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 77, 109, 0.45);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-submit-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 22px rgba(255, 77, 109, 0.6);
  transform: translateY(-1px);
}

.gate-submit-btn:active {
  transform: translateY(1px) scale(0.98);
}

.gate-error-msg {
  color: var(--ruby-error);
  font-size: 0.8rem;
  display: none;
  text-shadow: 0 0 10px var(--ruby-glow);
  text-align: center;
  margin-top: 8px;
}

/* Bottom Monogram (M ❤️ Q) */
.gate-card-monogram {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 117, 143, 0.15);
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(255, 204, 213, 0.7);
  text-align: center;
  font-weight: 700;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   SCREEN 2: "واجهة الهدية الأساسية" (Main Gift Viewport)
   ========================================================================== */

.app-viewport {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: radial-gradient(circle at top, var(--bg-gradient-top) 0%, var(--bg-obsidian) 100%);
  position: relative;
  padding: calc(var(--safe-top) + 20px) 18px calc(var(--safe-bottom) + 80px);
  display: flex;
  flex-direction: column;
}

/* Sticky App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header-monogram {
  font-size: 24px;
  font-weight: 800;
  color: var(--rose-soft);
  letter-spacing: 4px;
  text-shadow: 0 0 16px rgba(255, 117, 143, 0.55);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-lock-gate {
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-rose);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lock-gate:hover {
  background: rgba(255, 117, 143, 0.12);
  color: var(--rose-soft);
  border-color: var(--rose-quartz);
}

/* Day 19 Monthly Alert Banner */
.day19-alert-banner {
  background: linear-gradient(90deg, rgba(201, 24, 74, 0.35), rgba(255, 117, 143, 0.25));
  border: 1px solid var(--rose-neon);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(255, 77, 109, 0.3);
  animation: bannerPulse 3s infinite ease-in-out;
}

@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(255, 77, 109, 0.25); }
  50% { box-shadow: 0 4px 24px rgba(255, 117, 143, 0.5); }
}

.banner-rose-icon {
  font-size: 1.2rem;
}

.banner-text-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.banner-pill {
  background: var(--rose-neon);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.banner-msg {
  font-size: 12px;
  color: var(--text-ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-open-day19 {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Common Section Card Style */
.gift-card {
  background: var(--card-glass);
  border: 1px solid var(--border-rose);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.card-header-badge {
  font-size: 15px;
  color: var(--rose-quartz);
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header-badge .badge-icon {
  font-size: 16px;
}

.card-header-badge .badge-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--rose-quartz);
}

/* ==========================================================================
   SECTION 1: "✨ بداية حكايتنا" (Live Upward Counter)
   ========================================================================== */



.counter-display-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  gap: 8px;
  text-align: center;
  direction: rtl;
  width: 100%;
}

.counter-cell {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid var(--border-rose);
  border-radius: 14px;
  padding: 12px 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 12px rgba(255, 77, 109, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.counter-cell.highlight-cell {
  border-color: var(--rose-neon);
  background: rgba(255, 77, 109, 0.16);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.25), inset 0 0 12px rgba(255, 117, 143, 0.1);
}

.counter-number {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.counter-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.counter-colon {
  display: none;
}

.counter-caption {
  text-align: center;
  font-size: 11px;
  color: var(--rose-soft);
  margin-top: 14px;
  font-style: italic;
  line-height: 1.4;
}

/* ==========================================================================
   SECTION 2: "🎂 أعياد ميلادنا" (Royal Birthdays Countdown Hub)
   ========================================================================== */

.bday-block {
  width: 100%;
}

.bday-sub-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.bday-sub-icon {
  font-size: 15px;
  filter: drop-shadow(0 0 6px rgba(255, 117, 143, 0.4));
}

.bday-sub-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff0f3;
  letter-spacing: 0.3px;
}

.bday-block-m .bday-sub-title {
  color: #ffe5ec;
  text-shadow: 0 0 10px rgba(255, 117, 143, 0.35);
}

.bday-block-q .bday-sub-title {
  color: #ffccd5;
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.35);
}

.bday-counter-grid .bday-cell {
  background: rgba(255, 117, 143, 0.08);
  border: 1px solid rgba(255, 117, 143, 0.35);
  box-shadow: inset 0 0 12px rgba(255, 77, 109, 0.08);
}

.bday-counter-grid .bday-cell.highlight-cell {
  background: rgba(255, 77, 109, 0.2);
  border-color: var(--rose-neon);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.3), inset 0 0 12px rgba(255, 117, 143, 0.15);
}

.bday-q-grid .bday-q-cell {
  background: rgba(255, 77, 109, 0.07);
  border: 1px solid rgba(255, 117, 143, 0.3);
}

.bday-q-grid .bday-q-cell.bday-q-highlight {
  background: rgba(255, 77, 109, 0.22);
  border-color: var(--rose-neon);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.35), inset 0 0 12px rgba(255, 117, 143, 0.15);
}

.bday-caption {
  text-align: center;
  font-size: 11px;
  color: var(--rose-soft);
  margin-top: 10px;
  font-style: italic;
  line-height: 1.4;
}

.bday-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 14px;
}

.bday-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 117, 143, 0.25), transparent);
}

.bday-divider-icon {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.85;
}

/* ==========================================================================
   SECTION 3: "💌 سر المظروف" (Interactive 3D Letter)
   ========================================================================== */

.envelope-3d-stage {
  perspective: 1000px;
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.envelope-container-3d {
  width: 240px;
  height: 150px;
  background: linear-gradient(135deg, #2a081c, #16040e);
  border: 1px solid var(--border-rose);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}

.env-back-wall {
  position: absolute;
  inset: 0;
  background: #200615;
  border-radius: 6px;
}

.env-letter-slip {
  position: absolute;
  top: 10px;
  left: 12px;
  width: 216px;
  height: 130px;
  background: #fff8fa;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slip-header {
  font-size: 11px;
  font-weight: 800;
  color: var(--rose-neon);
  text-align: center;
  letter-spacing: 1.5px;
}

.slip-line {
  height: 3px;
  background: rgba(255, 77, 109, 0.2);
  border-radius: 2px;
}

.slip-line.w-70 { width: 70%; margin: 0 auto; }
.slip-line.w-90 { width: 90%; }
.slip-line.w-60 { width: 60%; }

.env-side-folds {
  position: absolute;
  inset: 0;
  z-index: 10;
  border-left: 120px solid #1c0513;
  border-right: 120px solid #1c0513;
  border-top: 75px solid transparent;
  border-bottom: 75px solid transparent;
  pointer-events: none;
}

.env-bottom-pocket {
  position: absolute;
  inset: 0;
  z-index: 11;
  border-bottom: 85px solid #27081b;
  border-left: 120px solid transparent;
  border-right: 120px solid transparent;
  border-top: 65px solid transparent;
  pointer-events: none;
}

.env-top-triangle-flap {
  position: absolute;
  inset: 0;
  z-index: 12;
  border-top: 86px solid #330b23;
  border-left: 120px solid transparent;
  border-right: 120px solid transparent;
  border-bottom: 64px solid transparent;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.env-wax-seal {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: radial-gradient(circle at 35% 35%, #ff4d6d, #800f2f);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 77, 109, 0.6);
  z-index: 20;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.seal-inscription {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.seal-glint {
  position: absolute;
  top: 3px;
  right: 6px;
  font-size: 9px;
  color: #fff;
  opacity: 0.8;
}

.envelope-tap-prompt {
  text-align: center;
  font-size: 12px;
  color: var(--rose-soft);
  font-weight: 600;
}

/* ==========================================================================
   SECTION 4: "📸 معرض الذكريات" (Hybrid: Daily API + Manual Gallery)
   ========================================================================== */

/* A) Daily Automated Inspiration Card (همسة اليوم) */
.daily-inspiration-card {
  background: linear-gradient(135deg, rgba(42, 10, 30, 0.75), rgba(18, 4, 14, 0.9));
  border: 1px solid rgba(255, 117, 143, 0.35);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 77, 109, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.daily-inspiration-card::before {
  content: '';
  position: absolute;
  top: -25px;
  left: -25px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 117, 143, 0.25), transparent 70%);
  pointer-events: none;
}

.daily-insp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.daily-insp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 77, 109, 0.2);
  border: 1px solid var(--rose-neon);
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.2);
}

.daily-sparkle {
  font-size: 13px;
}

.daily-badge-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-ivory);
}

.daily-date-stamp {
  font-size: 11px;
  color: var(--rose-soft);
  opacity: 0.9;
  font-weight: 600;
}

.daily-quote-body {
  position: relative;
  padding: 4px 6px;
  margin: 6px 0;
}

.quote-symbol {
  font-family: serif;
  font-size: 24px;
  line-height: 1;
  color: var(--rose-quartz);
  opacity: 0.6;
  vertical-align: middle;
}

.quote-symbol.quote-open {
  margin-left: 4px;
}

.quote-symbol.quote-close {
  margin-right: 4px;
}

.daily-quote-text {
  display: inline;
  font-size: 13px;
  line-height: 1.65;
  color: #fff0f3;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.daily-quote-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 117, 143, 0.15);
}

.daily-quote-author {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.btn-refresh-daily {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 117, 143, 0.35);
  color: var(--rose-soft);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh-daily:hover {
  background: rgba(255, 77, 109, 0.28);
  border-color: var(--rose-neon);
  color: #fff;
  transform: scale(1.04);
}

/* B) Memories Gallery Header */
.memories-gallery-header {
  margin-bottom: 8px;
}

.memories-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--rose-soft);
  display: block;
  margin-bottom: 2px;
}

.gallery-lead {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Gallery Track Wrapper (Arrow + Track + Arrow) */
.gallery-track-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 4px;
}

.gallery-arrow {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 77, 109, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.35);
  color: var(--rose-quartz);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  padding: 0;
}

.gallery-arrow:hover {
  background: rgba(255, 77, 109, 0.32);
  transform: scale(1.1);
}

.gallery-arrow:active {
  transform: scale(0.94);
}

.gallery-arrow.disabled,
.gallery-arrow.hidden {
  opacity: 0.2;
  pointer-events: none;
  cursor: default;
  filter: grayscale(1);
}

.polaroids-scroll-track {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 12px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.polaroids-scroll-track:active {
  cursor: grabbing;
}

.polaroids-scroll-track::-webkit-scrollbar {
  display: none;
}

.polaroids-flex-wrapper {
  display: flex;
  gap: 14px;
  padding: 0 6px;
}

.polaroid-frame-card {
  flex: 0 0 220px;
  scroll-snap-align: center;
  background: #fdfaf7;
  padding: 10px 10px 14px 10px;
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
  transform: rotate(-1.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.polaroid-frame-card:nth-child(even) {
  transform: rotate(1.8deg);
}

.polaroid-frame-card:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.85);
}

.polaroid-top-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 16px;
  background: rgba(255, 235, 240, 0.65);
  border: 1px dashed rgba(212, 136, 149, 0.45);
  pointer-events: none;
}

.polaroid-photo-viewport {
  width: 100%;
  height: 190px;
  background: #1a0412;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.polaroid-rendered-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.polaroid-video-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.embedded-video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-rose-control-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(to top, rgba(12, 4, 10, 0.95), transparent);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-video-play-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rose-neon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
}

.video-progress-slider {
  flex: 1;
  height: 4px;
  accent-color: var(--rose-neon);
  cursor: pointer;
}

.btn-video-sound-toggle {
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.polaroid-caption-text {
  font-size: 13px;
  font-weight: 600;
  color: #2b0817;
  text-align: center;
  margin-top: 10px;
  line-height: 1.35;
}

.polaroid-date-badge {
  font-size: 10px;
  color: #8a6575;
  text-align: center;
  margin-top: 2px;
}

.gallery-nav-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 117, 143, 0.25);
  transition: all 0.2s ease;
  cursor: pointer;
}

.gallery-dot:hover {
  background: rgba(255, 117, 143, 0.55);
  transform: scale(1.3);
}

.gallery-dot.active {
  width: 16px;
  border-radius: 10px;
  background: var(--rose-neon);
}

/* App Footer */
.app-footer {
  text-align: center;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-rose-glyph {
  font-size: 1.4rem;
}

.footer-heart-msg {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-eternal-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--rose-soft);
}

/* ==========================================================================
   MODALS: LETTER, DAY 19 POPUP, LIGHTBOX, ADMIN DRAWER
   ========================================================================= */

.modal-backdrop-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dim-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 2, 7, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 1. Letter Parchment Modal */
.letter-parchment-sheet {
  background: #1f0715;
  border: 1px solid var(--rose-quartz);
  border-radius: 18px;
  padding: 25px;
  max-width: 380px;
  width: 100%;
  position: relative;
  line-height: 1.8;
  font-size: 14px;
  color: var(--text-ivory);
  box-shadow: 0 0 30px rgba(255, 77, 109, 0.3);
  z-index: 2;
  animation: modalScale 0.35s ease;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.btn-modal-close-x {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 22px;
  color: var(--rose-soft);
  cursor: pointer;
  z-index: 10;
}

.parchment-header {
  position: relative;
  text-align: center;
  margin-bottom: 12px;
}

.parchment-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 50px;
  font-weight: 800;
  color: rgba(255, 117, 143, 0.05);
  letter-spacing: 3px;
  pointer-events: none;
}

.parchment-date {
  font-size: 11px;
  color: var(--rose-soft);
}

.parchment-salutation {
  color: var(--rose-quartz);
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.parchment-typewriter-text {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 14px;
  line-height: 1.8;
  min-height: 120px;
  white-space: pre-line;
  direction: rtl;
  text-align: right;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
  font-feature-settings: "liga" 1, "calt" 1;
}

.parchment-typewriter-text .typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: var(--rose-neon);
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.parchment-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-rose);
}

.parchment-sign {
  font-size: 14px;
  color: var(--rose-soft);
  font-weight: 600;
}

.parchment-heart {
  color: var(--rose-neon);
}

.btn-close-parchment {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-rose);
  color: var(--rose-soft);
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-parchment:hover {
  background: rgba(255, 77, 109, 0.15);
  border-color: var(--rose-neon);
}

/* 2. Day 19 Celebration Modal */
.day19-celebration-card {
  background: #1a0614;
  border: 1px solid var(--rose-neon);
  border-radius: 20px;
  padding: 24px 20px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 35px rgba(255, 77, 109, 0.35);
  animation: modalScale 0.35s ease;
}

.day19-icon-large {
  font-size: 2.5rem;
  margin-bottom: 6px;
}

.day19-badge-top {
  display: inline-block;
  font-size: 11px;
  color: var(--rose-soft);
  background: rgba(255, 77, 109, 0.18);
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.day19-popup-title {
  font-size: 18px;
  color: var(--rose-quartz);
  margin-bottom: 10px;
}

.day19-popup-content {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-ivory);
  margin-bottom: 16px;
  white-space: pre-line;
}

.btn-day19-ack {
  width: 100%;
  padding: 11px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--rose-neon), #c9184a);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* 3. Lightbox Photo Stage */
.lightbox-photo-stage {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-lightbox-close {
  position: absolute;
  top: -34px;
  left: 0;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-ivory);
  text-align: center;
}

/* ==========================================================================
   SECTION 5: "⚙️ لوحة الكواليس" (Admin Drawer & Badge)
   ========================================================================== */

#admin-badge {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 15px);
  left: 15px;
  background: var(--card-glass);
  border: 1px solid var(--border-rose);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--rose-soft);
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

#admin-badge:hover {
  transform: translateY(-2px);
  border-color: var(--rose-quartz);
}

.admin-badge-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  border: 1px solid var(--rose-neon);
  opacity: 0.5;
  animation: badgePulse 2.5s infinite;
  pointer-events: none;
}

@keyframes badgePulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15, 1.3); opacity: 0; }
}

.admin-drawer-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  background: #14040f;
  border-top: 1px solid var(--border-rose);
  border-radius: 24px 24px 0 0;
  padding: 16px 18px calc(var(--safe-bottom) + 20px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.95);
  animation: slideDrawerUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawerUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.admin-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-green-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose-neon);
  box-shadow: 0 0 8px var(--rose-neon);
}

.admin-title-row h3 {
  font-size: 15px;
  color: var(--text-ivory);
}

.admin-tab-nav {
  display: flex;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tab-select-btn {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
}

.tab-select-btn.active {
  background: var(--rose-neon);
  color: #fff;
  font-weight: 700;
}

.admin-sheet-content {
  overflow-y: auto;
  padding: 14px 0;
}

.admin-pane {
  display: none;
}

.admin-pane.active {
  display: block;
}

.admin-field-group {
  margin-bottom: 12px;
}

.admin-field-group label {
  display: block;
  font-size: 12px;
  color: var(--rose-soft);
  margin-bottom: 4px;
}

.admin-text-input, .admin-text-area {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-rose);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
}

.admin-text-input:focus, .admin-text-area:focus {
  border-color: var(--rose-quartz);
}

.btn-admin-action-primary {
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  background: var(--rose-neon);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
}

.admin-simulator-box {
  background: rgba(255, 77, 109, 0.08);
  border: 1px solid var(--border-rose);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.sim-box-title {
  display: block;
  font-size: 12px;
  color: var(--rose-soft);
  margin-bottom: 6px;
}

.btn-toggle-simulator {
  width: 100%;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rose-neon);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.sim-cairo-badge {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #ffccd5;
  background: rgba(255, 77, 109, 0.14);
  border-radius: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 117, 143, 0.3);
}

.admin-select-field {
  width: 100%;
  padding: 10px 12px;
  background: #190514;
  border: 1px solid var(--border-rose);
  border-radius: 10px;
  color: #fff0f3;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.admin-select-field:focus {
  border-color: var(--rose-neon);
}

.admin-select-field option {
  background: #190514;
  color: #fff0f3;
}

.admin-buttons-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.admin-buttons-row .btn-admin-action-primary {
  flex: 1.6;
}

.btn-admin-action-secondary {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 117, 143, 0.3);
  color: var(--rose-soft);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-action-secondary:hover {
  background: rgba(255, 77, 109, 0.18);
  border-color: var(--rose-neon);
  color: #fff;
}

/* Admin File Uploader & Preview */
.admin-file-input {
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border-rose);
  border-radius: 10px;
  color: var(--rose-soft);
  font-size: 12px;
  cursor: pointer;
}

.file-size-hint {
  font-size: 10px;
  color: var(--rose-quartz);
  opacity: 0.8;
  margin-top: 4px;
}

.file-preview-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 77, 109, 0.1);
  border: 1px solid var(--border-rose);
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
}

.file-preview-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-rose);
}

.file-preview-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-preview-name {
  font-size: 11px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.file-preview-size {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-clear-file {
  background: rgba(255, 51, 85, 0.2);
  border: 1px solid var(--ruby-error);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 0;
}

.admin-divider-text {
  position: relative;
  text-align: center;
  margin: 14px 0 10px;
}

.admin-divider-text::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.admin-divider-text span {
  position: relative;
  background: #14040f;
  padding: 0 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-media-rows-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-soft);
  margin-top: 14px;
  margin-bottom: 6px;
}

.admin-media-rows-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.admin-single-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-rose);
  border-radius: 8px;
  font-size: 11px;
}

.admin-row-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border-rose);
  flex-shrink: 0;
}

.admin-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-row-caption {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-row-date {
  font-size: 10px;
  color: var(--text-muted);
}

.btn-edit-row {
  color: var(--rose-soft);
  background: rgba(255, 117, 143, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.35);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-edit-row:hover {
  background: rgba(255, 77, 109, 0.3);
  border-color: var(--rose-neon);
  color: #fff;
}

.btn-del-row {
  color: var(--ruby-error);
  background: rgba(255, 51, 85, 0.1);
  border: 1px solid rgba(255, 51, 85, 0.25);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-del-row:hover {
  background: var(--ruby-error);
  color: #fff;
}

/* Settings Pane & Toggle Switch */
.admin-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-rose);
  border-radius: 12px;
  margin-bottom: 14px;
}

.setting-text-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setting-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-soft);
}

.setting-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* iOS-Style Toggle Switch */
.admin-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.admin-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid var(--border-rose);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.admin-toggle-switch input:checked + .toggle-slider {
  background-color: var(--rose-neon);
  border-color: var(--rose-quartz);
}

.admin-toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.admin-danger-zone {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 51, 85, 0.3);
}

.btn-danger-reset {
  width: 100%;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 51, 85, 0.12);
  border: 1px solid rgba(255, 51, 85, 0.3);
  color: var(--ruby-error);
  font-size: 11px;
  cursor: pointer;
}

/* ==========================================================================
   Desktop / Tablet Adaptations
   ========================================================================== */

@media (min-width: 768px) {
  .app-viewport {
    border-left: 1px solid var(--border-rose);
    border-right: 1px solid var(--border-rose);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
  }
}

/* ==========================================================================
   PHASE 1 UPGRADES: Ambient Canvas, Floating Magic Bar, Timeline, Love Jar
   ========================================================================== */

/* 1. Ambient Particle Canvas */
.ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* 2. Floating Magic Bar (Mood Switcher + Vinyl Record) */
.floating-magic-bar {
  position: fixed;
  bottom: 20px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1100;
  pointer-events: auto;
}

.mood-switcher-pill {
  display: flex;
  align-items: center;
  background: rgba(20, 5, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 117, 143, 0.35);
  border-radius: 30px;
  padding: 4px 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 77, 109, 0.2);
  gap: 4px;
}

.mood-btn {
  background: transparent;
  border: none;
  font-size: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.6;
}

.mood-btn:hover {
  opacity: 0.9;
  transform: scale(1.1);
}

.mood-btn.active {
  opacity: 1;
  background: rgba(255, 77, 109, 0.35);
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
  transform: scale(1.08);
}

/* Vinyl Player Widget */
.vinyl-player-widget {
  position: relative;
  width: 44px;
  height: 44px;
  background: rgba(20, 5, 16, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 117, 143, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 77, 109, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vinyl-player-widget:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), 0 0 22px rgba(255, 77, 109, 0.45);
}

.vinyl-disc {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, #2a0b1f 0%, #150310 70%, #0a0108 100%);
  border: 1px solid rgba(255, 117, 143, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vinyl-disc.spinning {
  animation: spinVinyl 4s linear infinite;
}

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

.vinyl-grooves {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.vinyl-center-label {
  font-size: 8px;
  font-weight: 700;
  color: var(--rose-neon);
  text-shadow: 0 0 4px var(--rose-neon);
  letter-spacing: 0.5px;
}

.vinyl-audio-waves {
  position: absolute;
  bottom: -6px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.vinyl-audio-waves span {
  width: 2px;
  height: 3px;
  background: var(--rose-neon);
  border-radius: 2px;
  box-shadow: 0 0 4px var(--rose-neon);
  transition: height 0.2s ease;
}

.vinyl-player-widget.playing .vinyl-audio-waves span:nth-child(1) {
  animation: waveBar 0.8s ease-in-out infinite alternate;
}
.vinyl-player-widget.playing .vinyl-audio-waves span:nth-child(2) {
  animation: waveBar 0.6s ease-in-out infinite alternate 0.2s;
}
.vinyl-player-widget.playing .vinyl-audio-waves span:nth-child(3) {
  animation: waveBar 0.9s ease-in-out infinite alternate 0.4s;
}
.vinyl-player-widget.playing .vinyl-audio-waves span:nth-child(4) {
  animation: waveBar 0.7s ease-in-out infinite alternate 0.1s;
}

@keyframes waveBar {
  0% { height: 3px; }
  100% { height: 10px; }
}

/* 3. Section 3: Love Journey Timeline */
.timeline-intro-lead {
  text-align: center;
  font-size: 11px;
  color: var(--rose-soft);
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.5;
}

.love-timeline-track {
  position: relative;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.love-timeline-track::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 20px;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.6), rgba(255, 117, 143, 0.2), rgba(255, 77, 109, 0.6));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.3);
}

.timeline-milestone-card {
  position: relative;
  margin-right: 44px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 117, 143, 0.25);
  border-radius: 16px;
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 0 14px rgba(255, 77, 109, 0.05);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.timeline-milestone-card:hover {
  transform: translateY(-2px);
  border-color: var(--rose-neon);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), inset 0 0 16px rgba(255, 77, 109, 0.1);
}

.timeline-milestone-node {
  position: absolute;
  top: 16px;
  right: -32px;
  width: 22px;
  height: 22px;
  background: #14040f;
  border: 2px solid var(--rose-neon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 0 10px var(--rose-neon);
  z-index: 2;
}

.timeline-milestone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.timeline-date-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--rose-soft);
  background: rgba(255, 117, 143, 0.12);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 117, 143, 0.2);
}

.timeline-milestone-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff0f3;
  margin-bottom: 6px;
}

.timeline-milestone-desc {
  font-size: 12px;
  line-height: 1.6;
  color: #e0d0d8;
}

/* 4. Section 5: Jar of 100 Love Reasons */
.lovejar-intro-lead {
  text-align: center;
  font-size: 11px;
  color: var(--rose-soft);
  margin-bottom: 16px;
  font-style: italic;
  line-height: 1.5;
}

.lovejar-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.lovejar-container {
  position: relative;
  width: 140px;
  height: 170px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lovejar-container:hover {
  transform: scale(1.05);
}

.lovejar-lid {
  width: 90px;
  height: 24px;
  background: linear-gradient(135deg, #d4af37, #f7e7a1, #b38728);
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  position: relative;
  z-index: 3;
  transition: transform 0.3s ease;
}

.lovejar-container:hover .lovejar-lid {
  transform: translateY(-4px);
}

.lovejar-lid-knob {
  width: 24px;
  height: 10px;
  background: #c59b27;
  border-radius: 6px 6px 0 0;
  margin: -6px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.lovejar-glass-body {
  position: relative;
  width: 120px;
  height: 140px;
  margin-top: -3px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 117, 143, 0.08) 50%, rgba(255, 77, 109, 0.18) 100%);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top: none;
  border-radius: 12px 12px 28px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 117, 143, 0.25), inset -4px 0 10px rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lovejar-glow-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 77, 109, 0.3) 0%, transparent 70%);
  animation: pulseJarGlow 3s ease-in-out infinite alternate;
}

@keyframes pulseJarGlow {
  from { opacity: 0.5; }
  to { opacity: 0.9; }
}

.lovejar-label-band {
  position: relative;
  z-index: 2;
  background: rgba(20, 4, 15, 0.85);
  border: 1px solid rgba(255, 117, 143, 0.4);
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.lovejar-label-band span {
  font-size: 9.5px;
  font-weight: 700;
  color: #fff0f3;
  letter-spacing: 0.5px;
}

.jar-floating-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.jar-heart-paper {
  position: absolute;
  font-size: 13px;
  animation: floatInJar 4s ease-in-out infinite alternate;
}

.jh-1 { top: 25%; left: 20%; animation-delay: 0s; }
.jh-2 { top: 60%; right: 25%; animation-delay: 1.2s; }
.jh-3 { top: 70%; left: 35%; animation-delay: 2.1s; font-size: 11px; color: var(--gold-luxury); }
.jh-4 { top: 35%; right: 20%; animation-delay: 0.6s; }

@keyframes floatInJar {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(10deg); }
  100% { transform: translateY(-14px) rotate(-8deg); }
}

.lovejar-tap-hint {
  font-size: 11px;
  color: var(--rose-soft);
  margin-top: 14px;
  font-style: italic;
  animation: breatheHint 2s ease-in-out infinite alternate;
}

@keyframes breatheHint {
  from { opacity: 0.7; }
  to { opacity: 1; transform: translateY(-2px); }
}

/* 5. Love Reason Origami Modal */
.reason-origami-card {
  position: relative;
  width: 90%;
  max-width: 360px;
  background: linear-gradient(135deg, #200718 0%, #150410 100%);
  border: 1px solid rgba(255, 117, 143, 0.45);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 77, 109, 0.25);
  animation: unfoldOrigami 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

@keyframes unfoldOrigami {
  0% {
    opacity: 0;
    transform: scale(0.7) rotateX(25deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateX(0deg);
  }
}

.reason-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  background: rgba(255, 77, 109, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.35);
  border-radius: 20px;
  margin-bottom: 16px;
}

.reason-badge-sparkle {
  color: var(--gold-luxury);
  font-size: 11px;
}

.reason-badge-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-soft);
}

.reason-text-body {
  font-size: 14px;
  line-height: 1.8;
  color: #fff;
  font-weight: 500;
  padding: 10px 6px 18px;
  text-shadow: 0 0 10px rgba(255, 117, 143, 0.2);
}

.reason-card-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 117, 143, 0.2);
}

.btn-another-reason {
  flex: 1;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--rose-neon), var(--rose-deep));
  border: none;
  border-radius: 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 77, 109, 0.35);
  transition: transform 0.2s ease;
}

.btn-another-reason:hover {
  transform: translateY(-2px);
}

.btn-favorite-reason {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 117, 143, 0.3);
  border-radius: 16px;
  color: var(--rose-soft);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-favorite-reason.favorited {
  background: rgba(255, 77, 109, 0.25);
  color: #fff;
  border-color: var(--rose-neon);
}

/* 6. Admin Panel Lists for Timeline & Reasons */
.admin-timeline-rows-list,
.admin-reasons-rows-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 4px;
}

.admin-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 117, 143, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  gap: 8px;
}

.admin-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.admin-item-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.admin-item-subtitle {
  font-size: 10.5px;
  color: var(--rose-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.admin-item-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.btn-edit-item {
  background: rgba(255, 117, 143, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.4);
  border-radius: 8px;
  color: var(--rose-soft);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-edit-item:hover {
  background: rgba(255, 77, 109, 0.28);
  border-color: var(--rose-neon);
  color: #fff;
}

.btn-delete-item {
  background: rgba(255, 51, 85, 0.15);
  border: 1px solid rgba(255, 51, 85, 0.4);
  border-radius: 8px;
  color: var(--ruby-error);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-delete-item:hover {
  background: rgba(255, 51, 85, 0.28);
  color: #fff;
}

.admin-audio-test-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Vinyl Container & Skip Control */
.vinyl-player-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vinyl-skip-btn {
  background: rgba(20, 5, 16, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 117, 143, 0.4);
  color: var(--rose-neon);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 77, 109, 0.2);
  transition: all 0.25s ease;
  font-size: 13px;
  padding: 0;
}

.vinyl-skip-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 77, 109, 0.25);
  border-color: var(--rose-neon);
  box-shadow: 0 0 14px rgba(255, 77, 109, 0.5);
}

.vinyl-skip-btn:active {
  transform: scale(0.95);
}

/* Admin Playlist Manager */
.admin-playlist-container {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 117, 143, 0.2);
  border-radius: 12px;
  padding: 10px;
}

.admin-playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.playlist-header-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-soft);
}

.btn-clear-playlist {
  background: transparent;
  border: 1px solid rgba(255, 51, 85, 0.3);
  color: var(--ruby-error);
  font-size: 10px;
  font-family: inherit;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-playlist:hover {
  background: rgba(255, 51, 85, 0.2);
  border-color: var(--ruby-error);
}

.admin-playlist-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.admin-playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20, 5, 16, 0.6);
  border: 1px solid rgba(255, 117, 143, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  gap: 10px;
  transition: all 0.2s ease;
}

.admin-playlist-item:hover {
  border-color: rgba(255, 117, 143, 0.45);
  background: rgba(30, 8, 25, 0.7);
}

.admin-playlist-item.is-playing {
  border-color: var(--rose-neon);
  background: rgba(255, 77, 109, 0.12);
  box-shadow: 0 0 12px rgba(255, 77, 109, 0.25);
}

.playlist-track-index {
  font-size: 11px;
  font-weight: 700;
  color: var(--rose-soft);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.playlist-track-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  text-align: right;
}

.playlist-track-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: right;
}

.playlist-track-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.playlist-playing-tag {
  background: rgba(255, 77, 109, 0.3);
  border: 1px solid var(--rose-neon);
  color: #fff;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  animation: pulseNeon 1.5s infinite alternate;
}

.playlist-track-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-track-play {
  background: rgba(255, 117, 143, 0.15);
  border: 1px solid rgba(255, 117, 143, 0.4);
  color: var(--rose-soft);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-track-play:hover {
  background: rgba(255, 77, 109, 0.3);
  border-color: var(--rose-neon);
  color: #fff;
}

.admin-playlist-item.is-playing .btn-track-play {
  background: var(--rose-neon);
  border-color: var(--rose-neon);
  color: #fff;
}

.btn-track-delete {
  background: rgba(255, 51, 85, 0.12);
  border: 1px solid rgba(255, 51, 85, 0.35);
  color: var(--ruby-error);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-track-delete:hover {
  background: rgba(255, 51, 85, 0.25);
  color: #fff;
}

.playlist-empty-state {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  padding: 16px 8px;
  line-height: 1.5;
}

.admin-checkbox-row {
  margin-top: 10px;
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--rose-soft);
  cursor: pointer;
  user-select: none;
}

.admin-checkbox-label input[type="checkbox"] {
  accent-color: var(--rose-neon);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
