:root {
  --primary: #FF9BB5;
  --primary-light: #FFD1DC;
  --primary-dark: #E8789A;
  --bg: #FFF8F0;
  --card: rgba(255, 255, 255, 0.70);
  --accent: #E8D5F5;
  --accent-dark: #C9A8E8;
  --text: #5D4037;
  --text-light: #8D6E63;
  --text-muted: #BCAAA4;
  --shadow: 0 4px 20px rgba(255, 155, 181, 0.15);
  --shadow-hover: 0 8px 30px rgba(255, 155, 181, 0.25);
  --radius: 16px;
  --radius-sm: 10px;
  --success: #A8D5BA;
  --danger: #F4A0A0;
  --nav-height: 72px;
  --page-width: 960px;
  --transition: all 0.3s ease;
}

@font-face {
  font-family: "张穸洛情书体";
  src: url("../assets/fonts/张穸洛情书体.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "卓特清雅体";
  src: url("../assets/fonts/卓特清雅体.ttf") format("truetype");
  font-display: swap;
}

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

body {
  font-family: "LXGW Wenkai Screen", "卓特清雅体", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #FFF0F3;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: -20px;
  z-index: -2;
  background: center / cover no-repeat;
  background-attachment: fixed;
  filter: blur(6px);
  opacity: 0;
}

body.has-bg-image::before {
  opacity: 1;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(255, 240, 245, 0.78);
  transition: background 0.6s ease;
}

.login-body::before,
.login-body::after,
.surprise-body::before,
.surprise-body::after {
  display: none;
}

.no-bg-image::before,
.no-bg-image::after {
  display: none;
}

a {
  text-decoration: none;
  color: inherit;
}

input, button, textarea {
  font-family: inherit;
  outline: none;
  border: none;
}

.page-container {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 32px 24px;
  padding-bottom: calc(var(--nav-height) + 40px);
  min-height: 100vh;
}

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

.page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: "张穸洛情书体", "LXGW Wenkai Screen", serif;
}

.page-header p {
  font-size: 14px;
  color: var(--text-light);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 155, 181, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 155, 181, 0.5);
}

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

.btn-secondary {
  background: var(--accent);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.input-field {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--primary-light);
  border-radius: 50px;
  font-size: 15px;
  color: var(--text);
  background: var(--card);
  transition: var(--transition);
}

.input-field::placeholder {
  color: var(--text-muted);
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 155, 181, 0.15);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--card);
  box-shadow: 0 -2px 20px rgba(93, 64, 55, 0.08);
  display: flex;
  justify-content: center;
  z-index: 1000;
}

.bottom-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  max-width: var(--page-width);
  padding: 0 20px;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}

.nav-tab:hover {
  background: rgba(255, 155, 181, 0.08);
}

.nav-tab .nav-icon {
  font-size: 22px;
  line-height: 1;
  transition: var(--transition);
}

.nav-tab .nav-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.nav-tab.active {
  background: rgba(255, 155, 181, 0.12);
}

.nav-tab.active .nav-icon {
  transform: scale(1.15);
}

.nav-tab.active .nav-label {
  color: var(--primary-dark);
  font-weight: 700;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 20px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FFF0F3 0%, #FFF8F0 40%, #F3E8FF 100%);
  position: relative;
  overflow: hidden;
}

.login-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(255, 155, 181, 0.2);
  padding: 48px 40px;
  text-align: center;
  width: 400px;
  max-width: 90%;
  position: relative;
  z-index: 2;
  animation: cardFadeIn 0.8s ease;
}

.login-heart {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  font-family: "张穸洛情书体", "LXGW Wenkai Screen", serif;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .input-field {
  text-align: center;
  letter-spacing: 4px;
  font-size: 18px;
}

.login-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 20px;
  transition: var(--transition);
}

.login-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.placeholder-content .placeholder-icon {
  font-size: 72px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.placeholder-content h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.placeholder-content p {
  font-size: 14px;
  color: var(--text-light);
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes floatHeart {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(0.5);
  }
}

.floating-hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.floating-hearts .heart {
  position: absolute;
  bottom: -20px;
  font-size: 18px;
  opacity: 0;
  animation: riseHeart linear infinite;
}

@keyframes riseHeart {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.5);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) rotate(360deg) scale(1);
  }
}

.deco-dot {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: var(--card);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(93, 64, 55, 0.12);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== Author Picker ========== */
.author-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(93, 64, 55, 0.3);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.author-modal {
  text-align: center;
  padding: 40px;
  animation: cardFadeIn 0.5s ease;
}

.author-modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.author-modal-sub {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 28px;
}

.author-choices {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.author-btn {
  width: 80px;
  height: 80px;
  font-size: 40px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-btn:hover {
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(255, 155, 181, 0.3);
}

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

/* ========== Calendar ========== */
.calendar {
  padding: 24px;
  margin-bottom: 24px;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.cal-title {
  font-size: 18px;
  font-weight: 700;
  min-width: 140px;
  text-align: center;
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.cal-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-arrow:hover {
  background: var(--primary-light);
  color: #fff;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 8px;
}

.cal-weekdays span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
}

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

.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.cal-day.empty {
  cursor: default;
}

.cal-day.disabled {
  cursor: default;
  opacity: 0.3;
  pointer-events: none;
}

.cal-day:not(.empty):hover {
  background: rgba(255, 155, 181, 0.08);
}

.cal-day-num {
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.cal-day.today .cal-day-num {
  background: var(--primary);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day.selected {
  background: rgba(255, 155, 181, 0.15);
}

.cal-day.selected .cal-day-num {
  font-weight: 700;
  color: var(--primary-dark);
}

.cal-day.today.selected .cal-day-num {
  color: #fff;
  background: var(--primary-dark);
}

.cal-day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  bottom: 4px;
}

/* ========== Diary Section ========== */
.diary-section {
  animation: cardFadeIn 0.4s ease;
}

.diary-card {
  border-left: 4px solid var(--primary-light);
  padding: 24px 28px;
  transition: border-color 0.3s ease;
}

.diary-card:hover {
  transform: none;
}

.diary-card-top {
  margin-bottom: 16px;
}

.diary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diary-date-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: "张穸洛情书体", "LXGW Wenkai Screen", serif;
}

.diary-author-badge {
  font-size: 22px;
  line-height: 1;
}

.mood-bar {
  margin-bottom: 16px;
}

.mood-label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.mood-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mood-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  font-size: 24px;
  border: 2px solid transparent;
}

.mood-item small {
  font-size: 11px;
  color: var(--text-muted);
}

.mood-item:hover {
  transform: scale(1.05);
}

.mood-item.active {
  border-color: var(--primary);
  background: rgba(255, 155, 181, 0.1);
  transform: scale(1.08);
}

.mood-item.active small {
  color: var(--primary-dark);
  font-weight: 600;
}

.diary-textarea {
  width: 100%;
  min-height: 150px;
  padding: 16px;
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  transition: var(--transition);
  margin-bottom: 16px;
  font-family: "LXGW Wenkai Screen", "卓特清雅体", sans-serif;
}

.diary-textarea::placeholder {
  color: var(--text-muted);
}

.diary-textarea:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(255, 155, 181, 0.1);
}

.diary-actions {
  display: flex;
  justify-content: flex-end;
}

/* ========== Timer ========== */
.timer-bar {
  padding: 20px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timer-bar:hover {
  transform: none;
}

.timer-label {
  font-size: 15px;
  color: var(--text-light);
}

.timer-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

/* ========== Photos Pager ========== */
.photos-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.photos-page-info {
  font-size: 14px;
  color: var(--text-light);
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
  min-width: 60px;
  text-align: center;
}

/* ========== Photos Toolbar ========== */
.photos-toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* ========== Photos Grid ========== */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.photos-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  text-align: center;
  color: var(--text-light);
}

.photos-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.photos-empty p {
  font-size: 15px;
}

/* ========== Photo Card ========== */
.photo-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.photo-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.photo-card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg);
}

.photo-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.photo-card:hover .photo-card-img {
  transform: scale(1.04);
}

.photo-card-img.lazy {
  background: linear-gradient(135deg, #fff0f3, #f3e8ff);
  min-height: 120px;
}

.photo-del-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.photo-card:hover .photo-del-btn {
  display: flex;
}

.photo-del-btn:hover {
  background: var(--danger);
}

.photo-card-info {
  padding: 14px 16px;
  flex: 1;
}

.photo-card-caption {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  flex-direction: row;
}

.lightbox.open {
  display: flex;
}

.lb-close {
  position: absolute;
  top: 20px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lb-img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.lb-img.lb-loading {
  min-width: 60px;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.1) url("data:image/svg+xml;charset=UTF-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><circle cx='12' cy='3' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0s'/></circle><circle cx='18' cy='5' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0.15s'/></circle><circle cx='21' cy='12' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0.3s'/></circle><circle cx='18' cy='19' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0.45s'/></circle><circle cx='12' cy='21' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0.6s'/></circle><circle cx='6' cy='19' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0.75s'/></circle><circle cx='3' cy='12' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='0.9s'/></circle><circle cx='6' cy='5' r='2'><animate attributeName='opacity' values='1;0.2;1' dur='1s' repeatCount='indefinite' begin='1.05s'/></circle></svg>") center / 40px no-repeat;
  border-radius: 8px;
}

.lb-info {
  text-align: center;
  margin-top: 16px;
}

.lb-caption {
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.lb-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ========== Upload Modal ========== */
.upload-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(93, 64, 55, 0.3);
  backdrop-filter: blur(4px);
  z-index: 2500;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.upload-overlay[style*="flex"] {
  display: flex;
}

.upload-modal {
  width: 520px;
  max-width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  animation: cardFadeIn 0.4s ease;
}

.upload-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
}

.upload-file-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 16px;
}

.upload-file-area:hover {
  border-color: var(--primary);
  background: rgba(255, 155, 181, 0.05);
}

.upload-file-icon {
  font-size: 40px;
  line-height: 1;
}

.upload-file-text {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.upload-file-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.upload-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.upload-preview-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--primary-light);
}

.upload-progress-bar {
  display: none;
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.upload-input {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
}

.upload-row {
  display: flex;
  gap: 12px;
}

.upload-row .upload-input {
  flex: 1;
}

.upload-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

.upload-actions .btn {
  min-width: 100px;
}

/* ========== Wish Stats ========== */
.wish-stats {
  padding: 16px 28px;
  margin-bottom: 20px;
  text-align: center;
}

.wish-stats:hover {
  transform: none;
}

.wish-stats-text {
  font-size: 15px;
  color: var(--text-light);
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.wish-stats-text strong {
  color: var(--primary-dark);
  font-size: 18px;
}

/* ========== Wish Tabs ========== */
.wish-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.wish-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.wish-tab:hover {
  background: rgba(255, 155, 181, 0.06);
}

.wish-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 155, 181, 0.3);
}

/* ========== Wish List ========== */
.wish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wish-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.wish-item:hover {
  box-shadow: var(--shadow-hover);
}

.wish-item-left {
  padding-top: 2px;
}

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

.wish-checkbox:hover {
  border-color: var(--primary);
  background: rgba(255, 155, 181, 0.1);
}

.wish-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.wish-checkbox.checked::after {
  content: '\2714';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.wish-item-body {
  flex: 1;
  min-width: 0;
}

.wish-item-content {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
  font-family: "张穸洛情书体", "LXGW Wenkai Screen", serif;
}

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

.wish-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.wish-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 30vh;
  text-align: center;
  color: var(--text-light);
}

.wish-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.wish-empty p {
  font-size: 15px;
}

/* ========== Wish Add Bar ========== */
.wish-add-bar {
  margin-top: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: sticky;
  bottom: calc(var(--nav-height) + 12px);
}

.wish-add-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  resize: none;
  transition: var(--transition);
  margin-bottom: 12px;
  min-height: 44px;
  max-height: 100px;
}

.wish-add-input::placeholder {
  color: var(--text-muted);
}

.wish-add-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 155, 181, 0.1);
}

.wish-add-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wish-who-select {
  display: flex;
  gap: 6px;
}

.wish-who-btn {
  width: 38px;
  height: 38px;
  font-size: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wish-who-btn:hover {
  border-color: var(--primary-light);
}

.wish-who-btn.selected {
  border-color: var(--primary);
  background: rgba(255, 155, 181, 0.1);
}

/* ========== Confetti ========== */
.confetti-zone {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5000;
  overflow: hidden;
}

.confetti {
  position: absolute;
  top: -20px;
  animation: confettiFall ease-out forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(720deg) scale(0.3);
  }
}

/* ========== Surprise Terminal ========== */
.surprise-body {
  background: #0a0a0a;
  color: #00ff00;
  font-family: 'Courier New', 'Consolas', 'Microsoft YaHei', monospace;
  min-height: 100vh;
}

.surprise-body .page-container {
  background: transparent;
  max-width: 800px;
}

.surprise-body .bottom-nav {
  background: #111;
  box-shadow: 0 -2px 20px rgba(0, 255, 0, 0.05);
  border-top: 1px solid #1a1a1a;
}

.surprise-body .nav-tab {
  color: #555;
}

.surprise-body .nav-tab.active {
  color: #00ff00;
  background: rgba(0, 255, 0, 0.05);
}

.surprise-body .nav-tab.active::after {
  background: #00ff00;
}

.surprise-body .nav-label {
  color: #555 !important;
}

.surprise-body .nav-tab.active .nav-label {
  color: #00ff00 !important;
}

.terminal {
  max-width: 800px;
  margin: 40px auto;
  padding: 40px 32px;
  padding-bottom: calc(var(--nav-height) + 40px);
  font-size: 16px;
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}

.terminal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 32px;
  right: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 0, 0.2), transparent);
}

.terminal p {
  min-height: 1em;
}

.terminal-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: #00ff00;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

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

.terminal-esc-hint {
  position: fixed;
  bottom: 90px;
  right: 24px;
  background: rgba(0, 255, 0, 0.08);
  color: rgba(0, 255, 0, 0.6);
  border: 1px solid rgba(0, 255, 0, 0.15);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s;
}

.terminal-esc-hint:hover {
  background: rgba(0, 255, 0, 0.15);
}

/* ========== Button Micro Feedback ========== */
.btn:active,
.btn-primary:active,
.btn-secondary:active,
.cal-arrow:active,
.nav-tab:active,
.wish-tab:active,
.mood-item:active,
.wish-checkbox:active,
.author-btn:active {
  transform: scale(0.95) !important;
}

/* ========== Loading Overlay ========== */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 240, 0.7);
  backdrop-filter: blur(2px);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.open {
  display: flex;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 14px;
  color: var(--text-light);
}

/* ========== Export Button ========== */
.export-area {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-bottom: 16px;
}

.export-btn {
  font-size: 12px;
  color: var(--text-muted);
  background: none;
  border: 1px dashed var(--text-muted);
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  transition: var(--transition);
}

.export-btn:hover {
  color: var(--text-light);
  border-color: var(--primary-light);
  background: rgba(255, 155, 181, 0.05);
}

/* ========== Music Widget ========== */
.music-widget {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.music-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(255, 155, 181, 0.2);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(255, 155, 181, 0.35);
}

.music-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  padding: 16px;
  min-width: 220px;
  box-shadow: 0 4px 24px rgba(255, 155, 181, 0.2);
  animation: musicPanelIn 0.3s ease;
}

.music-panel.open {
  display: flex;
}

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

.music-track-name {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.music-controls {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.music-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-btn:hover {
  background: var(--primary-light);
  transform: scale(1.08);
}

.music-btn:active {
  transform: scale(0.93);
}

.music-btn-play {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.music-btn-play:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-dark));
  color: #fff;
}

.music-volume-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.music-volume {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--primary-light);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 155, 181, 0.4);
}

.music-playlist {
  max-height: 160px;
  overflow-y: auto;
  border-top: 1px solid var(--primary-light);
  padding-top: 8px;
}

.music-playlist-item {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-playlist-item:hover {
  background: rgba(255, 155, 181, 0.1);
}

.music-playlist-item.active {
  color: var(--primary-dark);
  font-weight: 600;
  background: rgba(255, 155, 181, 0.08);
}

/* ========== BG Switcher ========== */
.bg-switcher {
  position: fixed;
  bottom: calc(var(--nav-height) + 12px);
  left: 20px;
  z-index: 1100;
}

.bg-switch-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border: none;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 155, 181, 0.1);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-switch-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(255, 155, 181, 0.2);
}

.bg-switch-panel {
  display: none;
  position: absolute;
  bottom: 44px;
  left: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(255, 155, 181, 0.2);
  padding: 8px;
  min-width: 170px;
  flex-direction: column;
  gap: 2px;
  animation: musicPanelIn 0.3s ease;
}

.bg-switch-panel.open {
  display: flex;
}

.bg-switch-item {
  padding: 10px 14px;
  text-align: left;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  font-family: "卓特清雅体", "LXGW Wenkai Screen", sans-serif;
}

.bg-switch-item:hover {
  background: rgba(255, 155, 181, 0.1);
}

.bg-switch-item.active {
  color: var(--primary-dark);
  font-weight: 600;
  background: rgba(255, 155, 181, 0.12);
}
