* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-2: #1e293b;
  --accent: #22d3ee;
  --accent-2: #a78bfa;
  --danger: #f43f5e;
  --text: #e2e8f0;
  --text-dim: #94a3b8;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.game-container {
  width: 100%;
  max-width: 960px;
}

.game-header {
  text-align: center;
  margin-bottom: 20px;
}

.title {
  font-size: 2rem;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.title-accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat {
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 10px 22px;
  min-width: 100px;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.game-body {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.board-wrapper {
  position: relative;
  flex-shrink: 0;
}

#board {
  display: block;
  background: #0b1220;
  border: 2px solid rgba(34, 211, 238, 0.4);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.15);
  max-width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.overlay.hidden {
  display: none;
}

.overlay-box {
  text-align: center;
  padding: 30px;
}

.overlay-box h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.overlay-box p {
  color: var(--text-dim);
  margin-bottom: 22px;
}

.btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border: none;
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 40px;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 211, 238, 0.4);
}

.side-panel {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-section {
  background: var(--bg-2);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  padding: 16px;
}

.panel-section h3 {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.active-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.active-item.negative {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
}

.active-item .timer {
  font-weight: 700;
  color: var(--accent);
}

.active-item.negative .timer {
  color: var(--danger);
}

.empty-tip {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 8px 0;
}

.item-book {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.item-icon {
  margin-right: 6px;
}

.hint {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 18px;
}

@media (max-width: 720px) {
  .side-panel {
    width: 100%;
  }
}
