/* ============================================================
   婷婷 & 泽鑫 · 我们的记忆 —— 移动端样式
   风格：星空深色背景 + 温柔粉奶油界面
   ============================================================ */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

:root {
  --pink:#e05788;
  --pink-dark:#b63a66;
  --pink-light:#ffd9e6;
  --cream:#fff7fa;
  --text-pink:#c96b90;
  --text-dark:#8a4b6a;
  --bg-deep:#201430;
  --bg-mid:#2b1a3d;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep);
  color:#fff;
  min-height:100vh;
  overflow-x:hidden;
}

.hidden { display:none !important; }

/* ============ 视图容器 ============ */
.view { position:relative; min-height:100vh; }
.main-view { max-width:520px; margin:0 auto; min-height:100vh; padding-bottom:90px; }

/* 背景光晕 */
.bg-glow {
  position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(224,87,136,.18), transparent 60%),
    radial-gradient(500px 380px at 0% 20%, rgba(155,120,220,.16), transparent 55%),
    linear-gradient(170deg, #221634 0%, #1a1026 55%, #241633 100%);
}

/* ============ 密码页 ============ */
.lock-view {
  display:flex; align-items:center; justify-content:center; text-align:center;
  background:
    radial-gradient(700px 500px at 50% -10%, rgba(224,87,136,.25), transparent 60%),
    radial-gradient(500px 400px at 90% 110%, rgba(155,120,220,.2), transparent 55%),
    linear-gradient(170deg, #281a3a 0%, #1a1026 60%, #2a1a3d 100%);
  overflow:hidden;
}
.lock-orb {
  position:absolute; width:340px; height:340px; border-radius:50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,199,222,.35), rgba(224,87,136,.12) 70%);
  filter:blur(40px); top:8%; left:50%; transform:translateX(-50%);
}
.lock-stars {
  position:absolute; inset:0; opacity:.6; pointer-events:none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 40% 70%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 65% 20%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 80% 55%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 30% 85%, #fff, transparent),
    radial-gradient(1px 1px at 90% 80%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 55% 55%, #ffc3d8, transparent);
}
.lock-content { position:relative; z-index:2; padding:0 24px; width:100%; max-width:360px; }
.lock-heart { font-size:40px; margin-bottom:6px; animation:pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.12)} }
.lock-title { font-size:24px; letter-spacing:2px; font-weight:700; }
.lock-title span { color:#f197b8; }
.lock-counter-top { font-size:12px; color:rgba(255,255,255,.6); margin:8px 0 26px; }
.lock-counter-top b { color:#ffb3d1; font-size:14px; }

.lock-secret {
  font-size:12px; letter-spacing:5px; color:rgba(255,214,231,.75);
  margin-bottom:34px; font-weight:600;
  text-shadow:0 0 14px rgba(255,138,179,.35);
}
.lock-dots { display:flex; gap:12px; justify-content:center; margin-bottom:40px; min-height:20px; position:relative; }
.lock-dots i {
  width:16px; height:16px; border-radius:50%;
  background:rgba(255,255,255,.14);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
  transition:.25s cubic-bezier(.5,1.5,.5,1);
}
.lock-dots i.on {
  background:linear-gradient(135deg,#ff9fc0,#ff6fa0);
  box-shadow:0 0 12px rgba(255,111,160,.85), inset 0 0 0 1px rgba(255,255,255,.4);
}
.lock-dots i.err { background:#ff5b6e; box-shadow:0 0 12px rgba(255,91,110,.8); animation:shake .35s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

.lock-pad { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.lock-pad button {
  height:66px; border-radius:22px; border:none; font-size:23px; font-weight:600;
  background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  color:#fff; cursor:pointer; transition:.15s ease;
  box-shadow:0 6px 18px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.12), inset 0 1px 1px rgba(0,0,0,.2);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  font-family:inherit;
}
.lock-pad button:active {
  background:linear-gradient(180deg, rgba(255,138,179,.45), rgba(255,111,160,.3));
  transform:scale(.93); box-shadow:0 3px 8px rgba(0,0,0,.3), inset 0 0 0 1px rgba(255,255,255,.2);
}
.lock-pad button.act {
  background:linear-gradient(180deg, rgba(224,87,136,.42), rgba(255,111,160,.32));
  border:1px solid rgba(255,255,255,.15); color:#ffe3ee; font-size:16px; font-weight:700;
}
.lock-pad button.act:active { transform:scale(.93); background:rgba(224,87,136,.6); }

/* ============ 顶部栏 ============ */
.topbar {
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 18px 6px;
}
.brand { font-weight:700; font-size:17px; letter-spacing:.5px; }
.brand .brand-heart { color:#ff8ab3; }
.top-actions { display:flex; gap:10px; }
.icon-btn {
  background:rgba(255,255,255,.07); border:none; width:38px; height:38px; border-radius:12px;
  font-size:17px; cursor:pointer; border:1px solid rgba(255,255,255,.1);
}

/* ============ 计数器卡片 ============ */
.counter-card {
  margin:12px 16px 6px; padding:20px 18px;
  background: linear-gradient(135deg, #ffd9e6, #ffc3d8);
  border-radius:24px; color:#b63a66; text-align:center;
  box-shadow:0 14px 30px rgba(214,115,160,.35);
  position:relative; overflow:hidden;
}
.counter-card::after {
  content:""; position:absolute; width:120px; height:120px; border-radius:50%;
  background:rgba(255,255,255,.25); top:-40px; right:-30px;
}
.counter-big { font-size:46px; font-weight:800; line-height:1.05; }
.counter-big em { font-style:normal; font-size:20px; font-weight:600; }
.counter-sub { font-size:12px; margin-top:6px; opacity:.85; }
.counter-faces {
  display:flex; align-items:center; justify-content:center; gap:14px; margin-top:14px;
}
.face { font-size:12px; font-weight:700; background:rgba(255,255,255,.6); padding:4px 12px; border-radius:20px; }
.face.a { color:#b63a66; }
.face.b { color:#7d6bb0; }
.counter-faces .heart { color:#fff; font-size:16px; }

/* ============ 筛选 ============ */
.filter { display:flex; gap:8px; padding:12px 16px 4px; }
.chip {
  font-size:12px; padding:6px 14px; border-radius:20px;
  background:rgba(255,255,255,.07); color:#e0c6d4; font-weight:600; cursor:pointer;
  border:1px solid rgba(255,255,255,.08); transition:.2s;
}
.chip.active { background:linear-gradient(135deg,#ff6b9d,#e05788); color:#fff; border-color:transparent; }
.sort-toggle {
  margin-left:auto; font-size:12px; font-weight:600; padding:6px 12px; border-radius:20px;
  background:rgba(255,255,255,.07); color:#e0c6d4; border:1px solid rgba(255,255,255,.12); cursor:pointer;
  transition:.25s cubic-bezier(.34,1.56,.64,1);
}
.sort-toggle.active {
  background:linear-gradient(135deg,#ff6b9d,#e05788); color:#fff; border-color:transparent;
  box-shadow:0 6px 16px rgba(224,87,136,.4);
}

/* 排序模式下的卡片拖拽 */
.timeline.sorting .card { cursor:grab; }
.timeline.sorting .card.dragging { opacity:.85; box-shadow:0 14px 30px rgba(0,0,0,.35); transform:scale(.99); z-index:5; transition:opacity .15s; }
.card .grip {
  position:absolute; top:10px; right:10px; z-index:3; width:auto; min-width:56px; height:28px;
  display:none; align-items:center; justify-content:center; font-size:11px; font-weight:700;
  background:rgba(32,20,48,.62); color:#ffd9e6; border-radius:14px; letter-spacing:.3px; backdrop-filter:blur(3px);
}
.timeline.sorting .card .grip { display:flex; }
.card.sort-instr {
  background:rgba(255,107,157,.14); border:1px dashed rgba(255,107,157,.65);
}

/* ============ 时光轴 ============ */
.timeline { padding:10px 16px 30px; display:flex; flex-direction:column; gap:14px; }
.date-chip {
  font-size:11px; color:#b98aa6; text-align:center; margin:6px 0 2px; letter-spacing:.5px;
  display:flex; align-items:center; gap:10px;
}
.date-chip::before, .date-chip::after { content:""; flex:1; height:1px; background:rgba(255,255,255,.12); }

.card {
  position:relative;
  background:#fff7fa; border-radius:20px; padding:12px; color:var(--text-dark);
  box-shadow:0 8px 22px rgba(0,0,0,.25);
  opacity:0;
  animation:cardIn .5s cubic-bezier(.22,.9,.32,1) forwards;
}
@keyframes cardIn {
  from { opacity:0; transform:translateY(18px) scale(.985); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
.date-chip {
  opacity:0; animation:chipIn .4s ease forwards;
}
@keyframes chipIn { from { opacity:0; transform:translateX(-6px); } to { opacity:1; transform:none; } }
.card .media {
  width:100%; border-radius:14px; display:block; object-fit:cover; margin-bottom:8px; background:#f0d9e3;
}
.card .media.photo { height:220px; }
.card .media.video { height:230px; }
.card .card-txt { font-size:13.5px; line-height:1.65; padding:2px 2px 8px; }
.card .meta { display:flex; align-items:center; gap:5px; font-size:11px; color:#c98aa8; }
.card .meta b { color:#e05788; font-size:12px; }
.card .meta .place { margin-left:auto; }
.card .badge-video {
  position:absolute; top:14px; left:50%; transform:translateX(-50%); z-index:2;
  font-size:11px; background:rgba(32,20,48,.7); color:#fff; padding:4px 12px; border-radius:14px;
}

/* ============ 空状态 ============ */
.empty { text-align:center; padding:80px 20px; color:#c98aa6; }
.empty-icon { font-size:46px; margin-bottom:12px; }
.empty p { font-size:15px; font-weight:600; color:#e0c6d4; }
.empty .empty-sub { font-size:12px; color:#b98aa6; margin-top:6px; font-weight:400; }

/* ============ 悬浮按钮 ============ */
.fab {
  position:fixed; bottom:86px; right:18px; z-index:40;
  width:60px; height:60px; border-radius:50%; border:none;
  background:linear-gradient(135deg,#ff6b9d,#e05788); color:#fff; font-size:32px; line-height:1;
  box-shadow:0 12px 26px rgba(224,87,136,.5); cursor:pointer; transition:.2s;
}
.fab:active { transform:scale(.9); }
.fab-hidden { display:none; }

/* ============ 底部导航 ============ */
.tabbar {
  position:fixed; bottom:0; left:0; right:0; z-index:30;
  margin:0 auto; max-width:520px;
  background:rgba(38,24,52,.92); backdrop-filter:blur(12px);
  border-top:1px solid rgba(255,255,255,.08);
  display:flex; justify-content:space-around; padding:10px 14px 16px;
}
.tab { display:flex; flex-direction:column; align-items:center; gap:3px; font-size:10px; color:#b98aa6; cursor:pointer; transition:.2s; }
.tab b { font-size:20px; font-weight:400; }
.tab.active { color:#ff8ab3; }
.tab.active b { transform:translateY(-2px); }

/* ============ 子面板 ============ */
.panel {
  position:fixed; inset:0; z-index:25; max-width:520px; margin:0 auto;
  background: var(--bg-deep);
  padding:20px 20px 110px; overflow-y:auto; animation:slideUp .3s ease;
}
@keyframes slideUp { from{opacity:0; transform:translateY(20px)} to{opacity:1; transform:none} }
.main-view.panel-open .counter-card,
.main-view.panel-open .filter,
.main-view.panel-open .timeline,
.main-view.panel-open .empty,
.main-view.panel-open .fab { display:none; }
.panel-head { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.panel-head h2 { font-size:18px; }
.back {
  width:36px; height:36px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(255,255,255,.07); color:#fff; font-size:18px;
}

/* 纪念日列表 */
.anniv-list { display:flex; flex-direction:column; gap:12px; }
.anniv-item {
  display:flex; align-items:center; gap:14px; padding:16px;
  background:rgba(255,255,255,.06); border-radius:18px; border:1px solid rgba(255,255,255,.08);
}
.anniv-item .ico { font-size:26px; }
.anniv-item .info { flex:1; }
.anniv-item .info b { font-size:15px; }
.anniv-item .info p { font-size:12px; color:#c9a8bc; margin-top:4px; }
.anniv-item .count { font-size:12px; color:#ffb3d1; background:rgba(255,138,179,.12); padding:3px 10px; border-radius:12px; }

/* 我们 */
.we-card { text-align:center; padding:30px 20px; background:rgba(255,255,255,.06); border-radius:24px; border:1px solid rgba(255,255,255,.08); }
.we-avatar { font-size:52px; }
.we-card h3 { font-size:20px; margin-top:8px; }
.we-card h3 span { color:#f197b8; }
.we-desc { font-size:12px; color:#c9a8bc; margin:8px 0 16px; }
.we-tags { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.we-tags span { font-size:11px; background:rgba(224,87,136,.15); color:#ffb3d1; padding:5px 12px; border-radius:14px; }
.we-stats { display:flex; gap:12px; margin-top:20px; }
.stat { flex:1; text-align:center; padding:16px 8px; background:rgba(255,255,255,.06); border-radius:16px; }
.stat b { font-size:24px; color:#ff8ab3; display:block; }
.stat span { font-size:11px; color:#c9a8bc; }

/* 设置 */
.set-group { display:flex; flex-direction:column; gap:10px; }
.set-item {
  display:flex; align-items:center; gap:14px; padding:14px 16px;
  background:rgba(255,255,255,.06); border-radius:16px; cursor:pointer;
  border:1px solid rgba(255,255,255,.07); transition:.15s;
}
.set-item:active { background:rgba(255,255,255,.12); }
.set-icon { font-size:22px; }
.set-item b { font-size:14px; }
.set-item p { font-size:11px; color:#c9a8bc; margin-top:2px; }
.set-item > i { margin-left:auto; color:#c9a8bc; font-style:normal; font-size:18px; }
.set-foot { text-align:center; font-size:11px; color:#8f6f86; margin-top:20px; }

/* ============ 弹层 ============ */
.overlay {
  position:fixed; inset:0; z-index:60; background:rgba(16,10,22,.7);
  display:flex; align-items:flex-end; justify-content:center; backdrop-filter:blur(3px);
  animation:fadein .25s ease;
}
@keyframes fadein { from{opacity:0} to{opacity:1} }
.overlay.center { align-items:center; }

.detail {
  background:#fff7fa; color:var(--text-dark); width:100%; max-width:520px; height:100%;
  position:relative; overflow-y:auto;
}
.detail-close {
  position:sticky; top:14px; left:auto; margin:14px 14px 0 auto; z-index:5; display:block;
  width:38px; height:38px; border-radius:50%; border:none; cursor:pointer;
  background:rgba(32,20,48,.65); color:#fff; font-size:15px;
}
.detail-body img { width:100%; display:block; }
.detail-body video { width:100%; display:block; }
.detail-txt { padding:18px 20px 40px; }
.detail-txt h3 { color:#e05788; font-size:18px; margin-bottom:8px; }
.detail-txt p { font-size:14px; line-height:1.7; color:#8a4b6a; }
.detail-txt .meta { font-size:12px; color:#c9a8bc; margin-top:14px; }

/* 底部抽屉 */
.sheet {
  background:#fff7fa; color:var(--text-dark); width:100%; max-width:520px;
  border-radius:24px 24px 0 0; padding:20px 20px 30px; animation:slideUp .3s ease;
}
.sheet-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.sheet-head h3 { font-size:18px; color:#e05788; }
.sheet-close {
  width:32px; height:32px; border-radius:50%; border:none; cursor:pointer; font-size:15px;
  background:rgba(32,20,48,.08); color:#8a4b6a;
}

.add-type { display:flex; gap:8px; margin-bottom:16px; }
.atype {
  flex:1; padding:12px; border-radius:14px; cursor:pointer; font-size:13px; font-weight:600;
  background:#f3e4ec; color:#c96b90; border:2px solid transparent;
}
.atype.active { background:#fff; border-color:#e05788; color:#e05788; }

.add-preview { margin:12px 0; }
.add-preview img, .add-preview video { width:100%; border-radius:14px; max-height:260px; object-fit:cover; }

.add-field { margin-bottom:14px; }
.add-field label { display:block; font-size:12px; color:#c96b90; font-weight:600; margin-bottom:7px; }
.add-field input[type=text], .add-field input[type=date], .add-field input[type=tel], .add-field textarea {
  width:100%; padding:11px 14px; border-radius:12px; border:1px solid #ead6e0;
  font-size:14px; font-family:inherit; color:var(--text-dark); background:#fff; outline:none;
}
.add-field textarea { resize:none; }

.mood-row { display:flex; gap:8px; flex-wrap:wrap; }
.mood {
  width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:20px; cursor:pointer; background:#f3e4ec; transition:.15s;
}
.mood.active { background:#ffd9e6; box-shadow:0 0 0 2px #e05788; }

.add-submit {
  width:100%; padding:15px; border:none; border-radius:16px; cursor:pointer; margin-top:6px;
  font-size:15px; font-weight:700; color:#fff;
  background:linear-gradient(135deg,#ff6b9d,#e05788);
  box-shadow:0 10px 22px rgba(224,87,136,.4);
}
.add-submit:active { transform:scale(.98); }

.toast {
  position:fixed; bottom:110px; left:50%; transform:translateX(-50%); z-index:80;
  background:rgba(32,20,48,.92); color:#fff; padding:10px 18px; border-radius:22px; font-size:13px;
  box-shadow:0 8px 20px rgba(0,0,0,.3); pointer-events:none; transition:.3s; opacity:0;
}
.toast.show { opacity:1; }

/* ============================================================
   高级优雅化优化层 (v2)
   ============================================================ */

/* 全局更细腻的背景 */
.bg-glow {
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(224,87,136,.20), transparent 62%),
    radial-gradient(520px 420px at -5% 25%, rgba(150,110,220,.18), transparent 58%),
    radial-gradient(420px 320px at 105% 80%, rgba(244,143,177,.10), transparent 60%),
    linear-gradient(168deg, #231736 0%, #180f24 55%, #251635 100%);
}

/* 计数器卡片：光泽 + 漂浮装饰 */
.counter-card {
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255,255,255,.45), rgba(255,255,255,0) 55%),
    radial-gradient(140% 120% at 100% 100%, rgba(255,138,179,.45), rgba(255,138,179,0) 60%),
    linear-gradient(135deg, #ffe1ec, #ffc6db);
  box-shadow:0 18px 40px rgba(214,115,160,.38), inset 0 1px 0 rgba(255,255,255,.8);
}
.counter-big { position:relative; z-index:1; text-shadow:0 2px 12px rgba(182,58,102,.25); }
.counter-big em { letter-spacing:2px; }
.counter-card::before {
  content:"✦"; position:absolute; top:14px; right:22px; z-index:1;
  color:rgba(255,255,255,.6); font-size:16px;
}
.counter-card .heart { filter:drop-shadow(0 4px 8px rgba(230,90,130,.35)); }

/* 时光轴卡片：柔和渐变描边 + 高光 */
.card {
  border-radius:22px; border:1px solid rgba(255,160,196,.18);
  background:
    linear-gradient(#fffdfe,#fff7fa);
  box-shadow:0 14px 34px rgba(35,15,30,.28), 0 2px 6px rgba(255,255,255,.25) inset;
}
.card .media.photo, .card .media.video { border-radius:16px; box-shadow:0 6px 16px rgba(150,60,100,.15); }
.card-title { font-size:14.5px; font-weight:700; color:#c04374; margin:2px 2px 4px; }

/* 分类筛选 chips 质感 */
.chip { border-radius:22px; transition:.25s cubic-bezier(.34,1.56,.64,1); }
.chip.active { box-shadow:0 6px 16px rgba(224,87,136,.4); }

/* 悬浮按钮：呼吸微光 */
.fab { animation:fabPulse 2.6s ease-in-out infinite; }
@keyframes fabPulse {
  0%,100% { box-shadow:0 12px 26px rgba(224,87,136,.5), 0 0 0 0 rgba(224,87,136,.45); }
  50% { box-shadow:0 12px 26px rgba(224,87,136,.5), 0 0 0 12px rgba(224,87,136,0); }
}

/* 底部导航 active 光晕 */
.tab.active b { filter:drop-shadow(0 0 8px rgba(255,138,179,.8)); }

/* 顶部栏品牌微调 */
.brand { letter-spacing:1px; }
.brand .brand-heart { display:inline-block; animation:heartbeat 1.8s ease-in-out infinite; }
@keyframes heartbeat { 0%,100%{transform:scale(1)} 12%{transform:scale(1.25)} 24%{transform:scale(1)} 36%{transform:scale(1.18)} }

/* 次级面板 / 设置项 质感 */
.anniv-item, .set-item, .we-card { backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }

/* 全局柔和过渡 */
.card, .anniv-item, .set-item, .chip, .tab { transition:transform .2s ease, box-shadow .2s ease, background .2s ease; }

/* 编辑按钮（详情内） + 删除按钮 */
.edit-close {
  margin-top:16px; width:100%; padding:13px; border:none; border-radius:14px; cursor:pointer;
  font-size:14px; font-weight:700; color:#c04374;
  background:linear-gradient(135deg,#ffe4ef,#ffd2e1); box-shadow:0 8px 18px rgba(214,115,160,.25);
}
.edit-close:active { transform:scale(.97); }
.add-submit.del {
  margin-top:10px; background:linear-gradient(135deg,#ff8b9b,#e05b70);
  box-shadow:0 10px 22px rgba(224,91,112,.35);
}
.add-submit.del:active { transform:scale(.98); }

/* 媒体图片平滑显示 */
.media { transition:opacity .35s ease, transform .35s ease; }
