/* ============================================================
   ♥ 华丽浪漫样式 — 深紫夜空 × 玫红 × 鎏金
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  color: #fff;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(255, 45, 111, .32), transparent 60%),
    radial-gradient(900px 500px at 110% 20%, rgba(123, 47, 247, .35), transparent 60%),
    radial-gradient(800px 600px at 50% 115%, rgba(255, 94, 156, .25), transparent 65%),
    linear-gradient(160deg, #2a0845 0%, #1b0630 45%, #12031f 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
}

button { font-family: inherit; border: none; background: none; color: inherit; cursor: pointer; touch-action: manipulation; }
img { display: block; }
.hidden { display: none !important; }

.kai { font-family: "STKaiti", "KaiTi", "楷体", serif; }

/* ---------------- 自定义背景 ---------------- */

#bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
}
/* 有自定义背景时盖一层深色渐变，保证文字可读 */
body.has-bg #bg-layer::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(168deg, rgba(28, 6, 48, .62) 0%, rgba(15, 3, 28, .78) 55%, rgba(10, 2, 20, .85) 100%);
}

/* ---------------- 背景：星星 & 花瓣 ---------------- */

#stars, #petals { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.star {
  position: absolute; background: #fff; border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }

.petal {
  position: absolute; top: -46px; opacity: .85;
  animation: fall linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 120, 170, .45));
}
@keyframes fall {
  0%   { transform: translateY(-40px) rotate(0deg); }
  100% { transform: translateY(112vh) rotate(560deg); }
}

/* ---------------- 页面骨架 ---------------- */

.page {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column;
}

#main-page {
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
}

/* ---------------- 登录页 ---------------- */

#login-page {
  align-items: center; justify-content: center; gap: 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  text-align: center;
}

.login-title {
  font-family: "STKaiti", "KaiTi", "楷体", serif;
  font-size: 38px; font-weight: 400; letter-spacing: 6px;
  background: linear-gradient(180deg, #fff6dd 10%, #ffd89b 45%, #f7a76c 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 190, 120, .45));
}

.login-names { font-size: 20px; letter-spacing: 2px; color: #ffe6f1; }
.heart-glyph { color: #ff2d6f; display: inline-block; animation: beatSmall 1.4s ease-in-out infinite; margin: 0 4px; text-shadow: 0 0 12px rgba(255, 45, 111, .9); }
@keyframes beatSmall { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.28); } 50% { transform: scale(1); } 70% { transform: scale(1.18); } }

.login-sub { font-size: 13px; color: rgba(255, 255, 255, .65); letter-spacing: 2px; }

.login-cards { display: flex; flex-direction: column; gap: 18px; width: min(320px, 88vw); margin-top: 10px; }

.login-card {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 20px 16px 16px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 170, 200, .4);
  box-shadow: 0 12px 34px rgba(255, 45, 111, .22), inset 0 0 24px rgba(255, 255, 255, .05);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .15s ease;
}
.login-card.tilt-l { transform: rotate(-1.6deg); }
.login-card.tilt-r { transform: rotate(1.6deg); }
.login-card:active { transform: scale(.95) rotate(0deg); }

.lc-avatar {
  width: 92px; height: 92px; border-radius: 50%; padding: 3px;
  background: conic-gradient(#ffd89b, #ff5e9c, #b06ab3, #ffd89b);
  box-shadow: 0 0 22px rgba(255, 100, 160, .55);
}
.lc-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .92); }

.lc-name { font-size: 21px; letter-spacing: 3px; color: #fff; text-shadow: 0 0 10px rgba(255, 140, 190, .7); }
.lc-tag { font-size: 12px; color: rgba(255, 230, 241, .78); letter-spacing: 1px; }

.login-foot { margin-top: 8px; font-size: 12px; color: rgba(255, 255, 255, .45); letter-spacing: 2px; }

/* ---------------- 主页：顶栏 ---------------- */

.topbar { display: flex; align-items: center; justify-content: space-between; }

.topbar-title {
  font-family: "STKaiti", "KaiTi", "楷体", serif;
  font-size: 19px; letter-spacing: 2px;
  background: linear-gradient(180deg, #fff6dd, #ffd89b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 8px rgba(255, 190, 120, .35));
}
.topbar-title .heart-glyph { font-size: 15px; -webkit-text-fill-color: #ff2d6f; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #ffd7e6;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.icon-btn:active { transform: scale(.9); }
.top-tools { display: flex; gap: 8px; }
.music-note.playing { animation: spinNote 2.6s linear infinite; color: #ffd89b; border-color: rgba(255, 216, 155, .6); text-shadow: 0 0 10px rgba(255, 216, 155, .9); }
@keyframes spinNote { to { transform: rotate(360deg); } }

/* ---------------- 主页：爱心 & 头像舞台 ---------------- */

.love-stage { position: relative; flex: 1; min-height: 300px; max-height: 420px; }

/* 大爱心：rotate(-45deg) 方块 + 两个圆，filter 给整体发光 */
#big-heart {
  position: absolute; left: 50%; top: 56%;
  width: 150px; height: 150px; margin: -75px;
  background: linear-gradient(135deg, #ff5e9c 0%, #ff2d6f 55%, #e6005c 100%);
  transform: rotate(-45deg);
  animation: beat 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 34px rgba(255, 45, 111, .68));
}
#big-heart::before, #big-heart::after {
  content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%;
  background: linear-gradient(135deg, #ff5e9c 0%, #ff2d6f 55%, #e6005c 100%);
}
#big-heart::before { top: -75px; left: 0; }
#big-heart::after  { top: 0; left: 75px; }
@keyframes beat {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  30%      { transform: rotate(-45deg) scale(1.09); }
  50%      { transform: rotate(-45deg) scale(.99); }
  70%      { transform: rotate(-45deg) scale(1.05); }
}

.heart-sparkle {
  position: absolute; left: 50%; top: 56%; transform: translate(30px, -104px);
  font-size: 18px; animation: twinkle 2s ease-in-out infinite;
}

.avatar-block { position: absolute; top: 4%; width: 112px; display: flex; flex-direction: column; align-items: center; }
#block-liu  { left: calc(50% - 122px); }
#block-hong { left: calc(50% + 10px); }

.avatar-wrap { position: relative; width: 104px; height: 104px; }
.avatar-ring { position: absolute; inset: 0; border-radius: 50%; }
.avatar-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #ffd89b, #ff5e9c, #b06ab3, #ffe3a0, #ffd89b);
  animation: ringspin 6s linear infinite;
  filter: drop-shadow(0 0 12px rgba(255, 110, 160, .8));
}
@keyframes ringspin { to { transform: rotate(360deg); } }
.avatar-ring img {
  position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px);
  border-radius: 50%; object-fit: cover; z-index: 1;
  border: 2px solid rgba(255, 255, 255, .92);
  background: #3a1257;
}

/* 自己的头像才有换头像小相机 */
.camera-hint {
  display: none; position: absolute; right: 2px; bottom: 2px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%; font-size: 13px;
  align-items: center; justify-content: center;
  background: rgba(255, 45, 111, .9); border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  animation: pulseHint 1.8s ease-in-out infinite;
}
@keyframes pulseHint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.avatar-block.mine .camera-hint { display: flex; }

.avatar-name {
  margin-top: 8px; font-size: 14px; letter-spacing: 2px;
  color: #ffe6f1; text-shadow: 0 0 8px rgba(255, 140, 190, .75);
}
.avatar-block.mine .avatar-name::after { content: '（我）'; font-size: 11px; color: #ffd89b; }

/* 砸中后的缩扁 */
.squish { animation: squish .45s ease; }
@keyframes squish {
  0% { transform: scale(1); } 35% { transform: scale(1.15, .78); } 65% { transform: scale(.94, 1.1); } 100% { transform: scale(1); }
}

/* ---------------- 话术气泡 ---------------- */

.bubble {
  position: absolute; bottom: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) scale(.6); transform-origin: bottom center;
  min-width: 118px; max-width: min(190px, 46vw); width: max-content;
  padding: 9px 13px; border-radius: 15px;
  background: linear-gradient(160deg, #fff, #ffe9f2);
  color: #b3124f; font-size: 13px; line-height: 1.45; text-align: center;
  box-shadow: 0 6px 20px rgba(255, 45, 111, .35), 0 0 0 1px rgba(255, 160, 200, .5);
  opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity .22s ease, transform .22s cubic-bezier(.34, 1.56, .64, 1);
}
.bubble::after {
  content: ''; position: absolute; bottom: -5px; left: 50%; width: 10px; height: 10px;
  margin-left: -5px; background: #fff; transform: rotate(45deg);
  box-shadow: 1px 1px 0 0 rgba(255, 160, 200, .5);
}
.bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---------------- 数值区 ---------------- */

.stats { display: flex; flex-direction: column; gap: 10px; }

.stat-card {
  border-radius: 18px; padding: 10px 14px; text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22), inset 0 0 18px rgba(255, 255, 255, .04);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.stat-label { display: block; font-size: 11px; letter-spacing: 2px; color: rgba(255, 230, 241, .8); }
.stat-num {
  display: block; font-size: 21px; margin-top: 2px;
  background: linear-gradient(180deg, #fff6dd, #ffd89b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 190, 120, .35));
}
.stat-icon { display: block; font-size: 17px; margin-bottom: 1px; }

.days-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.days-card .stat-label { font-size: 13px; }
.days-num b {
  font-size: 34px; font-weight: 700; margin-right: 4px;
  background: linear-gradient(180deg, #fff6dd 15%, #ffd89b 60%, #f7a76c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 190, 120, .45));
}
.days-num i { font-style: normal; font-size: 13px; color: rgba(255, 230, 241, .85); }
.days-hint { font-size: 11px; color: rgba(255, 216, 155, .8); letter-spacing: 1px; animation: twinkle 2.4s ease-in-out infinite; }
.days-card:active { transform: scale(.97); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-row .stat-card { padding: 10px 6px; }

/* ---------------- 操作按钮 ---------------- */

.actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 14px;
}

.action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border-radius: 22px; font-size: 14.5px; letter-spacing: 2px;
  color: #fff; text-shadow: 0 0 8px rgba(255, 255, 255, .35);
  background: linear-gradient(150deg, rgba(255, 94, 156, .3), rgba(123, 47, 247, .26));
  border: 1px solid rgba(255, 160, 200, .45);
  box-shadow: 0 8px 22px rgba(255, 45, 111, .22), inset 0 0 20px rgba(255, 255, 255, .06);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .12s ease, filter .12s ease;
}
.action-btn:active { transform: scale(.92); filter: brightness(1.35); }
.a-icon { font-size: 27px; filter: drop-shadow(0 0 10px rgba(255, 120, 170, .7)); }

/* ---------------- 弹窗 ---------------- */

.modal {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 0, 25, .62);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: 24px;
}

.modal-card {
  width: min(330px, 90vw); padding: 24px 20px 20px; border-radius: 24px; text-align: center;
  background: linear-gradient(165deg, rgba(76, 22, 110, .96), rgba(27, 6, 48, .96));
  border: 1px solid rgba(255, 180, 215, .4);
  box-shadow: 0 18px 50px rgba(255, 45, 111, .3);
  animation: popIn .32s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes popIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-card h3 { font-size: 19px; letter-spacing: 2px; color: #ffe6f1; text-shadow: 0 0 10px rgba(255, 140, 190, .6); }
.modal-sub { margin-top: 8px; font-size: 12.5px; color: rgba(255, 230, 241, .7); letter-spacing: 1px; }

#anniv-input {
  width: 100%; margin: 16px 0 4px; padding: 11px 12px; border-radius: 13px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 16px;
  border: 1px solid rgba(255, 255, 255, .3); color-scheme: dark; outline: none;
}

.modal-btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.modal-btns.single { margin-top: 20px; }
.m-btn {
  flex: 1; max-width: 130px; padding: 11px 0; border-radius: 14px; font-size: 14.5px; letter-spacing: 1px;
}
.m-btn.primary {
  background: linear-gradient(135deg, #ff5e9c, #ff2d6f);
  box-shadow: 0 6px 18px rgba(255, 45, 111, .45); color: #fff;
}
.m-btn.ghost { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .85); }
.m-btn:active { transform: scale(.94); }

.peek-eyes { font-size: 46px; margin-bottom: 10px; animation: peekWiggle 1.1s ease-in-out infinite; filter: drop-shadow(0 0 14px rgba(255, 216, 155, .7)); }
@keyframes peekWiggle {
  0%, 100% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-7px) scale(1.06); }
  75% { transform: translateX(7px) scale(1.06); }
}

/* ---------------- 特效层 ---------------- */

#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }

#fx-layer > * { position: absolute; will-change: transform, opacity; }

.fx-heart, .fx-kiss { font-size: 36px; margin: -18px 0 0 -18px; filter: drop-shadow(0 0 12px rgba(255, 45, 111, .85)); }
.fx-hammer { font-size: 78px; margin: -39px 0 0 -39px; transform-origin: 25% 85%; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.fx-boom { font-size: 60px; margin: -30px 0 0 -30px; filter: drop-shadow(0 0 18px rgba(255, 160, 60, .9)); }
.fx-mini { font-size: 17px; margin: -9px 0 0 -9px; filter: drop-shadow(0 0 8px rgba(255, 45, 111, .8)); }

.ripple {
  width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%;
  border: 3px solid rgba(255, 110, 170, .85);
  box-shadow: 0 0 18px rgba(255, 110, 170, .6), inset 0 0 12px rgba(255, 110, 170, .4);
}

.float-num {
  font-size: 16px; font-weight: 700; color: #ffd89b; letter-spacing: 1px;
  margin: -12px 0 0 -24px;
  text-shadow: 0 0 10px rgba(255, 45, 111, .9), 0 1px 2px rgba(0, 0, 0, .5);
  white-space: nowrap;
}
.float-num.down { color: #ff8f6b; }

/* ---------------- 震动 & Toast ---------------- */

body.shake #main-page { animation: shake .45s ease; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-7px, 3px); }
  40% { transform: translate(6px, -3px); }
  60% { transform: translate(-5px, 2px); }
  80% { transform: translate(4px, -2px); }
}

#toast {
  position: fixed; top: 13%; left: 50%; transform: translateX(-50%);
  z-index: 200; max-width: 82vw;
  padding: 10px 18px; border-radius: 999px; font-size: 13.5px; letter-spacing: 1px;
  background: rgba(20, 4, 36, .88); color: #ffe6f1;
  border: 1px solid rgba(255, 160, 200, .45);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  text-align: center;
  transition: opacity .3s ease, transform .3s ease;
}
#toast.hidden { opacity: 0; transform: translateX(-50%) translateY(-12px); pointer-events: none; }

/* ---------------- 小屏微调 ---------------- */

@media (max-width: 359px) {
  .avatar-block { width: 96px; }
  .avatar-wrap { width: 88px; height: 88px; }
  #block-liu { left: calc(50% - 106px); }
  #block-hong { left: calc(50% + 10px); }
  #big-heart { width: 128px; height: 128px; margin: -64px; }
  #big-heart::before, #big-heart::after { width: 128px; height: 128px; }
  #big-heart::before { top: -64px; }
  #big-heart::after { left: 64px; }
}

/* ============================================================
   ♥ 功能入口（礼物/成就/约会/时光机/信箱）
   ============================================================ */

.features {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  margin-top: 10px;
}
.feat-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 2px 7px; border-radius: 15px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 190, 215, .32);
  transition: transform .12s ease;
}
.feat-btn:active { transform: scale(.9); }
.f-icon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(255, 120, 170, .6)); }
.f-label { font-size: 11px; letter-spacing: 1px; color: rgba(255, 230, 241, .88); }

.dot {
  position: absolute; top: -4px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: linear-gradient(135deg, #ff5e9c, #ff2d6f);
  color: #fff; font-size: 10px; font-style: normal; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #1b0630;
  box-shadow: 0 0 8px rgba(255, 45, 111, .8);
  animation: pulseHint 1.6s ease-in-out infinite;
}
.dot[hidden] { display: none; }

/* ============================================================
   ♥ 功能面板（全屏抽屉）
   ============================================================ */

.sheet {
  position: fixed; inset: 0; z-index: 140;
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, rgba(46, 12, 70, .98), rgba(18, 4, 34, .99));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: sheetUp .28s cubic-bezier(.22, 1, .36, 1);
}
@keyframes sheetUp { from { transform: translateY(7%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px;
  border-bottom: 1px solid rgba(255, 190, 215, .22);
  font-size: 17px; letter-spacing: 2px; color: #ffe6f1;
  text-shadow: 0 0 10px rgba(255, 140, 190, .6);
}
.sheet-head .icon-btn { width: 34px; height: 34px; font-size: 15px; }

.sheet-body { flex: 1; overflow-y: auto; padding: 14px 16px calc(env(safe-area-inset-bottom, 0px) + 18px); -webkit-overflow-scrolling: touch; }
.sheet-tip { font-size: 12px; color: rgba(255, 230, 241, .62); letter-spacing: 1px; margin-bottom: 10px; }
.sheet-sub {
  margin: 20px 0 10px; font-size: 14px; letter-spacing: 2px; color: #ffd89b;
  text-shadow: 0 0 8px rgba(255, 190, 120, .4);
}
.empty-tip { text-align: center; font-size: 13px; color: rgba(255, 230, 241, .5); padding: 18px 0; letter-spacing: 1px; }

/* ---------------- 礼物小铺 ---------------- */

.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.gift-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 2px 8px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 190, 215, .3);
  transition: transform .12s ease;
}
.gift-item:active { transform: scale(.9); }
.gift-item .g-emoji { font-size: 26px; filter: drop-shadow(0 0 8px rgba(255, 120, 170, .55)); }
.gift-item .g-name { font-size: 12px; color: #ffe6f1; }
.gift-item .g-price { font-size: 11px; color: #ffd89b; }
.gift-item.poor { opacity: .45; }

.gift-confirm {
  margin-top: 12px; padding: 12px; border-radius: 14px; text-align: center;
  background: rgba(255, 45, 111, .12); border: 1px dashed rgba(255, 160, 200, .5);
  font-size: 14px; color: #ffe6f1;
}
.gc-btns { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.gift-show { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.gift-owned {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 2px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 216, 155, .13), rgba(255, 216, 155, .05));
  border: 1px solid rgba(255, 216, 155, .4);
}
.gift-owned .g-emoji { font-size: 24px; }
.gift-owned .g-count { font-size: 12px; color: #ffd89b; font-weight: 700; }
.gift-owned .g-by { font-size: 10px; color: rgba(255, 230, 241, .6); }

/* ---------------- 成就 ---------------- */

.achv-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 14px; margin-bottom: 8px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .14);
}
.achv-row.got {
  background: linear-gradient(160deg, rgba(255, 216, 155, .14), rgba(255, 94, 156, .08));
  border: 1px solid rgba(255, 216, 155, .5);
  box-shadow: 0 0 14px rgba(255, 216, 155, .12);
}
.achv-row .a-face { font-size: 26px; width: 34px; text-align: center; filter: drop-shadow(0 0 8px rgba(255, 190, 120, .5)); }
.achv-row.locked .a-face { filter: grayscale(1); opacity: .4; }
.achv-info { flex: 1; min-width: 0; }
.achv-name { font-size: 14px; color: #fff; letter-spacing: 1px; }
.achv-row.locked .achv-name { color: rgba(255, 255, 255, .55); }
.achv-desc { font-size: 11.5px; color: rgba(255, 230, 241, .62); margin-top: 2px; }
.achv-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); margin-top: 6px; overflow: hidden; }
.achv-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #ff5e9c, #ffd89b); }
.achv-state { font-size: 11px; color: #ffd89b; white-space: nowrap; }

/* ---------------- 约会提案 ---------------- */

.idea-body { display: flex; flex-direction: column; }
.idea-card {
  padding: 30px 18px; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(255, 94, 156, .16), rgba(123, 47, 247, .14));
  border: 1px solid rgba(255, 190, 215, .4);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, .04);
}
.idea-emoji { font-size: 40px; margin-bottom: 10px; }
.idea-text { font-size: 21px; letter-spacing: 2px; color: #fff; line-height: 1.5; font-family: "STKaiti", "KaiTi", "楷体", serif; }
.idea-hint { margin-top: 10px; font-size: 12px; color: rgba(255, 230, 241, .6); letter-spacing: 1px; }
.idea-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.idea-btns .m-btn { max-width: 140px; }

.idea-add { display: flex; gap: 8px; }
.idea-add input {
  flex: 1; padding: 10px 12px; border-radius: 12px; font-size: 14px;
  background: rgba(255, 255, 255, .1); color: #fff; outline: none;
  border: 1px solid rgba(255, 255, 255, .25);
}
.idea-add .m-btn { max-width: 90px; }

/* ---------------- 时光机 ---------------- */

.tl-item { display: flex; gap: 10px; align-items: flex-start; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-icon {
  width: 32px; height: 32px; border-radius: 50%; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(255, 94, 156, .3), rgba(123, 47, 247, .25));
  border: 1px solid rgba(255, 190, 215, .45);
}
.tl-line { width: 2px; flex: 1; min-height: 14px; background: rgba(255, 190, 215, .2); }
.tl-item:last-child .tl-line { display: none; }
.tl-main { flex: 1; padding-bottom: 14px; min-width: 0; }
.tl-text { font-size: 13.5px; color: #ffe6f1; line-height: 1.5; }
.tl-time { font-size: 11px; color: rgba(255, 230, 241, .48); margin-top: 2px; letter-spacing: .5px; }

/* ---------------- 信箱 ---------------- */

#letter-list { display: flex; flex-direction: column; gap: 8px; }
.mail-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px; text-align: left;
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .14);
}
.mail-item.unread {
  background: linear-gradient(160deg, rgba(255, 94, 156, .18), rgba(255, 94, 156, .06));
  border: 1px solid rgba(255, 160, 200, .55);
  box-shadow: 0 0 12px rgba(255, 45, 111, .15);
}
.mail-face { font-size: 20px; }
.mail-mid { flex: 1; min-width: 0; }
.mail-from { font-size: 13px; color: #fff; }
.mail-prev { font-size: 11.5px; color: rgba(255, 230, 241, .55); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-state { font-size: 11px; color: rgba(255, 230, 241, .5); white-space: nowrap; }
.mail-item.unread .mail-state { color: #ff8fb8; }

.back-btn { margin-bottom: 12px; }
.letter-card {
  padding: 18px 16px; border-radius: 18px;
  background: linear-gradient(170deg, #fff, #ffeef5);
  color: #8d1050;
  box-shadow: 0 10px 30px rgba(255, 45, 111, .25);
}
.letter-meta { font-size: 12px; color: #c06889; margin-bottom: 10px; letter-spacing: 1px; }
.letter-text { font-size: 15px; line-height: 1.9; white-space: pre-wrap; word-break: break-word; font-family: "STKaiti", "KaiTi", "楷体", serif; }

#letter-textarea {
  width: 100%; padding: 12px; border-radius: 14px; font-size: 14px; line-height: 1.7;
  background: rgba(255, 255, 255, .1); color: #fff; outline: none; resize: none;
  border: 1px solid rgba(255, 255, 255, .25);
}
.send-btn { width: 100%; margin-top: 10px; max-width: none; }

/* ---------------- 成就庆祝 ---------------- */

#achv-celebrate {
  position: fixed; inset: 0; z-index: 180;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 0, 25, .7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.achv-card {
  width: min(300px, 84vw); padding: 28px 20px; border-radius: 24px; text-align: center;
  background: linear-gradient(165deg, rgba(84, 24, 118, .97), rgba(30, 8, 52, .97));
  border: 1.5px solid rgba(255, 216, 155, .65);
  box-shadow: 0 0 44px rgba(255, 216, 155, .25), 0 18px 50px rgba(0, 0, 0, .5);
  animation: popIn .4s cubic-bezier(.34, 1.56, .64, 1);
}
.achv-shine { font-size: 22px; margin-bottom: 4px; animation: twinkle 1.2s ease-in-out infinite; }
.achv-icon {
  font-size: 58px; margin: 6px 0 10px;
  filter: drop-shadow(0 0 18px rgba(255, 216, 155, .8));
  animation: beatSmall 1.4s ease-in-out infinite;
}
.achv-unlock { font-size: 12px; letter-spacing: 8px; color: #ffd89b; margin-bottom: 8px; }
.achv-name { font-size: 21px; color: #fff; letter-spacing: 2px; text-shadow: 0 0 12px rgba(255, 140, 190, .7); }
.achv-desc { margin-top: 8px; font-size: 12.5px; color: rgba(255, 230, 241, .7); }
