/* ============================================================
   MINECRAFT MIRROR — Design System
   ============================================================ */
:root {
  --rose-deep:    #8B1A3E;
  --rose-mid:     #B5294E;
  --rose-light:   #E8839A;
  --blush:        #F4C5CC;
  --cream:        #FFF8F5;
  --gold:         #C9A84C;
  --gold-light:   #E8D5A0;
  --dark:         #0D0508;
  --dark-mid:     #160810;
  --dark-2:       #1F0F18;
  --glass-bg:     rgba(255,240,248,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --text-primary: #FFFFFF;
  --text-muted:   rgba(255,255,255,0.55);
  --text-faint:   rgba(255,255,255,0.3);
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'Jost', system-ui, sans-serif;
  --radius:       20px;
  --shadow:       0 24px 60px rgba(0,0,0,0.5);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background-color: var(--dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient Background ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(181,41,78,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 80%, rgba(201,168,76,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Utility ── */
.hidden { display: none !important; }
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* ── Ambient Hearts ── */
.hearts-container, .sparkles-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.floating-heart {
  position: absolute; bottom: -60px;
  animation: floatUp linear forwards;
  opacity: 0.5; user-select: none;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-110vh) rotate(360deg) scale(1.1); opacity: 0; }
}
.sparkle {
  position: absolute; width: 3px; height: 3px;
  background: var(--gold-light); border-radius: 50%;
  animation: sparkleAnim ease-in-out infinite alternate;
}
@keyframes sparkleAnim {
  0%   { opacity: 0; transform: scale(0.5); }
  50%  { opacity: 0.8; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(0.5); }
}

/* ── Reveal animation ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--dark);
  background-image: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(181,41,78,0.12) 0%, transparent 70%);
  transition: opacity 0.8s ease;
}
.login-overlay.fade-out { opacity: 0; pointer-events: none; }

.login-card {
  text-align: center; padding: 60px 48px;
  max-width: 440px; width: 90%;
  background: rgba(30,10,20,0.8);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 32px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
}
.login-ornament {
  font-size: 2rem; color: var(--gold); margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.15)} }

.login-title {
  font-family: var(--font-serif); font-size: 2.8rem; font-weight: 600;
  color: var(--text-primary); letter-spacing: 0.02em; margin-bottom: 8px;
}
.login-sub { color: var(--text-muted); font-size: 1rem; margin-bottom: 36px; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form input {
  padding: 16px 22px; border-radius: 50px;
  border: 1px solid rgba(201,168,76,0.25);
  background: rgba(255,255,255,0.04);
  color: #fff; font-family: var(--font-sans); font-size: 1rem;
  text-align: center; outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.login-form input::placeholder { color: var(--text-faint); }
.login-form input:focus {
  border-color: var(--rose-mid);
  box-shadow: 0 0 0 3px rgba(181,41,78,0.15);
}
.login-form button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 24px; border-radius: 50px; border: none;
  background: linear-gradient(135deg, var(--rose-mid), var(--rose-deep));
  color: #fff; font-family: var(--font-sans); font-size: 1.05rem;
  font-weight: 600; cursor: pointer; letter-spacing: 0.04em; width: 100%;
  box-shadow: 0 8px 24px rgba(181,41,78,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.login-form button:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(181,41,78,0.5); }
.error-msg { color: var(--rose-light); font-size: 0.9rem; margin-top: 14px; min-height: 20px; }
.login-footer { color: var(--text-faint); font-size: 0.8rem; margin-top: 28px; font-style: italic; }

/* ============================================================
   MAIN SITE
   ============================================================ */
.main-site { position: relative; z-index: 1; }

/* ── Navigation ── */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  background: rgba(13,5,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s;
}
.nav-logo {
  font-family: var(--font-serif); font-size: 1.3rem; color: var(--gold);
  font-style: italic; letter-spacing: 0.05em; flex-shrink: 0;
}
.nav-links {
  display: flex; gap: 4px; flex: 1; overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 50px;
  color: var(--text-muted); font-size: 0.88rem; font-weight: 500;
  text-decoration: none; white-space: nowrap;
  transition: all 0.25s;
}
.nav-link:hover, .nav-link.active {
  color: #fff; background: rgba(181,41,78,0.2);
}
.nav-link.active { color: var(--rose-light); }
.nav-icon { font-size: 1rem; }
.nav-label { display: none; }
@media (min-width: 640px) { .nav-label { display: inline; } }
.nav-music-btn {
  background: none; border: 1px solid var(--glass-border); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; font-size: 1rem;
  color: var(--gold); flex-shrink: 0; transition: all 0.2s;
}
.nav-music-btn:hover { background: rgba(201,168,76,0.1); }

/* ── Section Base ── */
.section {
  min-height: 100vh; padding: 100px 24px 80px;
  max-width: 1200px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600; line-height: 1.1; margin-bottom: 14px;
  color: var(--text-primary);
}
.section-desc { color: var(--text-muted); font-size: 1.05rem; }

/* ============================================================
   HOME
   ============================================================ */
.section-home {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding-top: 64px;
}
.home-content { max-width: 680px; }
.home-greeting {
  font-family: var(--font-serif); font-size: 1.2rem; font-style: italic;
  color: var(--gold); letter-spacing: 0.1em; margin-bottom: 16px;
}
.home-name {
  font-family: var(--font-serif); font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600; line-height: 1; color: var(--text-primary);
  text-shadow: 0 0 60px rgba(181,41,78,0.3);
  margin-bottom: 20px;
}
.home-sub { color: var(--text-muted); font-size: 1.1rem; line-height: 1.7; margin-bottom: 50px; }

/* Love Timer */
.timer-block {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(181,41,78,0.1) 0%, transparent 65%),
    var(--glass-bg);
  border: 1px solid rgba(181,41,78,0.22);
  border-radius: var(--radius); padding: 32px; margin-bottom: 50px;
  box-shadow: 0 0 0 1px rgba(181,41,78,0.06), inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
}
.timer-block::before {
  content: '';
  position: absolute; top: -1px; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.5), transparent);
}
.timer-label-top {
  font-family: var(--font-serif); font-size: 1.1rem; font-style: italic;
  color: var(--gold-light); margin-bottom: 24px; letter-spacing: 0.03em;
  opacity: 0.85;
}
.timer-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}
@media(min-width:600px){ .timer-grid { grid-template-columns: repeat(6, 1fr); } }
.timer-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(181,41,78,0.12);
  border-radius: 16px;
  padding: 18px 8px 14px; text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.timer-card:hover {
  border-color: rgba(181,41,78,0.35);
  box-shadow: 0 0 18px rgba(181,41,78,0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}
.timer-card.tick .timer-val { animation: timerTick 0.28s ease-out; }
@keyframes timerTick {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.18); filter: drop-shadow(0 0 12px rgba(232,131,154,0.85)); }
  100% { transform: scale(1); }
}
.timer-val {
  font-family: var(--font-serif); font-size: 2.2rem; font-weight: 600;
  line-height: 1;
  background: linear-gradient(160deg, #fff 20%, var(--rose-light) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(181,41,78,0.45));
  animation: timerGlow 4s ease-in-out infinite alternate;
}
@keyframes timerGlow {
  0%   { filter: drop-shadow(0 0 4px rgba(181,41,78,0.35)); }
  100% { filter: drop-shadow(0 0 12px rgba(232,131,154,0.65)); }
}
.timer-unit {
  font-size: 0.65rem; color: var(--text-faint); margin-top: 6px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.timer-since { color: var(--text-faint); font-size: 0.85rem; font-style: italic; font-family: var(--font-serif); }

.home-scroll-hint {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-arrow {
  animation: bounce 1.8s ease-in-out infinite;
  font-size: 1.4rem; color: var(--rose-light);
}
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }

/* ============================================================
   PHOTOS
   ============================================================ */
.section-photos { max-width: 1200px; }
.album-grid {
  columns: 3; column-gap: 16px;
}
@media(max-width:900px){ .album-grid { columns: 2; } }
@media(max-width:550px){ .album-grid { columns: 1; } }
.photo-item {
  break-inside: avoid; margin-bottom: 16px;
  border-radius: 14px; overflow: hidden; cursor: pointer;
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.photo-item:hover { transform: scale(1.02); box-shadow: 0 16px 40px rgba(181,41,78,0.3); }
.photo-item img { width: 100%; display: block; }
.photo-item .photo-overlay {
  position: absolute; inset: 0; background: rgba(181,41,78,0.0);
  transition: background 0.3s; display: flex; align-items: center; justify-content: center;
  font-size: 2rem; opacity: 0;
}
.photo-item:hover .photo-overlay { background: rgba(181,41,78,0.3); opacity: 1; }

/* ============================================================
   CYCLE TRACKER
   ============================================================ */
.section-cycle { max-width: 1200px; }
.cycle-layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "phase"
    "stats"
    "calendar"
    "mood";
  gap: 20px;
}
@media(min-width:768px){
  .cycle-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "phase   stats"
      "calendar calendar"
      "mood    mood";
  }
}
@media(min-width:1100px){
  .cycle-layout {
    grid-template-columns: 280px 1fr 320px;
    grid-template-rows: auto auto;
    grid-template-areas:
      "phase   calendar  mood"
      "stats   calendar  mood";
  }
}

.cycle-phase-card { grid-area: phase; padding: 32px 24px; text-align: center; }
.cycle-stats-col  { grid-area: stats; display: flex; flex-direction: column; gap: 12px; }
.cycle-calendar-card { grid-area: calendar; padding: 28px; }
.mood-logger-card { grid-area: mood; padding: 28px; }

/* Phase Ring */
.phase-ring-wrapper { position: relative; width: 140px; height: 140px; margin: 0 auto 20px; }
.phase-ring { width: 100%; height: 100%; }
.phase-ring-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.phase-icon { font-size: 2rem; margin-bottom: 4px; }
.phase-day { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; line-height: 1; }
.phase-day-label { font-size: 0.7rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.phase-name { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; color: var(--rose-light); margin-bottom: 10px; }
.phase-advice { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px; }
.cycle-settings-btn {
  padding: 10px 22px; border-radius: 50px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.06); color: var(--text-muted); font-family: var(--font-sans);
  font-size: 0.88rem; cursor: pointer; transition: all 0.2s;
}
.cycle-settings-btn:hover { background: rgba(181,41,78,0.15); color: #fff; }

.cycle-stat-card { padding: 20px 22px; }
.cstat-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 6px; }
.cstat-val { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--rose-light); }
.cstat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* Calendar */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-month-title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; }
.cal-nav {
  background: none; border: 1px solid var(--glass-border); border-radius: 50%;
  width: 34px; height: 34px; color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer; transition: all 0.2s;
}
.cal-nav:hover { background: rgba(181,41,78,0.15); color: #fff; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}
.cal-weekdays span { text-align: center; font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 16px; }
.cal-day {
  aspect-ratio: 1; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  font-size: 0.82rem; cursor: pointer; position: relative;
  transition: all 0.2s; border: 1px solid transparent;
}
.cal-day:hover { border-color: rgba(181,41,78,0.4); }
.cal-day.empty { pointer-events: none; }
.cal-day.today { border-color: var(--gold); color: var(--gold); font-weight: 600; }
.cal-day.period { background: rgba(181,41,78,0.35); color: #fff; }
.cal-day.ovulation { background: rgba(201,168,76,0.45); color: #fff; }
.cal-day.fertile { background: rgba(74,222,128,0.2); }
.cal-day.luteal { background: rgba(129,140,248,0.15); }
.cal-day.has-log::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
}
.cal-legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Settings Modal */
.cycle-settings-modal {
  position: fixed; inset: 0; z-index: 500;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
}
.cycle-settings-modal.open { display: flex; }
.cycle-settings-inner {
  background: var(--dark-2); border: 1px solid var(--glass-border);
  border-radius: 24px; padding: 40px 32px; max-width: 380px; width: 90%;
  box-shadow: var(--shadow);
}
.cycle-settings-inner h3 { font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: 24px; }
.settings-field { margin-bottom: 18px; }
.settings-field label { display: block; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
.settings-field input {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.06);
  color: #fff; font-family: var(--font-sans); font-size: 1rem; outline: none;
}
.settings-field input:focus { border-color: var(--rose-mid); }
.settings-modal-btns { display: flex; gap: 12px; margin-top: 24px; }
.btn-save, .btn-close {
  flex: 1; padding: 12px; border-radius: 50px; border: none;
  font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
.btn-save { background: linear-gradient(135deg, var(--rose-mid), var(--rose-deep)); color: #fff; }
.btn-close { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* Mood Logger */
.mood-logger-title { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 600; margin-bottom: 18px; }
.mood-options { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.mood-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid transparent;
  background: rgba(255,255,255,0.06); font-size: 1.5rem; cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.mood-btn:hover { transform: scale(1.15); }
.mood-btn.selected { border-color: var(--rose-light); background: rgba(181,41,78,0.2); }
.symptom-label { font-size: 0.8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.symptom-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.symptom-btn {
  padding: 7px 14px; border-radius: 50px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04); color: var(--text-muted); font-family: var(--font-sans);
  font-size: 0.82rem; cursor: pointer; transition: all 0.2s;
}
.symptom-btn:hover { border-color: rgba(181,41,78,0.4); }
.symptom-btn.selected { background: rgba(181,41,78,0.2); border-color: var(--rose-light); color: #fff; }
.mood-note {
  width: 100%; min-height: 80px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  color: #fff; font-family: var(--font-sans); font-size: 0.9rem;
  resize: vertical; outline: none; margin-bottom: 14px;
}
.mood-note::placeholder { color: var(--text-faint); }
.save-mood-btn {
  width: 100%; padding: 13px; border-radius: 50px; border: none;
  background: linear-gradient(135deg, var(--rose-mid), var(--rose-deep));
  color: #fff; font-family: var(--font-sans); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.save-mood-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(181,41,78,0.4); }
.mood-saved-msg { text-align: center; color: var(--gold); font-size: 0.88rem; margin-top: 10px; min-height: 20px; }

/* ============================================================
   LOVE CARDS
   ============================================================ */
.section-cards { max-width: 1100px; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.love-card { height: 280px; perspective: 1000px; cursor: pointer; }
.card-inner {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; transition: transform 0.75s cubic-bezier(0.4,0,0.2,1);
}
.love-card:hover .card-inner,
.love-card.flipped .card-inner { transform: rotateY(180deg); }
.card-front, .card-back {
  position: absolute; inset: 0; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 30px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.card-front { /* glass-card applied via HTML */ }
.card-back {
  background: linear-gradient(135deg, rgba(181,41,78,0.5), rgba(139,26,62,0.7));
  border: 1px solid rgba(181,41,78,0.3);
  transform: rotateY(180deg);
}
.card-emoji { font-size: 3.5rem; margin-bottom: 16px; }
.card-front h3 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; }
.card-back p { font-size: 1.05rem; line-height: 1.6; text-align: center; color: #fff; }

/* ============================================================
   QUIZ
   ============================================================ */
.section-quiz { max-width: 1200px; }
.quiz-container { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media(min-width:768px){ .quiz-container { grid-template-columns: 1fr 1fr; } }
.quiz-card { padding: 32px; }
.quiz-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.quiz-card-icon { font-size: 2rem; }
.quiz-card-head h3 { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; }
.quiz-progress-bar {
  height: 6px; border-radius: 50px; background: rgba(255,255,255,0.08); margin-bottom: 24px; overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; width: 0; border-radius: 50px;
  background: linear-gradient(90deg, var(--rose-light), var(--rose-mid));
  transition: width 0.5s ease;
}
.quiz-body { min-height: 240px; }
.quiz-q-num { font-size: 0.75rem; color: var(--text-faint); margin-bottom: 8px; letter-spacing: 0.08em; }
.quiz-q-text { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; line-height: 1.4; margin-bottom: 20px; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  padding: 13px 18px; border-radius: 14px; border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04); color: var(--text-muted); font-family: var(--font-sans);
  font-size: 0.92rem; cursor: pointer; text-align: left; transition: all 0.2s;
}
.quiz-opt:hover { border-color: rgba(181,41,78,0.4); background: rgba(181,41,78,0.08); color: #fff; }
.quiz-opt.correct { background: rgba(74,222,128,0.15); border-color: #4ade80; color: #4ade80; }
.quiz-opt.wrong   { background: rgba(181,41,78,0.15); border-color: var(--rose-mid); color: var(--rose-light); }
.quiz-opt.disabled { opacity: 0.4; pointer-events: none; }
.quiz-feedback { font-size: 0.88rem; margin-top: 12px; font-weight: 600; padding: 8px 14px; border-radius: 10px; }
.quiz-feedback.correct { color: #4ade80; background: rgba(74,222,128,0.1); }
.quiz-feedback.wrong   { color: var(--rose-light); background: rgba(181,41,78,0.1); }
.quiz-result { text-align: center; padding: 20px 0; }
.quiz-result-emoji { font-size: 4rem; margin-bottom: 12px; }
.quiz-result-score { font-family: var(--font-serif); font-size: 2.4rem; font-weight: 600; color: var(--rose-light); margin-bottom: 8px; }
.quiz-result-msg { color: var(--text-muted); font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }
.quiz-retry {
  padding: 11px 28px; border-radius: 50px; border: 1px solid var(--rose-mid);
  background: rgba(181,41,78,0.15); color: var(--rose-light); font-family: var(--font-sans);
  font-size: 0.9rem; cursor: pointer; transition: all 0.2s;
}
.quiz-retry:hover { background: rgba(181,41,78,0.3); }

/* ============================================================
   LOVE LETTER
   ============================================================ */
.section-letter { max-width: 800px; }
.envelope-scene { display: flex; justify-content: center; padding: 40px 0 80px; }
.envelope-wrapper {
  position: relative; width: 320px; height: 220px; cursor: pointer;
}
.env-body {
  position: absolute; inset: 0; background: linear-gradient(135deg, var(--rose-deep), var(--rose-mid));
  border-radius: 8px 8px 14px 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 50px rgba(181,41,78,0.4);
}
.env-flap {
  position: absolute; top: 0; left: 0; right: 0;
  height: 0; border-left: 160px solid transparent; border-right: 160px solid transparent;
  border-top: 110px solid var(--rose-deep);
  transform-origin: top; z-index: 3;
  transition: transform 0.6s ease 0.3s, filter 0.3s;
  filter: brightness(0.8);
}
.envelope-wrapper.open .env-flap { transform: rotateX(180deg); filter: brightness(1); }
.env-seal {
  font-size: 3rem; color: var(--gold);
  animation: pulse 2s ease-in-out infinite;
  transition: opacity 0.3s;
  text-shadow: 0 4px 12px rgba(201,168,76,0.5);
}
.envelope-wrapper.open .env-seal { opacity: 0; }
.letter-sheet {
  position: absolute; top: 10px; left: 16px; right: 16px;
  background: var(--cream); border-radius: 6px;
  padding: 24px; z-index: 2;
  max-height: 192px; overflow: hidden;
  transition: top 0.9s cubic-bezier(0.34,1.56,0.64,1) 0.6s,
              max-height 0.9s cubic-bezier(0.34,1.56,0.64,1) 0.6s,
              box-shadow 0.4s;
}
.envelope-wrapper.open .letter-sheet {
  top: -320px; max-height: 500px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.letter-content { font-family: var(--font-serif); font-size: 1.05rem; color: #2a0a15; line-height: 1.65; }
.letter-content p { margin-bottom: 10px; }
.letter-sign { font-style: italic; font-size: 1.1rem; }

/* ============================================================
   MAP
   ============================================================ */
.section-map { max-width: 1200px; }
.map-container { border-radius: var(--radius); overflow: hidden; }
.map-loading { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.map-container svg { width: 100%; height: auto; display: block; }
.map-container svg path {
  fill: rgba(181,41,78,0.15); stroke: rgba(255,255,255,0.08);
  stroke-width: 0.5; cursor: pointer;
  transition: fill 0.2s, stroke 0.2s;
}
.map-container svg path:hover {
  fill: rgba(181,41,78,0.45); stroke: var(--rose-light);
}
.map-tooltip {
  position: fixed; pointer-events: none; z-index: 1000;
  background: linear-gradient(135deg, var(--rose-deep), var(--rose-mid));
  color: #fff; padding: 8px 18px; border-radius: 50px;
  font-size: 0.88rem; font-weight: 600;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}
.map-tooltip.visible { opacity: 1; transform: translateY(0); }
.map-modal-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.map-modal-overlay.active { opacity: 1; visibility: visible; }
.map-modal {
  width: 90%; max-width: 700px; max-height: 85vh;
  overflow-y: auto; padding: 44px; position: relative;
  transform: scale(0.9); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.map-modal-overlay.active .map-modal { transform: scale(1); }
.map-modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: rgba(181,41,78,0.2); color: var(--rose-light);
  font-size: 1rem; cursor: pointer; transition: all 0.2s;
}
.map-modal-close:hover { background: var(--rose-mid); color: #fff; transform: rotate(90deg); }
.map-modal-title { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; margin-bottom: 6px; }
.map-modal-subtitle { color: var(--text-muted); margin-bottom: 24px; }
.map-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 14px; }
.map-gallery-item { border-radius: 12px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.map-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.map-gallery-item:hover img { transform: scale(1.08); }
.map-gallery-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: 0.95rem; }
.map-gallery-empty p:first-child { font-size: 2rem; margin-bottom: 12px; }

.map-upload-bar {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.map-photo-count {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  min-height: 1.2em;
}
.map-add-photo-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 50px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--rose-mid), var(--rose-deep));
  color: #fff; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500;
  box-shadow: 0 4px 18px rgba(181,41,78,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.map-add-photo-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(181,41,78,0.5); }
.map-add-photo-btn:active { transform: translateY(0); }

.map-gallery-item { position: relative; }
.map-photo-delete {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.7); color: #fff; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.map-gallery-item:hover .map-photo-delete { opacity: 1; }
.map-photo-delete:hover { background: #c0392b; }

/* ── Lightbox (shared) ── */
.map-lightbox-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.94); display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s;
}
.map-lightbox-overlay.active { opacity: 1; visibility: visible; }
.map-lightbox-overlay img { max-width: 90%; max-height: 88vh; border-radius: 12px; object-fit: contain; }
.lbx-close {
  position: absolute; top: 24px; right: 24px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.5); color: #fff; font-size: 1.1rem; cursor: pointer;
  transition: all 0.2s;
}
.lbx-close:hover { background: var(--rose-mid); }
.lbx-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.5); color: #fff; font-size: 1.8rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.lbx-nav:hover { background: var(--rose-mid); }
.lbx-prev { left: 20px; }
.lbx-next { right: 20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { text-align: center; padding: 80px 24px 120px; }
.footer-divider { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 32px; }
.footer-line { height: 1px; width: 120px; background: linear-gradient(90deg, transparent, rgba(181,41,78,0.4), transparent); }
.footer-divider span { color: var(--rose-light); }
.footer-name {
  font-family: 'Pinyon Script', cursive;
  font-size: clamp(5rem, 15vw, 12rem); color: transparent;
  background: linear-gradient(135deg, #fff, var(--blush), #fff);
  background-clip: text; -webkit-background-clip: text;
  background-size: 200% auto; animation: shine 5s linear infinite;
  text-shadow: none; line-height: 1; margin-bottom: 16px;
}
@keyframes shine { to { background-position: 200% center; } }
.footer-sub { color: var(--text-faint); font-style: italic; font-family: var(--font-serif); font-size: 1.1rem; }

/* ============================================================
   MUSIC PLAYER
   ============================================================ */
.music-player {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  background: rgba(22,8,16,0.92); border: 1px solid var(--glass-border);
  border-radius: 20px; box-shadow: var(--shadow);
  backdrop-filter: blur(20px); min-width: 260px;
  transition: all 0.3s;
}
.music-player-inner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.vinyl {
  width: 44px; height: 44px; border-radius: 50%;
  background: conic-gradient(from 0deg, #1a1a1a 0%, #333 25%, #1a1a1a 50%, #333 75%, #1a1a1a 100%);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 3px solid var(--rose-mid); transition: all 0.3s;
}
.vinyl.spinning { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.vinyl-center { font-size: 0.9rem; color: var(--rose-light); }
.music-info { flex: 1; min-width: 0; }
.music-song-name {
  font-size: 0.82rem; color: var(--text-primary); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 6px;
}
.music-controls { display: flex; gap: 8px; }
.music-ctrl {
  background: none; border: none; color: var(--text-muted); font-size: 0.95rem;
  cursor: pointer; padding: 4px; transition: color 0.2s;
}
.music-ctrl:hover { color: var(--rose-light); }
.music-ctrl.music-play { color: var(--rose-light); font-size: 1.1rem; }
.playlist-toggle {
  background: none; border: none; color: var(--text-faint); cursor: pointer;
  font-size: 1rem; padding: 4px; transition: color 0.2s; flex-shrink: 0;
}
.playlist-toggle:hover { color: var(--text-primary); }

.playlist-dropdown {
  border-top: 1px solid var(--glass-border);
  display: none;
  max-height: 420px;
  overflow-y: auto;
}
.playlist-dropdown.open { display: block; }
.playlist-dropdown::-webkit-scrollbar { width: 3px; }
.playlist-dropdown::-webkit-scrollbar-track { background: transparent; }
.playlist-dropdown::-webkit-scrollbar-thumb { background: rgba(181,41,78,0.3); border-radius: 2px; }

/* ── Search bar ── */
.music-search-wrap {
  display: flex; align-items: center; gap: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--glass-border);
}
.music-search-input {
  flex: 1; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 8px 12px;
  color: #fff; font-family: var(--font-sans); font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.music-search-input::placeholder { color: var(--text-faint); }
.music-search-input:focus {
  border-color: rgba(181,41,78,0.5);
  box-shadow: 0 0 0 2px rgba(181,41,78,0.12);
}
.music-search-btn {
  background: rgba(181,41,78,0.25);
  border: 1px solid rgba(181,41,78,0.35);
  border-radius: 0 10px 10px 0;
  padding: 8px 11px;
  color: var(--rose-light); cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center;
  line-height: 1;
}
.music-search-btn:hover { background: rgba(181,41,78,0.45); color: #fff; }

/* ── Search status ── */
.search-status {
  padding: 6px 14px 0;
  font-size: 0.72rem; color: var(--text-faint);
  font-style: italic; min-height: 18px;
  display: flex; align-items: center; gap: 6px;
}
.search-status.loading::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--rose-mid); border-top-color: transparent;
  animation: spin 0.7s linear infinite; flex-shrink: 0;
  display: inline-block;
}

/* ── Playlist items ── */
.playlist-dropdown ul { list-style: none; padding: 6px 0; }
.playlist-dropdown li {
  padding: 9px 14px; font-size: 0.84rem; color: var(--text-muted); cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 10px;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  position: relative;
}
.playlist-dropdown li:hover { background: rgba(255,255,255,0.04); color: #fff; }
.playlist-dropdown li.active { color: var(--rose-light); }
.playlist-dropdown li.active::after {
  content: '▶';
  position: absolute; left: 4px;
  font-size: 0.55rem; color: var(--rose-light);
}

.pl-icon { font-size: 0.85rem; color: var(--rose-mid); opacity: 0.7; }
.pl-info { overflow: hidden; }
.pl-title {
  font-size: 0.83rem; font-weight: 500; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-channel {
  font-size: 0.7rem; color: var(--text-faint); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-duration {
  font-size: 0.7rem; color: var(--text-faint); flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   KISS BUTTON
   ============================================================ */
.kiss-btn {
  position: fixed; bottom: 28px; left: 28px; z-index: 300;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(22,8,16,0.9); border: 1px solid rgba(181,41,78,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer;
  box-shadow: 0 8px 24px rgba(181,41,78,0.3);
  transition: all 0.25s; animation: floatKiss 3s ease-in-out infinite;
}
.kiss-btn:hover { transform: scale(1.12) rotate(12deg); }
@keyframes floatKiss { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.kiss-mark {
  position: fixed; pointer-events: none; z-index: 290;
  font-size: 2rem; animation: kissAnim 1.2s ease-out forwards;
}
@keyframes kissAnim {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  30%  { transform: scale(1.3) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) translateY(-30px) rotate(0deg); opacity: 0; }
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-container { position: fixed; inset: 0; pointer-events: none; z-index: 400; }
.notif-bubble {
  position: absolute; background: rgba(22,8,16,0.95);
  border: 1px solid rgba(181,41,78,0.4); border-radius: 20px;
  padding: 12px 20px; font-size: 0.9rem; color: var(--rose-light);
  white-space: nowrap; animation: notifPop 0.4s ease-out forwards, notifFade 3s ease 0.8s forwards;
}
@keyframes notifPop { 0%{transform:scale(0);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes notifFade { 0%{opacity:1} 100%{opacity:0} }

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

/* ── 768px ── */
@media(max-width:768px){
  .section { padding: 90px 20px 60px; }
  .map-modal { padding: 32px 24px; }
  .map-gallery { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; }
  .quiz-card { padding: 24px 20px; }
  .cycle-settings-inner { padding: 32px 24px; }
}

/* ── 600px ── */
@media(max-width:600px){
  .section { padding: 80px 16px 60px; }
  .section-title { font-size: 2rem; }

  /* Home */
  .home-name { font-size: 4.5rem; }
  .home-sub { font-size: 0.95rem; }

  /* Timer */
  .timer-block { padding: 24px 16px; }
  .timer-val { font-size: 1.9rem; }
  .timer-unit { font-size: 0.6rem; }
  .timer-card { padding: 14px 6px 10px; border-radius: 12px; }
  .timer-label-top { font-size: 0.95rem; margin-bottom: 16px; }

  /* Music */
  .music-player { bottom: 16px; right: 16px; min-width: 0; width: calc(100vw - 100px); max-width: 300px; }
  .music-search-input { font-size: 0.78rem; }
  .pl-title { font-size: 0.8rem; }
  .pl-channel { font-size: 0.66rem; }

  /* Kiss */
  .kiss-btn { bottom: 16px; left: 16px; width: 48px; height: 48px; font-size: 1.3rem; }

  /* Map modal */
  .map-modal { padding: 24px 16px; }
  .map-modal-title { font-size: 1.5rem; }
  .map-photo-delete { opacity: 1; }

  /* Lightbox nav */
  .lbx-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .lbx-prev { left: 10px; }
  .lbx-next { right: 10px; }
  .lbx-close { top: 14px; right: 14px; width: 38px; height: 38px; }

  /* Notifications */
  .notif-bubble { white-space: normal; max-width: 200px; font-size: 0.82rem; }

  /* Quiz */
  .quiz-card { padding: 20px 16px; }
  .quiz-q-text { font-size: 1.05rem; }
  .quiz-opt { padding: 11px 14px; font-size: 0.85rem; }

  /* Love cards */
  .cards-grid { gap: 16px; }
  .love-card { height: 240px; }
  .card-emoji { font-size: 2.8rem; margin-bottom: 12px; }
  .card-front h3 { font-size: 1.25rem; }
  .card-back p { font-size: 0.95rem; }

  /* Envelope */
  .envelope-wrapper { width: min(320px, 90vw); }
  .env-flap { border-left-width: min(160px, 45vw); border-right-width: min(160px, 45vw); }
  .letter-sheet { left: min(16px, 5%); right: min(16px, 5%); }
}

/* ── 480px ── */
@media(max-width:480px){
  .section { padding: 76px 14px 50px; }

  /* Login */
  .login-card { padding: 44px 24px; border-radius: 24px; }
  .login-title { font-size: 2.2rem; }
  .login-sub { font-size: 0.9rem; }

  /* Home */
  .home-name { font-size: 3.5rem; }
  .home-greeting { font-size: 1rem; }

  /* Timer */
  .timer-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .timer-val { font-size: 1.7rem; }
  .timer-since { font-size: 0.78rem; }

  /* Nav */
  .nav-link { padding: 6px 10px; font-size: 0.8rem; }
  .top-nav { padding: 0 14px; gap: 10px; }

  /* Music */
  .music-player { right: 12px; bottom: 12px; width: calc(100vw - 90px); }
  .music-song-name { font-size: 0.76rem; }

  /* Kiss */
  .kiss-btn { left: 12px; bottom: 12px; width: 44px; height: 44px; font-size: 1.2rem; }

  /* Section header */
  .section-header { margin-bottom: 36px; }
  .section-desc { font-size: 0.92rem; }

  /* Cycle */
  .phase-ring-wrapper { width: 120px; height: 120px; }
  .phase-day { font-size: 1.7rem; }
  .cycle-phase-card { padding: 24px 18px; }
  .mood-logger-card { padding: 22px 18px; }
  .cycle-calendar-card { padding: 20px 16px; }
  .cal-day { font-size: 0.75rem; }
  .mood-btn { width: 42px; height: 42px; font-size: 1.3rem; }

  /* Footer */
  .site-footer { padding: 60px 16px 100px; }
  .footer-line { width: 60px; }
}

/* ── 360px ── */
@media(max-width:360px){
  .home-name { font-size: 3rem; }
  .login-card { padding: 36px 18px; }
  .timer-val { font-size: 1.5rem; }
  .music-player { width: calc(100vw - 80px); min-width: 0; }
  .envelope-wrapper { width: 280px; }
  .env-flap { border-left-width: 140px; border-right-width: 140px; }
}
