/* ========================================
   Our Love Space - 浪漫情侣网站样式
   ======================================== */

/* === CSS Variables === */
:root {
  --primary: #ff6b8a;
  --primary-light: #ff8e9e;
  --primary-dark: #e5506e;
  --secondary: #c084fc;
  --accent: #fbbf24;
  --bg-dark: #0f0a1a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text: #f0e6f6;
  --text-muted: #a89bb5;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Dancing Script', 'Satisfy', cursive;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme variants */
[data-theme="purple"] {
  --primary: #c084fc;
  --primary-light: #d4a0ff;
  --primary-dark: #a855f7;
}
[data-theme="blue"] {
  --primary: #60a5fa;
  --primary-light: #93c5fd;
  --primary-dark: #3b82f6;
}
[data-theme="amber"] {
  --primary: #fbbf24;
  --primary-light: #fcd34d;
  --primary-dark: #f59e0b;
}
[data-theme="green"] {
  --primary: #4ade80;
  --primary-light: #86efac;
  --primary-dark: #22c55e;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* === 仙女棒光标 === */
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 138, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='wand' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23ffd700'/%3E%3Cstop offset='100%25' style='stop-color:%23ff6b8a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='6' cy='6' r='5' fill='%23ffd700' opacity='0.9'/%3E%3Ccircle cx='6' cy='6' r='3' fill='%23fff'/%3E%3Cline x1='8' y1='8' x2='28' y2='28' stroke='url(%23wand)' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='3' cy='9' r='1.5' fill='%23ffd700' opacity='0.7'/%3E%3Ccircle cx='9' cy='3' r='1.5' fill='%23ff6b8a' opacity='0.7'/%3E%3Ccircle cx='2' cy='3' r='1' fill='%23c084fc' opacity='0.6'/%3E%3Ccircle cx='10' cy='8' r='1' fill='%23fff' opacity='0.8'/%3E%3C/svg%3E") 6 6, auto;
}

/* 可点击元素的光标 */
a, button, input, select, textarea, .tag-btn, .color-btn,
.gallery-item, .music-item, .wish-check, .nav-link,
[role="button"], [onclick] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cdefs%3E%3ClinearGradient id='wand2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%23ffd700'/%3E%3Cstop offset='100%25' style='stop-color:%23ff6b8a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='6' cy='6' r='6' fill='%23ffd700'%3E%3Canimate attributeName='r' values='5;7;5' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='6' cy='6' r='3' fill='%23fff'/%3E%3Cline x1='8' y1='8' x2='28' y2='28' stroke='url(%23wand2)' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='3' cy='10' r='2' fill='%23ffd700' opacity='0.8'/%3E%3Ccircle cx='10' cy='3' r='2' fill='%23ff6b8a' opacity='0.8'/%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%23c084fc' opacity='0.7'/%3E%3Ccircle cx='11' cy='7' r='1.5' fill='%23fff' opacity='0.9'/%3E%3Ccircle cx='4' cy='12' r='1' fill='%2360a5fa' opacity='0.6'/%3E%3C/svg%3E") 6 6, pointer;
}

/* === Particle Canvas === */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* === Shooting Stars === */
#shootingStars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.6);
  animation: shoot linear forwards;
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(to left, rgba(255,255,255,0.6), transparent);
}

@keyframes shoot {
  0% { transform: translateX(0) translateY(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateX(-300px) translateY(300px); opacity: 0; }
}

/* === Glass Effect === */
.glass-effect {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 107, 138, 0.2);
  box-shadow: 0 8px 40px rgba(255, 107, 138, 0.1);
}

/* ========================================
   SPLASH SCREEN
   ======================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0a1a 0%, #1a0a2e 50%, #0f0a1a 100%);
  overflow: hidden;
}

.splash-screen::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 138, 0.15), transparent 70%);
  border-radius: 50%;
  animation: splashGlow 4s ease-in-out infinite;
}

@keyframes splashGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.splash-content {
  text-align: center;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.love-lock .heart-svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.heart-path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawHeart 2s ease forwards 0.5s;
  filter: drop-shadow(0 0 10px var(--primary));
}

@keyframes drawHeart {
  to { stroke-dashoffset: 0; fill: var(--primary); }
}

.splash-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
  margin-bottom: 8px;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.splash-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 4px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.splash-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.splash-heart {
  color: var(--primary);
  font-size: 2rem;
  animation: heartbeat 1s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.enter-btn {
  position: relative;
  padding: 16px 48px;
  font-size: 1.1rem;
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  animation: fadeInUp 1s ease-out 0.9s both;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.4);
}

.enter-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 107, 138, 0.6);
}

.enter-btn .btn-sparkle {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: sparkle 3s infinite;
}

@keyframes sparkle {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

/* Petals */
.splash-petals {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  font-size: 1.2rem;
  opacity: 0.6;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0% { transform: translateY(-20px) rotate(0deg) translateX(0); opacity: 0.6; }
  50% { opacity: 0.8; }
  100% { transform: translateY(100vh) rotate(360deg) translateX(100px); opacity: 0; }
}

.splash-screen.fade-out {
  animation: splashFadeOut 1s ease forwards;
}

@keyframes splashFadeOut {
  to { opacity: 0; transform: scale(1.1); pointer-events: none; }
}

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

.main-app.hidden { display: none; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-heart {
  font-size: 1.5rem;
  animation: heartbeat 2s ease-in-out infinite;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.85rem;
  transition: var(--transition);
  position: relative;
}

.nav-link i {
  font-style: normal;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(255, 107, 138, 0.1);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle { display: block; }
}

/* ========================================
   PAGES
   ======================================== */
.page {
  display: none;
  padding: 88px 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.page.active { display: block; }

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 8px;
}

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

/* ========================================
   HOME PAGE
   ======================================== */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.couple-avatars {
  display: flex;
  align-items: center;
  gap: 30px;
  animation: fadeInUp 0.8s ease;
}

.avatar-wrapper {
  text-align: center;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.avatar:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(255, 107, 138, 0.5);
}

.avatar-name {
  margin-top: 10px;
  font-weight: 500;
  color: var(--text);
}

.love-connector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.love-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: lovePulse 2s ease-in-out infinite;
}

@keyframes lovePulse {
  0%, 100% { opacity: 0.3; width: 30px; }
  50% { opacity: 1; width: 50px; }
}

.love-icon {
  font-size: 2rem;
  animation: heartbeat 1s ease-in-out infinite;
}

/* Together Counter */
.together-counter {
  text-align: center;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.together-counter h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary-light);
  margin-bottom: 20px;
}

.counter-display {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-num {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.counter-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.love-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Stats */
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 700px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-card {
  text-align: center;
  padding: 20px 16px;
  cursor: pointer;
}

.stat-card:hover { transform: translateY(-4px); }

.stat-icon { font-size: 1.8rem; }

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0 4px;
}

.stat-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .counter-num { font-size: 2rem; }
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.input-romantic {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.input-romantic:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 138, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.input-romantic::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

textarea.input-romantic {
  resize: vertical;
  min-height: 100px;
}

select.input-romantic {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a89bb5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

select.input-romantic option {
  background: #1a0a2e;
  color: var(--text);
}

.btn-romantic {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255, 107, 138, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-romantic::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: 0.5s;
}

.btn-romantic:hover::after {
  left: 100%;
}

.btn-romantic:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 107, 138, 0.5);
}

.btn-romantic:active {
  transform: translateY(0);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
}

.checkbox-romantic {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkbox-romantic input[type="checkbox"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

/* ========================================
   DIARY PAGE
   ======================================== */
.diary-container {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 30px;
  align-items: start;
}

.diary-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.diary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-btn {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.tag-btn:hover, .tag-btn.active {
  background: rgba(255, 107, 138, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* Diary Timeline */
.diary-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diary-entry {
  position: relative;
  padding-left: 30px;
  animation: fadeInUp 0.5s ease;
}

.diary-entry::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: -20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.diary-entry::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 24px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}

.diary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.diary-card:hover {
  border-color: rgba(255, 107, 138, 0.3);
  transform: translateX(4px);
}

.diary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.diary-card-header h3 {
  font-size: 1.1rem;
  color: var(--primary-light);
}

.diary-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.diary-card p {
  line-height: 1.8;
  color: var(--text);
  font-size: 0.95rem;
}

.diary-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.diary-tag {
  padding: 3px 10px;
  background: rgba(255, 107, 138, 0.1);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--primary);
}

.diary-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  transition: var(--transition);
}

.diary-card:hover .diary-delete { opacity: 1; }
.diary-delete:hover { color: #ef4444; }

@media (max-width: 800px) {
  .diary-container { grid-template-columns: 1fr; }
}

/* ========================================
   GALLERY PAGE
   ======================================== */
.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.gallery-upload {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.upload-zone {
  grid-column: 1 / -1;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(255, 107, 138, 0.05);
}

.upload-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.upload-zone p {
  color: var(--text-muted);
}

.upload-zone small {
  color: var(--text-muted);
  opacity: 0.6;
  font-size: 0.8rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  group: true;
  animation: fadeInUp 0.5s ease;
}

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

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay p {
  font-size: 0.9rem;
  color: white;
}

.gallery-overlay small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.gallery-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-delete { opacity: 1; }
.gallery-delete:hover { background: #ef4444; }

@media (max-width: 600px) {
  .gallery-upload { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 10px;
  transition: var(--transition);
  z-index: 201;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  color: var(--primary);
}

/* ========================================
   CHAT PAGE
   ======================================== */
.chat-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.chat-user-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.chat-user-select select {
  width: auto;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.chat-welcome {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
}

.chat-welcome span {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  animation: fadeInUp 0.3s ease;
  max-width: 80%;
}

.chat-msg.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-msg.sent .chat-msg-avatar {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
}

.chat-msg:not(.sent) .chat-bubble {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

.chat-msg.sent .chat-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-bottom-right-radius: 4px;
}

.chat-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: right;
}

.chat-msg.sent .chat-time {
  text-align: left;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  position: relative;
}

.chat-emoji-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-emoji-btn:hover {
  background: rgba(255, 107, 138, 0.1);
  border-color: var(--primary);
}

.btn-send {
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  white-space: nowrap;
}

.emoji-picker {
  position: absolute;
  bottom: 70px;
  left: 0;
  background: rgba(15, 10, 26, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  z-index: 50;
  box-shadow: var(--shadow);
}

.emoji-picker.hidden { display: none; }

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.emoji-grid span {
  padding: 8px;
  text-align: center;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
}

.emoji-grid span:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.2);
}

/* ========================================
   ANNIVERSARY PAGE
   ======================================== */
.anniversary-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 30px;
  align-items: start;
}

.anniversary-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.anniversary-form h3 {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.anniversary-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.anniv-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  animation: fadeInUp 0.5s ease;
}

.anniv-card:hover {
  border-color: rgba(255, 107, 138, 0.3);
  transform: translateY(-2px);
}

.anniv-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.anniv-info {
  flex: 1;
}

.anniv-info h4 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.anniv-info .anniv-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.anniv-countdown {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.2), rgba(192, 132, 252, 0.2));
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 500;
}

.anniv-countdown.today {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  animation: todayPulse 2s ease-in-out infinite;
}

@keyframes todayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 138, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 107, 138, 0); }
}

.anniv-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  transition: var(--transition);
}

.anniv-card:hover .anniv-delete { opacity: 1; }
.anniv-delete:hover { color: #ef4444; }

@media (max-width: 800px) {
  .anniversary-container { grid-template-columns: 1fr; }
}

/* ========================================
   AI PAGE
   ======================================== */
.ai-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.ai-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.ai-suggest-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.ai-suggest-btn:hover {
  background: rgba(255, 107, 138, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.ai-messages {
  flex: 1;
  min-height: 400px;
  max-height: calc(100vh - 450px);
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-messages::-webkit-scrollbar {
  width: 4px;
}

.ai-messages::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.ai-message {
  display: flex;
  gap: 10px;
  animation: fadeInUp 0.3s ease;
}

.ai-message.user {
  flex-direction: row-reverse;
  max-width: 80%;
  align-self: flex-end;
}

.ai-message.bot {
  max-width: 85%;
}

.ai-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.ai-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.ai-message.bot .ai-bubble {
  background: rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

.ai-message.user .ai-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-bottom-right-radius: 4px;
}

.ai-input-area {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ai-settings {
  margin-top: 16px;
}

.ai-settings details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.ai-settings summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ai-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ai-config label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ai-typing {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.ai-typing span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.4s ease-in-out infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* ========================================
   LETTER PAGE
   ======================================== */
.letter-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.letter-compose .letter-paper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.letter-header-text {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--primary);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.letter-textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.8;
  resize: vertical;
  outline: none;
  min-height: 200px;
  transition: var(--transition);
}

.letter-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 138, 0.15);
}

.letter-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.letter-inbox {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.letter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: var(--transition);
  animation: fadeInUp 0.5s ease;
}

.letter-card:hover {
  border-color: rgba(255, 107, 138, 0.3);
  transform: translateY(-2px);
}

.letter-card::before {
  content: '💌';
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 1.5rem;
}

.letter-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.letter-from {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary);
}

.letter-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.letter-body {
  line-height: 1.8;
  color: var(--text);
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.letter-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  transition: var(--transition);
}

.letter-card:hover .letter-delete { opacity: 1; }
.letter-delete:hover { color: #ef4444; }

@media (max-width: 800px) {
  .letter-container { grid-template-columns: 1fr; }
}

/* ========================================
   WISHLIST PAGE
   ======================================== */
.wish-container {
  max-width: 700px;
  margin: 0 auto;
}

.wish-form {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.wish-form .input-romantic:first-child {
  flex: 1;
  min-width: 200px;
}

.wish-form select { width: auto; min-width: 120px; }

.wish-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wish-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  animation: fadeInUp 0.5s ease;
}

.wish-item:hover {
  border-color: rgba(255, 107, 138, 0.3);
}

.wish-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.wish-check:hover {
  border-color: var(--primary);
}

.wish-check.done {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
}

.wish-item.completed {
  opacity: 0.6;
}

.wish-item.completed .wish-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.wish-text {
  flex: 1;
  font-size: 0.95rem;
}

.wish-category {
  font-size: 1.2rem;
}

.wish-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  transition: var(--transition);
}

.wish-item:hover .wish-delete { opacity: 1; }
.wish-delete:hover { color: #ef4444; }

/* ========================================
   SETTINGS PAGE
   ======================================== */
.settings-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-card h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.color-options {
  display: flex;
  gap: 10px;
}

.color-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.color-btn:hover, .color-btn.active {
  border-color: white;
  transform: scale(1.15);
}

.settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state span {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========================================
   NOTIFICATION
   ======================================== */
.notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50px;
  font-size: 0.95rem;
  z-index: 300;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  box-shadow: 0 10px 30px rgba(255, 107, 138, 0.4);
}

.notification.show {
  transform: translateX(-50%) translateY(0);
}

/* ========================================
   FLOATING NOTES
   ======================================== */
.floating-notes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-note {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.15;
  animation: floatNote linear infinite;
}

@keyframes floatNote {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.15; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 138, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 138, 0.5);
}

/* ========================================
   UTILITIES
   ======================================== */
.hidden { display: none !important; }

/* Smooth page transitions */
.page-enter {
  animation: pageEnter 0.5s ease forwards;
}

@keyframes pageEnter {
  from { transform: translateY(12px); }
  to { transform: translateY(0); }
}

/* Ripple effect */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Selection */
::selection {
  background: rgba(255, 107, 138, 0.3);
  color: var(--text);
}

/* Print hide */
@media print {
  .navbar, #particleCanvas, #shootingStars, .floating-notes { display: none; }
}

/* ========================================
   CLICK HEART EFFECT
   ======================================== */
#clickEffects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.click-heart {
  position: absolute;
  pointer-events: none;
  animation: clickHeartAnim 1s ease-out forwards;
  font-size: 1.5rem;
  z-index: 9999;
}

@keyframes clickHeartAnim {
  0% {
    opacity: 1;
    transform: scale(0) translateY(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) translateY(-30px) rotate(15deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(-80px) rotate(-15deg);
  }
}

.click-ripple {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: clickRippleAnim 0.6s ease-out forwards;
}

@keyframes clickRippleAnim {
  0% {
    width: 0;
    height: 0;
    opacity: 0.8;
  }
  100% {
    width: 100px;
    height: 100px;
    opacity: 0;
    margin-left: -50px;
    margin-top: -50px;
  }
}

/* ========================================
   BEAUTIFUL HEART - SPLASH SCREEN
   ======================================== */
.beautiful-heart {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
  animation: heartFloat 3s ease-in-out infinite;
}

@keyframes heartFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.05); }
}

.heart-main {
  position: relative;
  width: 100%;
  height: 100%;
}

/* 完整的爱心形状 */
.heart-main::before,
.heart-main::after {
  content: '';
  position: absolute;
  top: 0;
  width: 60px;
  height: 96px;
  background: linear-gradient(180deg,
    #ff6b8a 0%,
    #ff8e9e 30%,
    #ff6b8a 60%,
    #e5506e 100%
  );
  border-radius: 60px 60px 0 0;
  box-shadow:
    0 0 40px rgba(255, 107, 138, 0.6),
    0 0 80px rgba(255, 107, 138, 0.4),
    inset -5px -5px 20px rgba(0, 0, 0, 0.1),
    inset 5px 5px 20px rgba(255, 255, 255, 0.4);
}

.heart-main::before {
  left: 60px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.heart-main::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

/* 爱心高光 */
.heart-piece {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.heart-piece.piece-1 {
  top: 25px;
  left: 30px;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(2px);
}

.heart-piece.piece-2 {
  top: 35px;
  left: 45px;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(1px);
}

.heart-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(255, 107, 138, 0.5) 0%, transparent 60%);
  border-radius: 50%;
  animation: heartGlow 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes heartGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* 爱心周围的小星星 */
.heart-particles {
  position: absolute;
  inset: -40px;
}

.heart-particles span {
  position: absolute;
  font-size: 12px;
  animation: sparkle 2s ease-in-out infinite;
  text-shadow: 0 0 10px currentColor;
}

.heart-particles span:nth-child(1) { top: 0; left: 50%; color: #ffd700; animation-delay: 0s; }
.heart-particles span:nth-child(2) { top: 20%; left: 10%; color: #ff6b8a; animation-delay: 0.2s; }
.heart-particles span:nth-child(3) { top: 20%; right: 10%; color: #c084fc; animation-delay: 0.4s; }
.heart-particles span:nth-child(4) { top: 50%; left: 0; color: #ffd700; animation-delay: 0.6s; }
.heart-particles span:nth-child(5) { top: 50%; right: 0; color: #ff6b8a; animation-delay: 0.8s; }
.heart-particles span:nth-child(6) { top: 80%; left: 15%; color: #c084fc; animation-delay: 1s; }
.heart-particles span:nth-child(7) { top: 80%; right: 15%; color: #ffd700; animation-delay: 1.2s; }
.heart-particles span:nth-child(8) { bottom: 0; left: 35%; color: #ff6b8a; animation-delay: 1.4s; }
.heart-particles span:nth-child(9) { bottom: 0; right: 35%; color: #c084fc; animation-delay: 1.6s; }
.heart-particles span:nth-child(10) { top: 10%; left: 50%; color: #fff; animation-delay: 1.8s; }

@keyframes sparkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ========================================
   NAME INPUT - SPLASH SCREEN
   ======================================== */
.splash-names-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.name-input-wrapper {
  position: relative;
}

.name-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding: 8px 4px;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  width: 120px;
  outline: none;
  font-family: var(--font-body);
  transition: var(--transition);
}

.name-input:focus {
  border-bottom-color: var(--primary);
}

.name-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.name-underline {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.name-input:focus + .name-underline {
  width: 100%;
}

.splash-heart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-svg-icon {
  width: 40px;
  height: 40px;
  animation: heartbeat 1s ease-in-out infinite;
}

.heart-svg-icon path {
  fill: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary));
}

/* ========================================
   MUSIC PLAYER
   ======================================== */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
}

.music-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 107, 138, 0.4);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.music-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 107, 138, 0.6);
}

.music-toggle.playing {
  animation: musicPulse 1s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 107, 138, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(255, 107, 138, 0.8); }
}

.music-icon {
  font-size: 1.5rem;
  z-index: 2;
}

.music-waves {
  position: absolute;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.music-toggle.playing .music-icon {
  display: none;
}

.music-toggle.playing .music-waves {
  opacity: 1;
}

.music-waves span {
  width: 4px;
  background: white;
  border-radius: 2px;
  animation: musicWave 0.8s ease-in-out infinite;
}

.music-waves span:nth-child(1) { height: 8px; animation-delay: 0s; }
.music-waves span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.music-waves span:nth-child(3) { height: 12px; animation-delay: 0.4s; }

@keyframes musicWave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1); }
}

.music-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 320px;
  background: rgba(15, 10, 26, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: panelSlideIn 0.3s ease;
}

@keyframes panelSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.music-panel.hidden {
  display: none;
}

.music-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--primary);
  font-weight: 500;
}

.music-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.music-panel-close:hover {
  color: var(--primary);
}

.music-now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.music-disc {
  font-size: 2rem;
  animation: discSpin 3s linear infinite paused;
}

.music-toggle.playing ~ .music-panel .music-disc,
.music-panel.playing .music-disc {
  animation-play-state: running;
}

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

.music-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}

.music-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-btn:hover {
  background: rgba(255, 107, 138, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}

.music-play-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  font-size: 1.2rem;
}

.music-play-btn:hover {
  transform: scale(1.1);
  color: white;
}

.music-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 16px;
}

.music-volume span {
  font-size: 1rem;
}

.music-volume input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.music-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 107, 138, 0.5);
}

.music-add {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.music-add .input-romantic {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.music-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 0 16px 16px;
}

.music-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 20px;
}

.music-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.music-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.music-item.active {
  background: rgba(255, 107, 138, 0.15);
}

.music-item-icon {
  font-size: 1.2rem;
}

.music-item-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-item-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  opacity: 0;
  transition: var(--transition);
}

.music-item:hover .music-item-delete {
  opacity: 1;
}

.music-item-delete:hover {
  color: #ef4444;
}

/* === Auth Panel === */
.auth-panel-wrapper {
  position: fixed;
  bottom: 100px;
  right: 20px;
  z-index: 1000;
}

.auth-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 25px;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.auth-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

.auth-icon {
  font-size: 1.1rem;
}

.auth-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-status.logged-in {
  color: #4ade80;
}

.auth-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 260px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel.hidden {
  display: none;
}

.auth-panel-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.auth-panel-content {
  padding: 16px;
}

.auth-panel-content input {
  width: 100%;
  margin-bottom: 10px;
}

.guest-notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: center;
}

.auth-user-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.auth-username {
  font-weight: bold;
  color: #4ade80;
}

.btn-full {
  width: 100%;
}

/* === Guest Mode: Hide editing UI === */
.guest-mode .diary-editor,
.guest-mode .gallery-upload,
.guest-mode .chat-input-area,
.guest-mode .anniversary-form,
.guest-mode .letter-compose,
.guest-mode .wish-form,
.guest-mode .music-add,
.guest-mode .settings-card:has(#saveSettings),
.guest-mode #saveSettings,
.guest-mode .diary-delete,
.guest-mode .gallery-delete,
.guest-mode .anniv-delete,
.guest-mode .letter-delete,
.guest-mode .wish-delete,
.guest-mode .wish-check,
.guest-mode .music-item-delete,
.guest-mode #clearData,
.guest-mode #exportData,
.guest-mode #importData {
  display: none !important;
}

/* ========================================
   TRAVEL PAGE - 旅行轨迹
   ======================================== */
.travel-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.travel-legend {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.travel-stats {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--text);
}

.travel-stats span {
  font-weight: 600;
  color: var(--primary);
}

.travel-map-wrapper {
  padding: 20px;
  overflow: hidden;
}

.travel-map {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  min-height: 450px;
}

.travel-map svg {
  width: 100%;
  height: auto;
  min-height: 400px;
  display: block;
}

/* Province styling */
.travel-map .province {
  fill: #3a3a4a;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 0.5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.travel-map .province:hover {
  fill: #5a5a6a;
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1;
  filter: brightness(1.2);
}

.travel-map .province.want {
  fill: #60a5fa;
  stroke: #93c5fd;
}

.travel-map .province.want:hover {
  fill: #3b82f6;
}

.travel-map .province.done {
  fill: #4ade80;
  stroke: #86efac;
}

.travel-map .province.done:hover {
  fill: #22c55e;
}

/* Province name labels */
.travel-map .province-label {
  font-size: 8px;
  fill: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
  font-family: var(--font-body);
}

/* Province menu popup */
.province-menu {
  position: fixed;
  z-index: 200;
  background: rgba(15, 10, 26, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: menuFadeIn 0.2s ease;
  min-width: 160px;
}

.province-menu.hidden {
  display: none;
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.province-menu-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}

.province-menu-options {
  padding: 8px;
}

.province-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.province-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.province-option[data-status="WANT"]:hover {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

.province-option[data-status="DONE"]:hover {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.province-option[data-status="NONE"]:hover {
  background: rgba(255, 255, 255, 0.08);
}

.option-icon {
  font-size: 1.1rem;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .travel-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .travel-stats {
    margin-left: 0;
    width: 100%;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .travel-map-wrapper {
    padding: 10px;
  }

  .province-menu {
    left: 50% !important;
    transform: translateX(-50%);
    bottom: 100px !important;
    top: auto !important;
  }
}
