/* 熬夜应对神器 · 公共样式（深夜主题，低亮度护眼，全部自包含） */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(175deg, #0b1026 0%, #131a3a 40%, #1a2346 70%, #251b3d 100%);
  color: #e8e4f5;
  min-height: 100vh; min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 星空 */
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.stars i { position: absolute; background: #fff; border-radius: 50%; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: .9; } }

/* 页面容器 */
.page { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; padding: 40px 20px 70px; text-align: center; }

/* 顶部导航 */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(10, 14, 34, .55); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.07); }
.topnav .home-link { font-size: 13px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); text-decoration: none; color: inherit; }
.topnav .crumb { font-size: 12px; color: rgba(232,228,245,.5); }

/* 标题 */
h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 10px; }
.sub { color: rgba(232,228,245,.65); font-size: 15px; line-height: 1.7; margin-bottom: 30px; }

/* 大按钮 */
.btn {
  display: inline-block; border: none; cursor: pointer;
  font-size: 17px; font-family: inherit; color: #1a1425;
  background: linear-gradient(135deg, #ffd9a0, #ffb37b);
  padding: 14px 34px; border-radius: 999px; font-weight: 700;
  box-shadow: 0 10px 30px rgba(255, 160, 90, .25);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255,160,90,.35); }
.btn:active { transform: scale(.96); }
.btn.ghost { background: rgba(255,255,255,.1); color: #e8e4f5; box-shadow: none; font-weight: 400; }

/* 选项卡片 */
.opts { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.opt {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 16px 18px; cursor: pointer;
  transition: transform .15s, background .15s;
}
.opt:hover { transform: translateX(4px); background: rgba(255,255,255,.12); }
.opt .ic { font-size: 30px; }
.opt .tx { font-size: 15.5px; line-height: 1.4; }

/* 进度点 */
.progress { display: flex; justify-content: center; gap: 8px; margin: 6px 0 26px; }
.progress i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.progress i.on { background: #ffb37b; box-shadow: 0 0 10px rgba(255,179,123,.8); }

/* 结果页 */
.result-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px; padding: 30px 24px; margin-top: 14px;
}
.result-card .big { font-size: 62px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.result-card h2 { font-size: 26px; margin: 12px 0 8px; }
.result-card p { color: rgba(232,228,245,.8); font-size: 15px; line-height: 1.8; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.tool-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 18px 12px; text-decoration: none; color: inherit;
  transition: transform .15s, background .15s;
}
.tool-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.12); }
.tool-card .ic { font-size: 34px; display: block; margin-bottom: 8px; }
.tool-card .nm { font-size: 14.5px; font-weight: 600; }
.tool-card .ds { font-size: 12px; color: rgba(232,228,245,.55); margin-top: 4px; line-height: 1.4; }

/* 呼吸时钟 */
.breathe-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 80px 20px 40px; }
.moon {
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7d6, #ffd98a 60%, #f0b55a);
  box-shadow: 0 0 70px rgba(255, 214, 120, .55), 0 0 140px rgba(255, 214, 120, .2);
  display: flex; align-items: center; justify-content: center;
  transition: transform 4s ease-in-out;
}
.moon .cat-in { font-size: 64px; }
.phase { margin-top: 34px; font-size: 30px; font-weight: 700; color: #ffd98a; min-height: 44px; }
.count { margin-top: 8px; font-size: 16px; color: rgba(232,228,245,.6); }
.round { margin-top: 20px; font-size: 13px; color: rgba(232,228,245,.45); }
.controls { margin-top: 26px; display: flex; gap: 12px; }

/* 接地页 */
.ground-step { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 26px 22px; margin: 20px 0; }
.ground-step .num { font-size: 40px; }
.ground-step h3 { font-size: 20px; margin: 10px 0 6px; }
.ground-step p { color: rgba(232,228,245,.75); font-size: 15px; line-height: 1.8; }

/* 冥想/扫描 */
.med-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 80px 20px 40px; }
.med-guide { font-size: 22px; line-height: 1.8; min-height: 90px; max-width: 520px; }
.med-cat { font-size: 84px; margin: 18px 0; animation: breathecat 5s ease-in-out infinite; }
@keyframes breathecat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.progressbar { width: min(420px, 80vw); height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 26px; }
.progressbar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, #ffd98a, #ffb37b); border-radius: 999px; transition: width 1s linear; }
.med-time { margin-top: 12px; font-size: 15px; color: rgba(232,228,245,.6); }

/* 背包页 */
.pack-bag { font-size: 110px; margin: 20px 0; display: inline-block; transition: transform .2s; }
.pack-bag.bump { transform: scale(1.12) rotate(-4deg); }
.pack-list { max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.pack-item { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 16px; font-size: 14.5px; display: flex; align-items: center; gap: 10px; opacity: .85; }
.pack-item.done { opacity: .45; text-decoration: line-through; }

/* 首页：摸猫猫 */
.home-cat-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 82vh; padding: 90px 0 40px; }
.sleep-cat { font-size: 170px; line-height: 1; cursor: pointer; user-select: none; animation: bob 3s ease-in-out infinite; transition: transform .12s; -webkit-tap-highlight-color: transparent; }
.sleep-cat:active { transform: scale(.92); }
.sleep-cat.bounce { animation: bouncecat .6s ease; }
@keyframes bouncecat { 0% { transform: scale(1); } 30% { transform: scale(1.18) rotate(-6deg); } 60% { transform: scale(.94); } 100% { transform: scale(1); } }
.pat-hint { margin-top: 6px; color: rgba(232,228,245,.55); font-size: 14px; letter-spacing: 3px; }

/* 结果页：其他工具（默认隐藏） */
.more-tools { display: none; margin-top: 16px; }

.footer { position: relative; z-index: 2; text-align: center; padding: 20px 12px 30px; font-size: 12px; color: rgba(232,228,245,.35); }
