/* 猫猫宇宙 · 公共样式（全部自包含，无外部依赖） */
* { 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(160deg, #2b1b3d 0%, #1a1a2e 45%, #16213e 100%);
  color: #f5e9ff;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* 顶部导航 */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: rgba(20, 12, 32, .6); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topnav .home-link {
  font-size: 14px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12); transition: background .2s;
}
.topnav .home-link:hover { background: rgba(255,255,255,.28); }
.topnav .crumb { font-size: 13px; color: rgba(245,233,255,.55); }

/* 页面容器 */
.page { max-width: 1000px; margin: 0 auto; padding: 84px 20px 60px; }
.page h1 { font-size: 30px; margin-bottom: 8px; }
.page .sub { color: rgba(245,233,255,.65); font-size: 15px; margin-bottom: 28px; }
.back-home { display: inline-block; margin-top: 30px; font-size: 14px; padding: 10px 20px; border-radius: 999px; background: rgba(255,170,60,.25); transition: background .2s; }
.back-home:hover { background: rgba(255,170,60,.45); }

/* 卡片网格（主页菜单） */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 22px 18px; cursor: pointer;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-4px); background: rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.card .icon { font-size: 34px; margin-bottom: 10px; display: block; }
.card .name { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card .desc { font-size: 13px; color: rgba(245,233,255,.6); line-height: 1.5; }

/* 页脚 */
.footer { text-align: center; padding: 26px 12px 30px; color: rgba(245,233,255,.4); font-size: 12px; }

/* 🌧️ 小鱼干雨（背景层） */
.rain-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.raindrop { position: absolute; top: -40px; font-size: 20px; animation: fall linear infinite; opacity: 0; }
@keyframes fall { 0% { transform: translateY(-40px) rotate(0); opacity: 0; } 8% { opacity: .85; } 100% { transform: translateY(110vh) rotate(300deg); opacity: 0; } }

/* ✨ 点击爪印 */
.paw { position: fixed; font-size: 26px; pointer-events: none; z-index: 200; animation: pawpop .9s ease-out forwards; }
@keyframes pawpop { 0% { transform: scale(.4) rotate(-20deg); opacity: 1; } 100% { transform: scale(1.4) rotate(25deg); opacity: 0; } }

/* ⏰ 角落时钟 */
.corner-clock {
  position: fixed; right: 14px; bottom: 14px; z-index: 90;
  background: rgba(20,12,32,.7); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 10px 14px; text-align: center; font-size: 12px; color: rgba(245,233,255,.75);
}
.corner-clock .t { font-size: 20px; font-weight: 600; color: #ffd28a; font-variant-numeric: tabular-nums; }

/* 主页 hero */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 60px 20px;
}
.hero .bg { position: absolute; inset: 0; z-index: 0; }
.hero .bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease-in-out; }
.hero .bg img.on { opacity: .5; }
.hero .inner { position: relative; z-index: 2; max-width: 760px; }
.hero .title { font-size: clamp(34px, 7vw, 64px); font-weight: 800; text-shadow: 0 4px 24px rgba(0,0,0,.6); letter-spacing: 2px; }
.hero .title .cursor { display: inline-block; width: 3px; background: #ffd28a; animation: blink .8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero .quote { margin-top: 22px; font-size: 17px; color: rgba(255,235,255,.92); text-shadow: 0 2px 10px rgba(0,0,0,.7); min-height: 26px; }
.hero .scroll-hint { margin-top: 34px; font-size: 13px; color: rgba(255,255,255,.5); animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* 名册页 */
.roster { display: flex; gap: 22px; flex-wrap: wrap; }
.roster .list { flex: 0 0 260px; display: flex; flex-direction: column; gap: 8px; }
.roster .list .item { padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.06); cursor: pointer; font-size: 14px; transition: background .15s; }
.roster .list .item.on { background: rgba(255,170,60,.3); }
.roster .stage { flex: 1 1 380px; min-height: 420px; position: relative; border-radius: 18px; overflow: hidden; background: rgba(0,0,0,.35); }
.roster .stage img { width: 100%; height: 100%; object-fit: cover; }
.roster .stage .bio { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.roster .stage .bio .nm { font-size: 22px; font-weight: 700; }
.roster .stage .bio .ps { font-size: 13px; color: rgba(255,255,255,.8); margin-top: 4px; }

/* 404 */
.e404 { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 20px; }
.e404 .big { font-size: 90px; animation: wig 2.4s ease-in-out infinite; }
@keyframes wig { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.e404 h1 { font-size: 40px; }
.e404 p { color: rgba(245,233,255,.65); }

/* 游戏容器 */
.game-wrap { text-align: center; }
#gameCanvas { background: rgba(0,0,0,.35); border-radius: 18px; max-width: 100%; cursor: none; }
