/* ============================================
   廉洁扫雷 - 冠盛企业主题样式
   style.css
   ============================================ */

/* ---------- CSS变量 ---------- */
:root {
  /* 冠盛品牌色系 */
  --blue-main: #004DA7;
  --blue-dark: #003B83;
  --blue-light: #E8F0FE;
  --blue-hover: #1A6FD4;
  --blue-pale: #F0F5FF;
  --gold-main: #F6AC2D;
  --gold-dark: #D18F2A;
  --gold-light: #FFF8E1;
  --gold-pale: #FFFBF0;

  /* 中性色 */
  --ink-black: #231815;
  --ink-light: #555555;
  --ink-faint: #999999;
  --red-warn: #C62828;
  --red-light: #FFEBEE;

  /* 背景/边框 */
  --page-bg: #F5F7FA;
  --card-bg: #FFFFFF;
  --border-color: #E4E8EE;
  --white: #FFFFFF;
  --shadow: rgba(0,40,100,0.08);
  --shadow-strong: rgba(0,40,100,0.15);

  /* 游戏尺寸 */
  --cell-size: 64px;
  --board-gap: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  background-color: var(--page-bg);
  color: var(--ink-black);
  min-height: 100vh;
  overflow-x: auto;
  position: relative;
}

/* ---------- 背景装饰 ---------- */
.bg-decoration {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 冠盛辅助图形 - 圆形元素装饰 */
.bg-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(0,77,167,0.06);
}
.bg-circle-1 { top: -60px; right: -40px; width: 200px; height: 200px; }
.bg-circle-2 { bottom: 10%; left: -80px; width: 160px; height: 160px; border-color: rgba(246,172,45,0.08); }
.bg-circle-3 { top: 40%; right: -50px; width: 120px; height: 120px; border-color: rgba(0,77,167,0.04); }

/* 浮动圆点装饰 */
.floating-dot {
  position: absolute;
  border-radius: 50%;
  animation: floatDot var(--dur, 15s) var(--delay, 0s) ease-in-out infinite;
}
.floating-dot-1 { top: 15%; left: 10%; width: 8px; height: 8px; background: rgba(0,77,167,0.12); }
.floating-dot-2 { top: 60%; right: 15%; width: 6px; height: 6px; background: rgba(246,172,45,0.15); }
.floating-dot-3 { top: 80%; left: 30%; width: 10px; height: 10px; background: rgba(0,77,167,0.08); }

@keyframes floatDot {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
}

/* ---------- 三个面板左对齐容器 ---------- */
.game-content {
  width: fit-content;
  margin: 0 auto;
}

/* ---------- 容器 ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- 顶部标题 ---------- */
.header {
  text-align: center;
  padding: 20px 0 10px;
}

.title {
  font-size: 26px;
  font-weight: 700;
  color: var(--blue-main);
  letter-spacing: 3px;
  position: relative;
  display: inline-block;
}

.title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-main), transparent);
  border-radius: 2px;
}

.title-sub {
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 2px;
}

.subtitle {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 1px;
}

/* ---------- 吉祥物区域 ---------- */
.mascot-area {
  text-align: center;
  margin-bottom: 4px;
}

.mascot-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
  border: 2px solid var(--gold-main);
}

/* ---------- 功能控制区 ---------- */
.controls {
  width: 100%;
  max-width: 400px;
  margin: 8px 0 16px;
}

.difficulty-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.diff-btn {
  padding: 8px 20px;
  border: 2px solid var(--blue-main);
  background: transparent;
  color: var(--blue-main);
  font-size: 15px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: 1px;
}

.diff-btn:hover {
  background: var(--blue-light);
}

.diff-btn.active {
  background: var(--blue-main);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,77,167,0.3);
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 8px 16px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border-color);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-label {
  font-size: 13px;
  color: var(--ink-light);
}

.status-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-main);
  min-width: 30px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(246,172,45,0.3);
}

.status-unit {
  font-size: 12px;
  color: var(--ink-faint);
}

.restart-btn {
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.restart-btn:hover {
  background: var(--blue-light);
  transform: rotate(180deg);
}

.restart-btn:active {
  transform: rotate(360deg);
}

/* ---------- 游戏棋盘 ---------- */
.game-board-wrapper {
  padding: 12px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px var(--shadow), 0 0 0 1px var(--border-color);
  margin-bottom: 16px;
  position: relative;
  border-top: 3px solid var(--gold-main);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* 品牌边框装饰 */
.game-board-wrapper::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid rgba(0,77,167,0.1);
  border-radius: 8px;
  pointer-events: none;
}

.game-board {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 5), var(--cell-size));
  grid-template-rows: repeat(var(--grid-rows, 5), var(--cell-size));
  gap: var(--board-gap);
  user-select: none;
  -webkit-user-select: none;
  justify-content: start;
}

/* ---------- 格子样式 ---------- */
.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  font-family: inherit;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* 未翻开 */
.cell.hidden {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 100%);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.12), 0 1px 3px var(--shadow);
}

.cell.hidden::after {
  content: '?';
  font-size: var(--cell-question-size, 22px);
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  font-style: italic;
}

.cell.hidden:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,77,167,0.25), inset 0 -2px 4px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, var(--blue-main) 0%, var(--blue-hover) 100%);
}

.cell.hidden:active {
  transform: translateY(0);
}

/* 已翻开 - 安全格 */
.cell.revealed {
  background: var(--blue-light);
  box-shadow: inset 0 1px 3px rgba(0,40,100,0.06);
  cursor: default;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
}

.cell.revealed .cell-word {
  font-size: var(--cell-word-size, 13px);
  font-weight: 700;
  color: var(--blue-dark);
  text-align: center;
  line-height: 1.2;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 数字角标 - 显示在成语下方 */
.cell.revealed .cell-number {
  font-size: var(--cell-number-size, 11px);
  font-weight: 700;
  color: var(--blue-main);
  opacity: 0.75;
  line-height: 1;
  text-align: center;
}

/* 数字颜色 */
.cell.revealed .cell-number.n1 { color: #1976D2; opacity: 0.6; }
.cell.revealed .cell-number.n2 { color: var(--blue-main); opacity: 0.6; }
.cell.revealed .cell-number.n3 { color: var(--red-warn); opacity: 0.6; }
.cell.revealed .cell-number.n4 { color: #6A1B9A; opacity: 0.6; }
.cell.revealed .cell-number.n5 { color: #E65100; opacity: 0.6; }

/* 已标记 */
.cell.flagged {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold-main) 100%);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.1), 0 1px 3px var(--shadow);
}

.cell.flagged::after {
  content: '⚠';
  font-size: 24px;
}

/* 踩中地雷 */
.cell.exploded {
  background: var(--red-light) !important;
  box-shadow: inset 0 0 0 2px var(--red-warn), 0 0 12px rgba(198,40,40,0.3);
  flex-direction: column;
  gap: 0;
  animation: shake 0.5s ease;
}

.cell.exploded .cell-word {
  font-size: var(--cell-word-size, 12px);
  font-weight: 700;
  color: var(--red-warn);
  text-align: center;
  line-height: 1.2;
  padding: 2px;
}

/* 游戏结束显示的地雷 */
.cell.mine-revealed {
  background: #F0F0F0;
  flex-direction: column;
  gap: 0;
  cursor: default;
}

.cell.mine-revealed .cell-word {
  font-size: var(--cell-word-size, 11px);
  font-weight: 600;
  color: var(--ink-light);
  text-align: center;
  line-height: 1.2;
  padding: 2px;
}

/* 错误标记 */
.cell.wrong-flag {
  background: #F0F0F0;
  position: relative;
}

.cell.wrong-flag::after {
  content: '✕';
  position: absolute;
  font-size: 28px;
  color: var(--red-warn);
  font-weight: 700;
  z-index: 2;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* ---------- 底部信息区 ---------- */
.info-panel {
  width: 100%;
  max-width: 400px;
}

.knowledge-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 80px;
  transition: all var(--transition);
}

.knowledge-card.active {
  border-color: var(--blue-main);
  box-shadow: 0 2px 12px rgba(0,77,167,0.12);
}

.knowledge-card.warning {
  border-color: var(--red-warn);
  box-shadow: 0 2px 12px rgba(198,40,40,0.12);
}

.knowledge-icon {
  font-size: 28px;
  flex-shrink: 0;
}

/* 吉祥物知识卡片图标 */
.knowledge-mascot {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--blue-pale);
  flex-shrink: 0;
}

.knowledge-content {
  flex: 1;
  min-width: 0;
}

.knowledge-hint {
  font-size: 14px;
  color: var(--ink-faint);
  line-height: 1.6;
}

.knowledge-word {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-main);
  margin-bottom: 4px;
}

.knowledge-word.mine-word {
  color: var(--red-warn);
}

.knowledge-explanation {
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.6;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--ink-light);
  font-size: 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.action-btn:hover {
  border-color: var(--blue-main);
  color: var(--blue-main);
  background: var(--blue-light);
}

/* ---------- 操作规则区域 ---------- */
.operation-rules {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 2px 8px var(--shadow);
  border: 1px solid var(--border-color);
  margin-top: 12px;
}

.rules-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-main);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.rules-group {
  margin-bottom: 8px;
}

.rules-group:last-child {
  margin-bottom: 0;
}

.rules-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-black);
  margin-bottom: 4px;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rules-list li {
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.7;
  padding-left: 12px;
  position: relative;
}

.rules-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--blue-main);
  font-weight: 700;
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,20,60,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--card-bg);
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,20,60,0.2);
  animation: modalIn 0.3s ease;
}

.modal-large {
  max-width: 500px;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 18px;
  color: var(--blue-main);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--ink-faint);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--red-light);
  color: var(--red-warn);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
}

/* ---------- 规则弹窗 ---------- */
.rules-content h3 {
  font-size: 15px;
  color: var(--blue-main);
  margin: 14px 0 6px;
}

.rules-content h3:first-child {
  margin-top: 0;
}

.rules-content h4 {
  font-size: 14px;
  color: var(--blue-dark);
  margin: 12px 0 4px;
  padding-left: 4px;
  border-left: 3px solid var(--gold-main);
}

.rules-content p {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
}

.rules-content .rules-note {
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.6;
  padding: 8px 12px;
  background: var(--blue-pale);
  border-radius: 6px;
  margin: 8px 0;
}

.rules-content .rules-note a {
  color: var(--blue-main);
  text-decoration: none;
  word-break: break-all;
}

.rules-content .rules-note a:hover {
  text-decoration: underline;
}

.rules-content .rules-section {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--gold-pale);
  border-radius: 8px;
  border: 1px solid rgba(246, 172, 45, 0.15);
}

.rules-content ul {
  padding-left: 20px;
  margin: 6px 0;
}

.rules-content li {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.8;
}

/* ---------- 图鉴 ---------- */
.collection-stats {
  text-align: center;
  font-size: 14px;
  color: var(--ink-light);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.collection-item {
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all var(--transition);
}

.collection-item.unlocked {
  background: var(--blue-light);
  border-color: var(--blue-main);
}

.collection-item.locked {
  background: var(--page-bg);
  opacity: 0.5;
}

.collection-item .item-word {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
}

.collection-item.locked .item-word {
  color: var(--ink-faint);
}

.collection-item .item-explanation {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 排行榜 ---------- */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  text-align: center;
  padding: 12px 8px;
  background: var(--blue-light);
  border-radius: var(--radius);
}

.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-main);
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 2px;
}

.leaderboard-list {
  list-style: none;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.lb-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.lb-rank.gold { background: var(--gold-light); color: var(--gold-dark); }
.lb-rank.silver { background: #F5F5F5; color: #757575; }
.lb-rank.bronze { background: #FFF3E0; color: #E65100; }
.lb-rank.normal { background: var(--page-bg); color: var(--ink-faint); }

.lb-info {
  flex: 1;
}

.lb-diff {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-black);
}

.lb-date {
  font-size: 11px;
  color: var(--ink-faint);
}

.lb-time {
  font-size: 11px;
  color: var(--ink-faint);
  text-align: right;
}

.empty-list {
  text-align: center;
  padding: 30px;
  color: var(--ink-faint);
  font-size: 14px;
}

/* ---------- 结果弹窗 ---------- */
.result-modal {
  text-align: center;
}

.result-content {
  padding: 30px 20px;
}

.result-icon {
  font-size: 60px;
  margin-bottom: 12px;
}

/* 吉祥物结果图标 */
.result-mascot {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: contain;
  margin-bottom: 12px;
  background: var(--blue-pale);
  padding: 4px;
  box-shadow: 0 2px 12px var(--shadow);
}

.result-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.result-title.win { color: var(--blue-main); }
.result-title.lose { color: var(--red-warn); }

.result-subtitle {
  font-size: 14px;
  color: var(--ink-light);
  margin-bottom: 20px;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.result-stat {
  text-align: center;
}

.result-stat .rs-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-main);
}

.result-stat .rs-label {
  font-size: 12px;
  color: var(--ink-faint);
}

.result-quote {
  font-size: 13px;
  color: var(--ink-light);
  font-style: italic;
  margin-bottom: 20px;
  padding: 10px;
  background: var(--blue-light);
  border-radius: var(--radius);
  line-height: 1.6;
  border-left: 3px solid var(--blue-main);
}

.result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.result-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.result-btn.primary {
  background: var(--blue-main);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,77,167,0.3);
}

.result-btn.primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.result-btn.secondary {
  background: var(--page-bg);
  color: var(--ink-light);
  border: 1px solid var(--border-color);
}

.result-btn.secondary:hover {
  border-color: var(--blue-main);
  color: var(--blue-main);
}

/* ---------- 警示弹窗 ---------- */
.warning-modal {
  text-align: center;
}

.warning-content {
  padding: 30px 20px;
}

.warning-icon {
  font-size: 50px;
  margin-bottom: 12px;
}

/* 吉祥物警示图标 */
.warning-mascot {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  background: var(--red-light);
  padding: 4px;
}

.warning-word {
  font-size: 22px;
  font-weight: 700;
  color: var(--red-warn);
  margin-bottom: 8px;
}

.warning-explanation {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.7;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--red-light);
  border-radius: var(--radius);
}

.warning-btn {
  padding: 10px 30px;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--red-warn);
  color: var(--white);
  font-family: inherit;
  transition: all var(--transition);
}

.warning-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---------- 响应式 ---------- */
@media (max-width: 400px) {
  :root {
    --cell-size: 56px;
    --board-gap: 3px;
  }
  .title { font-size: 22px; }
  .container { padding: 10px; }
  .header { padding: 10px 0 6px; }
  .header-logo { height: 28px; }
  .mascot-img { width: 50px; height: 50px; }
}

@media (max-width: 340px) {
  :root {
    --cell-size: 50px;
    --board-gap: 3px;
  }
  .title { font-size: 20px; }
  .cell.revealed .cell-word { font-size: 11px; }
  .cell.exploded .cell-word { font-size: 10px; }
  .cell.mine-revealed .cell-word { font-size: 10px; }
}

@media (min-width: 500px) {
  :root {
    --cell-size: 70px;
  }
}

/* ---------- 滚动条美化 ---------- */
.modal-body::-webkit-scrollbar {
  width: 4px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

/* ---------- 返回活动首页按钮 ---------- */
.back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  color: var(--blue-main);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: var(--font);
}
.back-btn:hover {
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.back-btn:active {
  transform: translateY(0);
}
@media (max-width: 480px) {
  .back-btn span { display: none; }
  .back-btn { padding: 8px 12px; }
}

/* ---------- 返回活动首页按钮 ---------- */
.back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 24px;
  color: var(--blue-main);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: var(--font);
}
.back-btn:hover {
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.back-btn:active {
  transform: translateY(0);
}
@media (max-width: 480px) {
  .back-btn span { display: none; }
  .back-btn { padding: 8px 12px; }
}
