/* ========== 游戏页面样式 ========== */

/* 游戏列表网格 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
}

.game-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.game-card:active {
  transform: scale(0.97);
  box-shadow: var(--shadow);
}

.game-card-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.game-card-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.game-card-name-en {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.game-card-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.game-card-meta .tag {
  font-size: 10px;
}

.game-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card .btn-start {
  width: 100%;
  height: 36px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ---- 游戏详情/游玩页面 ---- */
.game-play-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 90;
  display: none;
  flex-direction: column;
}

.game-play-screen.active {
  display: flex;
}

.game-play-header {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.game-play-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.game-play-back svg {
  width: 22px;
  height: 22px;
}

.game-play-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  margin-right: 36px;
}

.game-play-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 规则展示 */
.game-rules {
  width: 100%;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.game-rules-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}

.game-rules ol {
  padding-left: 20px;
  list-style: decimal;
}

.game-rules li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---- 真心话大冒险 ---- */
.tod-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tod-bottle-area {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-full);
  background: var(--wine-red-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}

.tod-bottle {
  font-size: 72px;
  transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.tod-bottle.spinning {
  animation: spinBottle 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes spinBottle {
  from { transform: rotate(0deg); }
  to { transform: rotate(var(--spin-degrees, 1800deg)); }
}

.tod-btn-spin {
  width: 180px;
  height: 48px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
}

.tod-choice {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.tod-choice-btn {
  width: 140px;
  height: 48px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s;
}

.tod-choice-btn:active {
  transform: scale(0.95);
}

.tod-truth {
  background: var(--gradient);
  color: #fff;
  border: none;
}

.tod-dare {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.tod-result {
  width: 100%;
  padding: 20px;
  background: var(--wine-red-bg);
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 16px;
}

.tod-result-label {
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 8px;
}

.tod-result-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.tod-actions {
  display: flex;
  gap: 12px;
}

.tod-btn-next {
  padding: 10px 32px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.tod-btn-drink {
  padding: 10px 32px;
  background: var(--white);
  color: var(--danger);
  border: 2px solid var(--danger);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

/* ---- 谁是卧底 ---- */
.spy-setup {
  width: 100%;
  margin-bottom: 24px;
}

.spy-setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}

.spy-setup-label {
  font-size: 14px;
  color: var(--text);
}

.spy-setup-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spy-setup-control button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.spy-setup-control .count {
  font-size: 18px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.spy-player-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.spy-player-card {
  padding: 16px;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.spy-player-card.revealed {
  background: var(--white);
  color: var(--text);
  border: 2px solid var(--primary);
}

.spy-player-card .player-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.spy-player-card .player-word {
  font-size: 12px;
  opacity: 0.8;
}

.spy-player-card.revealed .player-word {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  opacity: 1;
}

.spy-btn-start {
  width: 100%;
  height: 48px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* ---- 逛三园 ---- */
.garden-container {
  width: 100%;
  text-align: center;
}

.garden-select {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.garden-select-btn {
  padding: 10px 20px;
  border-radius: 20px;
  border: 2px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  background: var(--white);
  transition: all 0.3s;
}

.garden-select-btn.active {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.garden-timer {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: var(--wine-red-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
}

.garden-timer.warning {
  color: var(--danger);
  background: rgba(244, 67, 54, 0.1);
}

.garden-input-area {
  margin-bottom: 16px;
}

.garden-input-area input {
  width: 200px;
  height: 48px;
  text-align: center;
  font-size: 18px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.garden-submit {
  width: 200px;
  height: 48px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
}

.garden-used-list {
  width: 100%;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: left;
}

.garden-used-title {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.garden-used-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.garden-used-tag {
  padding: 4px 10px;
  background: var(--white);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- 小姐牌 ---- */
.lady-container {
  width: 100%;
  text-align: center;
}

.lady-deck {
  width: 160px;
  height: 220px;
  background: var(--gradient);
  border-radius: var(--radius);
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s;
  position: relative;
}

.lady-deck:active {
  transform: scale(0.95);
}

.lady-deck-text {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.lady-card-face {
  display: none;
  width: 160px;
  height: 220px;
  background: var(--white);
  border: 3px solid var(--primary);
  border-radius: var(--radius);
  margin: 0 auto 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lady-card-face.show {
  display: flex;
  animation: cardFlip 0.6s ease;
}

@keyframes cardFlip {
  0% { transform: rotateY(90deg); opacity: 0; }
  50% { transform: rotateY(-10deg); opacity: 1; }
  100% { transform: rotateY(0); }
}

.lady-card-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.lady-card-suit {
  font-size: 24px;
  margin-bottom: 8px;
}

.lady-rule-text {
  padding: 16px 20px;
  background: var(--wine-red-bg);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
  text-align: center;
}

.lady-drawn {
  width: 100%;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.lady-drawn-title {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  text-align: left;
}

.lady-drawn-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lady-drawn-mini {
  width: 36px;
  height: 48px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* ---- 摇骰子 ---- */
.dice-container {
  width: 100%;
  text-align: center;
}

.dice-player-setup {
  margin-bottom: 24px;
}

.dice-area {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dice-item {
  width: 52px;
  height: 52px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.dice-item.hidden {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

.dice-shake-btn {
  width: 180px;
  height: 48px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 24px;
}

.dice-shake-btn.shaking {
  animation: diceShake 0.5s ease infinite;
}

@keyframes diceShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px) rotate(-5deg); }
  75% { transform: translateX(5px) rotate(5deg); }
}

.dice-call-area {
  width: 100%;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.dice-call-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.dice-call-row select {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 16px;
  background: var(--white);
}

.dice-call-row span {
  font-size: 14px;
  color: var(--text-secondary);
}

.dice-action-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.dice-btn-call {
  padding: 10px 32px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.dice-btn-open {
  padding: 10px 32px;
  background: var(--white);
  color: var(--danger);
  border: 2px solid var(--danger);
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

.dice-history {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
}

.dice-history-title {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.dice-history-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
}

/* 喝酒提示弹窗 */
.drink-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.drink-alert-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  max-width: 280px;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.drink-alert-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.drink-alert-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.drink-alert-btn {
  padding: 10px 40px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}
