/* =====================================================================
   我们的专属小站 · 样式
   ===================================================================== */

:root {
  --pink: #ff5e7e;
  --pink-deep: #e0245e;
  --purple: #8a63d2;
  --text: #4a3b4d;
  --text-soft: #7a6a7d;
  --card-bg: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.6);
  --shadow: 0 12px 40px rgba(120, 60, 90, 0.16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Hiragino Sans GB", "Segoe UI", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
  background-size: 400% 400%;
  animation: gradientMove 18s ease infinite;
  padding-bottom: 60px;
  overflow-x: hidden;
}

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

/* ---------- 飘落爱心 ---------- */
.hearts-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.heart-float {
  position: absolute; bottom: -8vh;
  animation: floatUp linear forwards;
  opacity: 0.55; font-size: 18px;
  user-select: none;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.55; }
  100% { transform: translateY(-115vh) rotate(40deg) scale(1.15); opacity: 0; }
}

/* ---------- 顶部 ---------- */
.hero {
  position: relative; z-index: 1;
  text-align: center;
  padding: 56px 20px 30px;
}
.hero-subtitle { font-size: 15px; letter-spacing: 2px; color: #fff; text-shadow: 0 1px 6px rgba(150,50,90,.35); }
.hero-title {
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 800;
  margin: 14px 0 10px;
  color: #fff;
  text-shadow: 0 2px 18px rgba(150, 50, 90, 0.45);
}
.heart-beat {
  display: inline-block; color: #ff3b6b;
  animation: beat 1.2s ease-in-out infinite;
  margin: 0 8px;
  text-shadow: 0 0 24px rgba(255, 60, 100, .8);
}
@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  40% { transform: scale(1.05); }
  55% { transform: scale(1.22); }
}
.hero-days { font-size: 18px; color: #fff; text-shadow: 0 1px 6px rgba(150,50,90,.35); }
.days-num {
  font-size: 1.5em; font-weight: 800; color: #ffe08a;
  text-shadow: 0 0 16px rgba(255, 180, 60, .8);
}
.hero-motto {
  margin-top: 12px; font-size: 15px; color: rgba(255,255,255,.95);
  font-style: italic; text-shadow: 0 1px 6px rgba(150,50,90,.3);
}

/* ---------- 布局 ---------- */
main { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.section { margin-bottom: 44px; }
.section-title {
  text-align: center; font-size: 22px; font-weight: 800;
  margin-bottom: 20px; color: #fff; text-shadow: 0 1px 8px rgba(150,50,90,.4);
}

/* ---------- 卡片通用 ---------- */
.weather-card, .anniv-card, .love-note, .form {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

/* ---------- 天气 ---------- */
.weather-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .weather-grid { grid-template-columns: 1fr; } }

.weather-card { padding: 22px 20px; transition: transform .25s ease; }
.weather-card:hover { transform: translateY(-4px); }
.weather-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.weather-city { font-size: 18px; font-weight: 800; }
.weather-person { font-size: 13px; color: var(--text-soft); }
.weather-main { display: flex; align-items: center; gap: 14px; }
.weather-icon { font-size: 52px; line-height: 1; }
.weather-temp { font-size: 46px; font-weight: 800; color: var(--pink-deep); }
.weather-temp small { font-size: 22px; }
.weather-desc { font-size: 16px; margin: 4px 0 12px; color: var(--text-soft); }
.weather-detail { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-soft); }
.weather-detail span {
  background: rgba(255,255,255,.55); padding: 5px 10px; border-radius: 999px;
}
.weather-forecast {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(120,80,100,.2);
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center;
}
.fc-day { font-size: 11px; color: var(--text-soft); }
.fc-icon { font-size: 20px; }
.fc-temp { font-size: 11px; }
.fc-temp .max { color: var(--pink-deep); font-weight: 700; }
.fc-temp .min { color: #6b8bd6; }
.weather-error { color: #b03a5b; font-size: 14px; }
.loading { color: var(--text-soft); text-align: center; padding: 20px 0; }

/* ---------- 纪念日 ---------- */
.anniv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.anniv-card { padding: 20px; text-align: center; cursor: pointer; transition: transform .25s ease; }
.anniv-card:hover { transform: translateY(-4px) scale(1.02); }
.anniv-emoji { font-size: 38px; }
.anniv-title { font-size: 16px; font-weight: 800; margin: 8px 0 4px; }
.anniv-num { font-size: 34px; font-weight: 800; color: var(--pink-deep); line-height: 1.1; }
.anniv-num small { font-size: 16px; }
.anniv-label { font-size: 13px; color: var(--text-soft); }
.anniv-date { font-size: 12px; color: var(--text-soft); margin-top: 10px; opacity: .8; }
.anniv-today { color: #e67e22; font-weight: 800; }

/* ---------- 照片墙 ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.photo-item {
  position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow); background: rgba(255,255,255,.4);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.photo-item:hover img { transform: scale(1.06); }
.empty-hint { text-align: center; color: var(--text-soft); padding: 12px 0; font-size: 14px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff; font-size: 15px; font-weight: 700;
  padding: 12px 26px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(224, 36, 94, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(224, 36, 94, .45); }
.btn:active { transform: translateY(0); }
.btn-add, .btn-upload { display: block; margin: 0 auto; text-align: center; width: fit-content; }
.btn-upload { cursor: pointer; }
.btn-danger { background: linear-gradient(135deg, #ff7a7a, #e0245e); box-shadow: 0 6px 18px rgba(224, 36, 94, .3); }
.btn-ghost { background: rgba(255,255,255,.6); color: var(--text); box-shadow: none; }
.hidden { display: none !important; }
.hint { text-align: center; font-size: 12px; color: var(--text-soft); margin-top: 10px; }
.btn-set-together {
  margin-top: 14px; display: inline-block; cursor: pointer;
  background: rgba(255,255,255,.25); color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: all .2s ease;
}
.btn-set-together:hover { background: rgba(255,255,255,.42); }
.form-tip { text-align: center; font-size: 13px; color: var(--text-soft); margin-top: -4px; }

/* ---------- 悄悄话 ---------- */
.love-note {
  max-width: 620px; margin: 0 auto; text-align: center;
  padding: 30px 24px; font-size: 19px; font-weight: 600;
  color: #a4366b; font-style: italic; line-height: 1.7;
}

/* ---------- 悄悄话留言板 ---------- */
.msg-board { max-width: 620px; margin: 0 auto; }
.msg-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.msg-item {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--card-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow);
}
.msg-bubble { flex: 1; min-width: 0; }
.msg-author { font-size: 13px; font-weight: 800; color: var(--pink-deep); margin-bottom: 4px; }
.msg-content { font-size: 16px; color: var(--text); line-height: 1.6; word-break: break-word; }
.msg-time { font-size: 11px; color: var(--text-soft); margin-top: 6px; opacity: .8; }
.msg-del {
  border: none; background: rgba(0,0,0,.06); color: var(--text-soft);
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  font-size: 13px; flex-shrink: 0; line-height: 1;
}
.msg-del:hover { background: rgba(224,36,94,.15); color: var(--pink-deep); }
.msg-compose { display: flex; gap: 10px; }
.msg-author {
  font-size: 14px; padding: 0 10px; border-radius: 12px;
  border: 1px solid rgba(150,100,130,.25); background: rgba(255,255,255,.8);
  color: var(--text); outline: none;
}
.msg-compose input {
  flex: 1; min-width: 0; font-size: 15px; padding: 11px 12px; border-radius: 12px;
  border: 1px solid rgba(150,100,130,.25); background: rgba(255,255,255,.8);
  color: var(--text); outline: none;
}
.msg-compose input:focus { border-color: var(--pink); }
.msg-compose .btn { padding: 11px 20px; font-size: 14px; flex-shrink: 0; }
@media (max-width: 480px) {
  .msg-compose { flex-wrap: wrap; }
  .msg-compose input { flex: 1 1 100%; order: 3; }
}

/* ---------- 底部 ---------- */
footer { position: relative; z-index: 1; text-align: center; color: rgba(255,255,255,.95); padding-top: 10px; }
.footer-sub { font-size: 12px; opacity: .85; margin-top: 4px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(60, 30, 50, 0.55);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }
.lightbox-content { text-align: center; max-width: 92vw; }
.lightbox-content img {
  max-width: 92vw; max-height: 74vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.lightbox-actions { margin-top: 16px; display: flex; gap: 12px; justify-content: center; }

.form {
  width: 100%; max-width: 420px; padding: 26px; display: flex; flex-direction: column; gap: 14px;
}
.form h3 { text-align: center; color: var(--pink-deep); }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-soft); font-weight: 600; }
.form input, .form select {
  font-size: 15px; padding: 11px 12px; border-radius: 12px;
  border: 1px solid rgba(150,100,130,.25); background: rgba(255,255,255,.8);
  color: var(--text); outline: none;
}
.form input:focus, .form select:focus { border-color: var(--pink); }
.form-actions { display: flex; gap: 10px; justify-content: center; margin-top: 4px; }
.form-actions .btn { padding: 10px 20px; font-size: 14px; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: rgba(40, 25, 40, 0.9); color: #fff; padding: 12px 22px;
  border-radius: 999px; font-size: 14px; z-index: 100;
  opacity: 0; pointer-events: none; transition: all .3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
