/* 摸鱼小游戏 —— 浅色办公风，故意长得像正经工具页 */
* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: linear-gradient(180deg, #e8eef7 0, #f5f6f8 240px) no-repeat, #f5f6f8;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2a24;
  -webkit-tap-highlight-color: transparent;
}

button { touch-action: manipulation; }

.page { max-width: 560px; margin: 0 auto; padding: 16px 14px 28px; }

.header { text-align: center; margin: 10px 0 16px; }

.title { font-size: 30px; font-weight: 800; margin: 0; color: #1e3a5f; }

.subtitle { margin: 8px 0 0; font-size: 14px; color: #5a6b7a; }

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.06);
}

.center { text-align: center; }

.field-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }

.text-input {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  font-size: 17px;
  border: 1.5px solid #c3cedd;
  border-radius: 10px;
  background: #fff;
}

.text-input:focus { outline: none; border-color: #2f6fb2; }

.code-input { text-align: center; letter-spacing: 4px; }

.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  font-size: 17px;
  cursor: pointer;
  padding: 10px 16px;
}

.btn-primary {
  background: linear-gradient(180deg, #3b82c4, #2563a8);
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 14px rgba(37, 99, 168, 0.28);
}

.btn-secondary {
  background: #fff;
  border: 1.5px solid #b6c4d6;
  color: #2563a8;
  font-weight: 600;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row .btn-primary, .btn-row .btn-secondary { width: auto; flex: 1; min-height: 46px; font-size: 15px; }

.game-card { text-align: center; }
.game-emoji { font-size: 40px; }
.game-title { font-size: 22px; margin: 6px 0; }
.game-desc { font-size: 14px; color: #5a6b7a; line-height: 1.6; margin: 0 0 14px; }

.join-row { display: flex; gap: 8px; margin-top: 10px; }
.join-row .text-input { flex: 1; min-height: 52px; }
.join-row .btn-secondary { width: auto; padding: 10px 22px; }

.btn-boss {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border: 1.5px dashed #94a7bd;
  border-radius: 12px;
  background: #eef3f9;
  color: #47617e;
  font-size: 15px;
  cursor: pointer;
}

.tip-text { font-size: 13px; color: #7a8a99; line-height: 1.5; }
.center { text-align: center; }
.footer { text-align: center; font-size: 12px; color: #9aa8b5; padding: 10px; }

.players-line { font-size: 16px; font-weight: 600; line-height: 1.7; }
.status-line { font-size: 16px; margin-top: 6px; color: #33475c; min-height: 24px; }

/* 五子棋棋盘 */
.board-wrap { display: flex; justify-content: center; margin-top: 14px; }
.board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 2px;
  width: min(92vw, 480px);
  background: #e3c893;
  padding: 8px;
  border-radius: 10px;
  border: 2px solid #b98d4f;
}
.cell {
  aspect-ratio: 1;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.cell.black::after, .cell.white::after {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 50%;
}
.cell.black::after { background: radial-gradient(circle at 35% 30%, #555, #000); }
.cell.white::after { background: radial-gradient(circle at 35% 30%, #fff, #cfd4d9); border: 1px solid #aab; }
.cell.last { box-shadow: 0 0 0 2px #d43d2a inset; }

/* 数字炸弹 */
.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef3f9;
  border: 1px solid #c3cedd;
  font-size: 14px;
  margin: 2px;
}
.chip-turn { background: #fde8e0; border-color: #e08a63; font-weight: 700; }
.range-line { font-size: 40px; font-weight: 800; color: #b3372a; margin-top: 10px; }
.guess-row { display: flex; gap: 8px; margin-top: 14px; }
.guess-input { flex: 1; text-align: center; }
.guess-btn { width: auto; padding: 10px 26px; }
.list-title { margin: 0 0 8px; font-size: 17px; }
.history-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 2px;
  border-top: 1px solid #edf1f5;
  font-size: 15px;
}

/* 精灵养成 */
.wallet-line { margin-top: 12px; font-size: 15px; font-weight: 600; line-height: 1.8; }
#btnDaily { margin-top: 10px; }
.starter-grid { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.starter-btn { min-width: 72px; }
.starter-img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.pet-img { border-radius: 18px; object-fit: cover; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.pet-row-img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.starter-btn {
  flex: 1;
  background: #f6f9fc;
  border: 1.5px solid #c3cedd;
  border-radius: 14px;
  padding: 16px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.starter-emoji { font-size: 52px; }
.starter-name { font-size: 17px; font-weight: 700; }
.starter-type { font-size: 13px; color: #5a6b7a; }
.pet-emoji { line-height: 1.1; }
.pet-name { font-size: 22px; font-weight: 800; margin-top: 4px; }
.type-badge {
  font-size: 12px;
  background: #fde8e0;
  color: #b3372a;
  border-radius: 999px;
  padding: 2px 10px;
  vertical-align: middle;
}
.pet-sub { font-size: 13px; color: #5a6b7a; margin: 4px 0 8px; }
.stat-line { font-size: 14px; color: #33475c; margin: 2px 0 8px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.bar-label { width: 52px; font-size: 13px; text-align: right; color: #47617e; }
.bar { flex: 1; height: 12px; background: #e8edf3; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.fill-xp { background: #7c5cd6; }
.fill-hp { background: #3d9970; }
.fill-hunger { background: #e08a2e; }
.fill-mood { background: #e06a9a; }
.bar-num { width: 64px; font-size: 12px; color: #5a6b7a; text-align: left; }
.evolve-btn { margin-top: 10px; }
.pet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-top: 1px solid #edf1f5;
  flex-wrap: wrap;
}
.pet-row-emoji { font-size: 30px; }
.pet-row-info { flex: 1; font-size: 15px; min-width: 130px; }
.mini-btn {
  border: 1.5px solid #b6c4d6;
  background: #fff;
  color: #2563a8;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.mini-btn.danger { color: #b3372a; border-color: #dfa49b; }
.wild-card {
  margin-top: 12px;
  border: 1.5px dashed #e08a2e;
  background: #fff7ec;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
}
.wild-emoji { font-size: 56px; }
.explore-win { font-weight: 700; color: #2c7a4b; }
.explore-lose { font-weight: 700; color: #b3372a; }
.battle-side { min-height: 96px; }
.battle-pet { display: flex; gap: 12px; align-items: center; }
.battle-info { flex: 1; }
.battle-vs { text-align: center; font-weight: 800; color: #94a7bd; margin: 6px 0; font-size: 18px; }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(20, 32, 48, 0.94);
  color: #fff;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 16px;
  z-index: 99;
  max-width: 92vw;
  text-align: center;
  line-height: 1.45;
}

/* 老板键伪装层：Excel 风 */
#bossOverlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  overflow: auto;
  font-family: "Microsoft YaHei", sans-serif;
}
.boss-titlebar {
  background: #217346;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
}
.boss-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #fff; opacity: 0.7; margin-right: 6px; }
.boss-toolbar {
  background: #f3f3f3;
  border-bottom: 1px solid #ddd;
  padding: 8px 14px;
  font-size: 13px;
  color: #333;
}
.boss-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.boss-table th, .boss-table td {
  border: 1px solid #d9d9d9;
  padding: 5px 8px;
  white-space: nowrap;
}
.boss-table thead th { background: #f3f3f3; text-align: center; color: #666; }
.boss-table .rownum, .boss-table td.rownum { background: #f3f3f3; text-align: center; color: #666; width: 36px; }
.boss-status {
  position: sticky;
  bottom: 0;
  background: #217346;
  color: #fff;
  font-size: 12px;
  padding: 6px 14px;
}
