/**
 * 多臂老鸟机样式文件
 * 黑白线条风格 - 真实老虎机外观
 */

/* ==================== 基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
  min-height: 100vh;
  padding: 20px;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* ==================== 主菜单（封面即一台老虎机） ==================== */
.main-menu {
  max-width: 900px;
  margin: 12px auto 12px;
  padding: 10px 16px 14px;
  text-align: center;
  display: none;
}

.menu-title {
  font-size: 124px;
  font-weight: 900;
  letter-spacing: 12px;
  margin-bottom: 10px;
  color: #000000;
}

.menu-subtitle-en {
  font-size: 39px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #000000;
  margin-bottom: 12px;
}

/* ---- 老虎机机身 ---- */
.menu-slot-machine {
  max-width: 640px;
  margin: 0 auto;
  border: 4px solid #000000;
  border-radius: 18px;
  background: #ffffff;
  padding: 10px 18px 16px;
  box-shadow: 8px 8px 0 #000000;
}

/* 顶部灯饰（交替闪烁） */
.mm-lights {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 2px 0 6px;
}

.mm-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #000000;
  background: #ffffff;
  animation: mmBlink 1.2s infinite;
}

.mm-light:nth-child(even) {
  animation-delay: 0.6s;
}

@keyframes mmBlink {
  0%, 100% { background: #ffffff; }
  50% { background: #000000; }
}

/* ---- 封面滚轮窗口 ---- */
.menu-slot-window {
  border: 3px solid #000000;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 10px;
}

.menu-slot-reels {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.menu-reel {
  --reel-item-height: 190px;
  --reel-spin-distance: -1900px;
  width: 120px;
  height: var(--reel-item-height);
  border: 3px solid #000000;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.menu-reel-strip {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
}

.menu-reel-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--reel-item-height);
  font-size: 96px;
  line-height: 1;
}

.menu-reel.spinning .menu-reel-strip {
  animation: reelSpin 0.5s linear infinite;
}

/* ---- 红球按钮（点击触发滚轮） ---- */
.menu-joystick {
  position: relative;
  width: 150px;
  height: 64px;
  margin: 4px auto 0;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.joystick-ball {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  background: radial-gradient(circle at 35% 30%, #ff8a80 15%, #e53935 55%, #b71c1c 100%);
  border: 3px solid #000000;
  border-radius: 50%;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.2, 2.2, 0.4, 1);
}

/* 点击按压反馈 */
.menu-joystick:active .joystick-ball {
  transform: scale(0.82);
}

.joystick-hint {
  font-size: 15px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 8px;
}

.game-modes-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.mode-card {
  border: 3px solid #000000;
  border-radius: 12px;
  padding: 12px 14px;
  width: auto;
  max-width: 100%;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.mode-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.mode-icon {
  font-size: 28px;
  line-height: 1;
}

.mode-card:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0 #000000;
}

.mode-card-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mode-card-disabled:hover {
  transform: none;
  box-shadow: none;
}

.mode-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 0;
  color: #000000;
}

.mode-desc {
  font-size: 12px;
  color: #666666;
  margin-bottom: 8px;
  line-height: 1.3;
}

.mode-btn {
  padding: 8px 16px;
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-top: auto;
}

.mode-btn:hover {
  background: #ffffff;
  color: #000000;
}

.mode-tag {
  display: inline-block;
  background: #f5f5f5;
  color: #999999;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.btn-secondary {
  padding: 12px 24px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-top: 10px;
}

.btn-secondary:hover {
  background: #f5f5f5;
  box-shadow: 2px 2px 0 #000000;
}

/* ==================== 游戏顶部导航栏 ==================== */
.game-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 15px;
  border: 2px solid #000000;
  border-radius: 8px;
  margin-bottom: 15px;
  background: #f8f8f8;
}

.top-bar-title {
  font-size: 16px;
  font-weight: 700;
  color: #000000;
}

.top-bar-buttons {
  display: flex;
  gap: 10px;
}

.top-bar-submit-btn {
  padding: 6px 16px;
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: none; /* 默认隐藏，猜省份模式时显示 */
}

.top-bar-submit-btn:hover {
  background: #333333;
  box-shadow: 2px 2px 0 #000000;
}

.top-bar-menu-btn {
  padding: 6px 16px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.top-bar-menu-btn:hover {
  background: #f0f0f0;
  box-shadow: 2px 2px 0 #000000;
}

/* ==================== 确认弹窗 ==================== */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.confirm-modal-content {
  background: #ffffff;
  border: 4px solid #000000;
  padding: 30px 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.confirm-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 15px;
}

.confirm-modal-message {
  font-size: 14px;
  color: #666666;
  margin-bottom: 25px;
  line-height: 1.5;
}

.confirm-modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-confirm {
  padding: 10px 24px;
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-confirm:hover {
  background: #333333;
}

.btn-cancel {
  padding: 10px 24px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: #f5f5f5;
  box-shadow: 2px 2px 0 #000000;
}

.modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.mini-menu-btn {
  padding: 4px 8px;
  background: transparent;
  color: #000;
  border: 1px solid #000;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  margin-left: 8px;
}

.mini-menu-btn:hover {
  background: #f5f5f5;
}

/* ==================== 游戏容器 ==================== */
.game-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid #000000;
  padding: 15px;
  border-radius: 12px;
}

/* ==================== 状态栏 ==================== */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border: 2px solid #000000;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  border-radius: 8px;
}

.remaining-draws,
.bird-count {
  display: flex;
  align-items: center;
  gap: 10px;
}

.remaining-draws span,
.bird-count span {
  font-size: 24px;
  font-weight: 700;
}

.remaining-draws span.warning {
  text-decoration: underline;
}

/* ==================== 虎机区域 ==================== */
.machines-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
}

/* ==================== 虎机卡片（真实老虎机形状） ==================== */
.machine-card {
  background: #ffffff;
  border: 3px solid #000000;
  border-radius: 10px;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

/* 老虎机顶部装饰 */
.machine-header {
  background: #f5f5f5;
  color: #000000;
  padding: 10px 12px;
  font-size: 18px;
  text-align: center;
  font-weight: 700;
  border-bottom: 2px solid #000000;
  letter-spacing: 2px;
}

/* 答案选择区（猜省份模式：机器最上方） */
.machine-answer {
  padding: 8px 10px;
  background: #fffbe6;
  border-bottom: 2px solid #000000;
}

.machine-answer-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid #000000;
  border-radius: 6px;
  background: #ffffff;
  color: #000000;
  cursor: pointer;
  outline: none;
}

.machine-answer-select:hover {
  box-shadow: 3px 3px 0 #000000;
}

.machine-answer-select:focus {
  box-shadow: 3px 3px 0 #000000;
}

/* 老虎机灯光装饰 */
.machine-lights {
  display: flex;
  justify-content: center;
  gap: 3px;
  padding: 2px;
  background: #ffffff;
}

.light-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid #000000;
  background: #ffffff;
}

.light-dot.active {
  background: #000000;
}

/* 老虎机主体 */
.machine-body {
  padding: 6px;
}

.machine-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 #000000;
}

/* 当老虎机有展开清单时，禁用 hover 效果，防止闪烁 */
.machine-card.has-expanded,
.machine-card.has-expanded:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* 展开状态下仍保留active样式 */
.machine-card.has-expanded.machine-active {
  border-width: 4px !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5) !important;
}

.machine-card.drawing {
  box-shadow: 0 0 0 4px #000000;
}

.machine-card.drawn .light-dot {
  background: #000000;
}

/* 当前激活的老虎机 - 加粗显示 */
.machine-card.machine-active {
  border-width: 4px;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
}

.machine-card.machine-active .machine-header {
  font-weight: 900;
  background: #e8e8e8;
}

/* ==================== 省份下拉菜单 ==================== */
.province-dropdown {
  position: relative;
  margin-bottom: 8px;
}

.province-input {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #000000;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  background: #f8f8f8;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.province-input:hover {
  background: #f0f0f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.province-input:focus {
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #000000, 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: text;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 2px solid #000000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
  transition: background 0.1s ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: #f5f5f5;
  font-weight: 600;
}

.dropdown-empty {
  color: #999;
  cursor: default;
}

.dropdown-empty:hover {
  background: #ffffff;
  font-weight: normal;
}

.pinyin-hint {
  font-size: 11px;
  opacity: 0.6;
  color: #666;
}

/* ==================== 滚轮窗口（老虎机核心） ==================== */
.slot-window {
  border: 2px solid #000000;
  background: #f8f8f8;
  padding: 8px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

/* 滚轮容器 */
.slot-reels {
  display: flex;
  flex-direction: row;
  gap: 4px;
  justify-content: center;
  align-items: stretch;
}

/* 单个滚轮 */
.slot-reel {
  --reel-item-height: 50px;
  --reel-spin-distance: -500px;
  width: 35px;
  height: var(--reel-item-height);
  border: 2px solid #000000;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 4px;
}

/* 轮内部旋转带 */
.reel-strip {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  transition: transform 0.5s ease-out;
}

/* 轮上的每个鸟标签 */
.reel-item {
  width: 100%;
  height: var(--reel-item-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.reel-item:last-child {
  border-bottom: none;
}

.reel-icon {
  font-size: 22px;
  line-height: 1;
}

/* 滚轮旋转动画 */
.slot-reel.spinning .reel-strip {
  animation: reelSpin 0.6s linear infinite;
}

@keyframes reelSpin {
  0% { transform: translateY(0); }
  100% { transform: translateY(var(--reel-spin-distance)); }
}

/* 滚轮停止动画 */
.slot-reel.stopping .reel-strip {
  animation: none;
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ==================== 抽取按钮 ==================== */
.draw-btn {
  width: 100%;
  padding: 10px 12px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 6px;
}

.draw-btn:hover:not(:disabled) {
  background: #f0f0f0;
}

.draw-btn:disabled {
  background: #e0e0e0;
  color: #999999;
  border-color: #cccccc;
  cursor: not-allowed;
}

/* ==================== 鸟种数显示（虎机底部） ==================== */
.machine-species-count {
  text-align: center;
  padding: 8px;
  background: #f5f5f5;
  color: #000000;
  font-size: 12px;
  border-top: 2px solid #000000;
  height: 28px;
  line-height: 14px;
}

.machine-species-count .count-label {
  font-weight: 500;
}

.machine-species-count .count-value {
  font-weight: 700;
  font-size: 14px;
  margin-left: 4px;
}

/* ==================== 老虎机鸟种清单（下方显示） ==================== */
.machine-bird-list {
  border: 2px solid #000000;
  background: #ffffff;
  padding: 0;
  height: 400px;
  min-height: 400px;
  max-height: 400px;
  overflow: hidden;
  font-size: 13px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
}

/* 标题区域 - 固定在顶部，不参与滚动 */
.machine-bird-list-title {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
  border-bottom: 1px solid #000000;
  padding: 6px 8px;
  cursor: pointer;
  background: #ffffff;
}

/* 展开提示 */
.expand-hint {
  font-size: 10px;
  color: #666;
  font-weight: 400;
}

/* 内容区域 - 可滚动 */
.machine-bird-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 8px;
}

/* 普通状态下的滚动条 */
.machine-bird-items::-webkit-scrollbar {
  width: 6px;
}

.machine-bird-items::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.machine-bird-items::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 3px;
}

/* 清单为空时的占位提示 */
.machine-bird-placeholder {
  color: #999;
  font-size: 10px;
  text-align: center;
  padding-top: 80px;
}

/* 展开后的详细清单 - 固定高度，标题固定 */
.machine-bird-list.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 450px;
  max-width: 90%;
  max-height: 80vh;
  z-index: 1000;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  background: #ffffff;
  overflow: hidden;
  cursor: default;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 12px;
}

/* 展开后的标题区域 - 固定在顶部，不参与滚动 */
.machine-bird-list.expanded .machine-bird-list-title {
  flex-shrink: 0;
  background: #ffffff;
  font-size: 15px;
  margin-bottom: 0;
  padding: 10px 40px 10px 10px;
  border-bottom: 2px solid #000000;
}

/* 展开后的内容区域 - 可滚动 */
.machine-bird-list.expanded .machine-bird-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

/* 明确显示滚动条 */
.machine-bird-list.expanded .machine-bird-items::-webkit-scrollbar {
  width: 10px;
}

.machine-bird-list.expanded .machine-bird-items::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-left: 2px solid #000;
}

.machine-bird-list.expanded .machine-bird-items::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 0;
}

.machine-bird-list.expanded .machine-bird-items::-webkit-scrollbar-thumb:hover {
  background: #333;
}

/* 关闭按钮 */
.machine-bird-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  background: #f0f0f0;
  border-radius: 50%;
  z-index: 10;
}

.machine-bird-close-btn:hover {
  background: #000;
  color: #fff;
}

/* 展开后的提示文字 */
.machine-bird-list-title::after {
  content: ' ▼';
  font-size: 10px;
  color: #666;
}

.machine-bird-list.expanded .machine-bird-list-title::after {
  content: ' ▲';
}

.machine-bird-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 11px;
}

/* 展开后的鸟种条目 */
.machine-bird-list.expanded .machine-bird-item {
  font-size: 14px;
  padding: 8px 10px;
}

.machine-bird-item:last-child {
  border-bottom: none;
}

.machine-bird-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.machine-bird-count {
  font-weight: 700;
}

/* 展开遮罩层 */
.bird-list-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.9);
  z-index: 999;
  display: none;
}

.bird-list-overlay.active {
  display: block;
}

/* ==================== 底部结果区域（当次+加新+总计） ==================== */
.result-area {
  display: flex;
  gap: 12px;
  margin-top: 15px;
}

.result-box {
  border: 2px solid #000000;
  padding: 10px;
  flex: 1;
  min-height: 350px;
  position: relative;
  border-radius: 8px;
}

.result-box-title {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
  border-bottom: 2px solid #000000;
  padding-bottom: 6px;
  cursor: pointer;
}

/* 标题提示可双击展开 */
.result-box-title::after {
  content: ' ▼';
  font-size: 10px;
  color: #666;
}

.result-box.expanded .result-box-title::after {
  content: ' ▲';
}

.result-box-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  overflow-y: auto;
  align-content: flex-start;
}

/* 展开后的结果框 - 固定标题 */
.result-box.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 450px;
  max-width: 90%;
  max-height: 80vh;
  z-index: 1100;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 12px;
}

/* 展开后的标题区域 - 固定在顶部，不参与滚动 */
.result-box.expanded .result-box-title {
  flex-shrink: 0;
  background: #ffffff;
  font-size: 15px;
  margin-bottom: 0;
  padding: 12px 40px 12px 12px;
  border-bottom: 2px solid #000000;
}

/* 展开后的内容区域 - 可滚动 */
.result-box.expanded .result-box-content {
  flex: 1;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
  padding: 12px;
}

/* 结果框滚动条 */
.result-box-content::-webkit-scrollbar {
  width: 8px;
}

.result-box-content::-webkit-scrollbar-track {
  background: #f0f0f0;
}

.result-box-content::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 4px;
}

.result-placeholder {
  color: #666666;
  font-size: 12px;
  width: 100%;
  text-align: center;
  padding-top: 60px;
}

/* 结果框内的鸟种标签 */
.result-box-content .bird-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 4px 8px;
  border: 1px solid #000000;
  font-size: 12px;
  border-radius: 4px;
}

.result-box-content .bird-name {
  font-weight: 500;
}

.result-box-content .bird-count {
  font-weight: 700;
}

/* 加新鸟种特殊样式 */
.bird-item-new {
  background: #fff8e8;
  border-color: #ff9800;
}

/* 结果框关闭按钮 */
.result-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  background: #f0f0f0;
  border-radius: 50%;
  z-index: 10;
}

.result-close-btn:hover {
  background: #000;
  color: #fff;
}

/* ==================== 抽取结果区域（旧版，保留但隐藏） ==================== */
.draw-result {
  border: 2px solid #000000;
  padding: 15px;
  margin-top: 20px;
  display: none;
}

.draw-result h3 {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bird-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.placeholder {
  color: #666666;
  font-size: 14px;
}

.bird-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 4px 8px;
  border: 1px solid #000000;
  font-size: 12px;
}

.bird-name {
  font-weight: 500;
}

.bird-count {
  font-weight: 700;
}

.more-hint {
  color: #666666;
  font-size: 11px;
  margin-top: 5px;
}

/* ==================== 结束弹窗 ==================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.collapsed {
  background: transparent;
  pointer-events: none;
  justify-content: flex-start;
  align-items: flex-start;
}

.modal-content {
  background: #ffffff;
  border: 4px solid #000000;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
  position: relative;
}

.modal.collapsed .modal-content {
  display: none;
  pointer-events: none;
}

/* 折叠按钮 */
.modal-collapse-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  background: #f0f0f0;
  border: 2px solid #000;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.modal-collapse-btn:hover {
  background: #000;
  color: #fff;
}

/* 折叠后的迷你面板 */
.modal-mini {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ffffff;
  border: 3px solid #000000;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  z-index: 1001;
  box-shadow: 4px 4px 0 #000;
}

.mini-score {
  font-size: 14px;
  font-weight: 500;
}

.mini-score strong {
  font-size: 18px;
  color: #000;
}

.mini-expand-btn {
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  background: #f0f0f0;
  border: 2px solid #000;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.mini-expand-btn:hover {
  background: #000;
  color: #fff;
}

.mini-restart-btn {
  padding: 6px 12px;
  background: #000;
  color: #fff;
  border: 2px solid #000;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mini-restart-btn:hover {
  background: #fff;
  color: #000;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.score-display {
  margin-bottom: 20px;
  border: 2px solid #000000;
  padding: 15px;
}

.final-score,
.best-score {
  font-size: 16px;
  color: #000000;
  margin-bottom: 10px;
}

.final-score strong,
.best-score strong {
  font-size: 28px;
  font-weight: 700;
}

.new-record {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bird-list-final {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 10px;
  border: 2px solid #000000;
}

.bird-final-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #000000;
  font-size: 13px;
}

.bird-final-item:last-child {
  border-bottom: none;
}

.btn-primary {
  padding: 15px 30px;
  background: #000000;
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn-primary:hover {
  background: #ffffff;
  color: #000000;
  border: 3px solid #000000;
}

/* ==================== 加载提示 ==================== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #000000;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  margin-top: 15px;
  color: #000000;
  font-size: 14px;
  font-weight: 600;
}

/* ==================== 抽取次数用尽提示 ==================== */
.draws-exhausted-message {
  /* 随文档流排列在状态栏之后，不遮挡提交按钮或省份下拉 */
  position: static;
  margin: 0 0 12px;
  width: 100%;
  text-align: center;
  background: #fff8e8;
  border: 3px solid #ff9800;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #ff6f00;
  z-index: 0;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
  animation: pulseWarning 1s infinite;
}

@keyframes pulseWarning {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* 抽取次数用尽时高亮未选择答案的省份下拉，提示玩家补选 */
.machine-answer.needs-answer .machine-answer-select {
  border-color: #ff9800;
  background: #fff3e0;
  animation: answerHighlight 0.9s ease-in-out infinite;
}

@keyframes answerHighlight {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(255, 152, 0, 0.6); }
}

/* ==================== 猜省份提交确认弹窗 ==================== */
.guess-submit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.guess-submit-modal-content {
  background: #ffffff;
  border: 4px solid #000000;
  padding: 30px 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.guess-submit-title {
  font-size: 22px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
}

.guess-submit-summary {
  border: 2px solid #000000;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.summary-item {
  font-size: 16px;
  color: #000000;
  margin-bottom: 8px;
}

.summary-item strong {
  font-size: 20px;
  font-weight: 700;
  color: #ff6f00;
}

.guess-submit-warning {
  background: #fff8e8;
  border: 2px solid #ff9800;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 6px;
}

.guess-submit-warning p {
  font-size: 14px;
  color: #ff6f00;
  font-weight: 600;
}

.guess-select-province {
  margin-bottom: 25px;
}

.guess-select-province label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 10px;
}

.guess-province-select {
  width: 100%;
  padding: 12px;
  border: 3px solid #000000;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
}

.guess-province-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
}

.guess-submit-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-guess-confirm {
  padding: 12px 30px;
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-guess-confirm:hover {
  background: #333333;
}

.btn-guess-cancel {
  padding: 12px 30px;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-guess-cancel:hover {
  background: #f5f5f5;
  box-shadow: 2px 2px 0 #000000;
}

/* ==================== 猜省份结束弹窗 ==================== */
.guess-end-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.guess-end-modal-content {
  background: #ffffff;
  border: 4px solid #000000;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* 猜省份结束弹窗折叠态：背景透明，隐藏完整内容，仅保留迷你面板 */
.guess-end-modal.collapsed {
  background: transparent;
  pointer-events: none;
  justify-content: flex-start;
  align-items: flex-start;
}

.guess-end-modal.collapsed .guess-end-modal-content {
  display: none;
  pointer-events: none;
}

.guess-end-title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.guess-result-display {
  border: 2px solid #000000;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.guess-result-item {
  font-size: 18px;
  color: #000000;
  margin-bottom: 15px;
}

.guess-result-item strong {
  font-size: 22px;
  font-weight: 700;
}

/* 每台机器判定明细 */
.guess-machine-detail {
  border: 2px solid #000000;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 8px;
  max-height: none;
}

.guess-machine-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 14px;
  color: #000000;
}

.guess-machine-row:last-child {
  margin-bottom: 0;
}

.guess-machine-row.correct {
  background: #e8f5e9;
}

.guess-machine-row.wrong {
  background: #ffebee;
}

.gm-index {
  font-weight: 700;
  white-space: nowrap;
}

.gm-mark {
  font-size: 16px;
}

.gm-answer {
  flex: 1;
}

.gm-province {
  font-weight: 600;
  white-space: nowrap;
}

/* 得分明细 */
.guess-score-breakdown {
  font-size: 14px;
  color: #555555;
  margin-bottom: 10px;
}

.guess-score-display {
  border: 2px solid #000000;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.guess-final-score,
.guess-best-score {
  font-size: 16px;
  color: #000000;
  margin-bottom: 10px;
}

.guess-final-score strong,
.guess-best-score strong {
  font-size: 28px;
  font-weight: 700;
}

.guess-new-record {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ff6f00;
  animation: pulse 1s infinite;
}

.guess-bird-list-final {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 10px;
  border: 2px solid #000000;
  border-radius: 8px;
}

.guess-end-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 600px) {
  body {
    padding: 10px;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
  }

  .main-menu, .menu-slot-machine {
    max-width: 100vw;
  }

  /* 主菜单移动端适配 */
  .main-menu {
    margin: 6px auto 8px;
    padding: 6px 8px 10px;
    width: 100%;
    max-width: none;
  }

  .menu-title {
    font-size: 42px;
    letter-spacing: 4px;
    margin-bottom: 2px;
    width: 100%;
  }

  .menu-subtitle-en {
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 6px;
    width: 100%;
  }

  .menu-slot-machine {
    padding: 6px 10px 10px;
    border-width: 3px;
    box-shadow: 5px 5px 0 #000000;
    width: 100%;
    max-width: none;
  }

  .mm-lights {
    gap: 8px;
    padding: 1px 0 5px;
  }

  .mm-light {
    width: 8px;
    height: 8px;
  }

  .menu-slot-window {
    padding: 6px;
  }

  .menu-slot-reels {
    gap: 8px;
  }

  .menu-reel {
    --reel-item-height: 120px;
    --reel-spin-distance: -1200px;
    width: 82px;
    border-width: 2px;
  }

  .menu-reel-item {
    font-size: 60px;
  }

  .menu-joystick {
    padding: 4px 0;
  }

  .joystick-ball {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
  }

  .joystick-hint {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .game-modes-grid {
    gap: 6px;
  }

  .mode-card {
    padding: 10px 12px;
  }

  .mode-icon {
    font-size: 24px;
  }

  .game-container {
    padding: 12px;
  }

  .status-bar {
    font-size: 14px;
    padding: 10px 15px;
  }

  .remaining-draws span,
  .bird-count span {
    font-size: 18px;
  }

  .machines-grid {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }

  .machine-card {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  .machine-header {
    padding: 6px 2px;
    font-size: 10px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  /* 答案下拉（猜省份模式）窄卡片适配 */
  .machine-answer {
    padding: 4px;
  }

  .machine-answer-select {
    padding: 4px 2px;
    font-size: 9px;
    white-space: nowrap;
  }

  .machine-body {
    padding: 4px;
  }

  .province-input {
    font-size: 9px;
    padding: 3px 4px;
  }

  .slot-window {
    padding: 4px;
    margin-bottom: 6px;
  }

  .slot-reels {
    gap: 3px;
  }

  .slot-reel {
    --reel-item-height: 32px;
    --reel-spin-distance: -320px;
    width: 15px;
    height: var(--reel-item-height);
  }

  .reel-item {
    height: var(--reel-item-height);
  }

  .reel-icon {
    font-size: 12px;
  }

  .draw-btn {
    padding: 6px 2px;
    font-size: 9px;
    white-space: nowrap;
  }

  .machine-species-count {
    padding: 4px 2px;
    font-size: 9px;
    height: 22px;
    line-height: 14px;
    white-space: nowrap;
  }

  .machine-species-count .count-value {
    font-size: 11px;
  }

  .machine-bird-list {
    height: 140px;
    min-height: 140px;
    max-height: 140px;
    font-size: 9px;
    padding: 4px;
  }

  .machine-bird-list-title {
    font-size: 9px;
    padding: 4px 2px;
    white-space: nowrap;
  }

  /* 窄卡片上隐藏"点击展开"提示，只保留标题，避免溢出 */
  .machine-bird-list-title .expand-hint {
    display: none;
  }

  .machine-bird-item {
    font-size: 9px;
    padding: 2px 0;
    white-space: nowrap;
  }

  .result-area {
    flex-direction: column;
    gap: 8px;
  }

  .result-box {
    padding: 8px;
  }

  .result-box-title {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .result-box-content .bird-item {
    font-size: 10px;
    padding: 3px 5px;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-content h2 {
    font-size: 20px;
  }

  .final-score strong,
  .best-score strong {
    font-size: 24px;
  }

  .top-bar-buttons {
    gap: 6px;
  }

  .top-bar-submit-btn,
  .top-bar-menu-btn {
    padding: 5px 12px;
    font-size: 12px;
  }

  .draws-exhausted-message {
    font-size: 14px;
    padding: 10px 12px;
  }

  .guess-submit-modal-content {
    padding: 20px;
  }

  .guess-submit-title {
    font-size: 18px;
  }

  .summary-item {
    font-size: 14px;
  }

  .summary-item strong {
    font-size: 16px;
  }

  .guess-end-modal-content {
    padding: 20px;
  }

  .guess-end-title {
    font-size: 20px;
  }

  .guess-result-item {
    font-size: 14px;
  }

  .guess-result-item strong {
    font-size: 18px;
  }

  /* ===== 结束弹窗紧凑化：尽量一屏显示所有数据 ===== */
  .guess-end-modal-content {
    padding: 14px;
  }

  .guess-end-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .guess-result-display {
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  .guess-result-item {
    font-size: 13px;
    margin-bottom: 4px;
  }

  .guess-result-item strong {
    font-size: 16px;
  }

  .guess-machine-detail {
    padding: 6px;
    margin-bottom: 10px;
  }

  .guess-machine-row {
    padding: 4px 6px;
    font-size: 12px;
    margin-bottom: 2px;
    gap: 6px;
  }

  .guess-score-display {
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  .guess-final-score strong,
  .guess-best-score strong {
    font-size: 20px;
  }

  .guess-score-breakdown {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .guess-bird-list-final {
    max-height: 110px;
    padding: 6px;
    margin-bottom: 10px;
  }

  .guess-bird-list-final .bird-final-item {
    font-size: 11px;
    padding: 3px 6px;
  }

  .guess-end-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .guess-end-buttons .btn-primary,
  .guess-end-buttons .btn-secondary {
    flex: 1 1 auto;
    padding: 9px 10px;
    font-size: 13px;
  }

  /* 经典模式结束弹窗：3 个按钮横向排布 */
  .modal-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .modal-buttons .btn-primary,
  .modal-buttons .btn-secondary {
    flex: 1 1 auto;
    padding: 10px 10px;
    font-size: 13px;
  }
}

/* ==================== 彩蛋弹窗 ==================== */
.easter-egg-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.3);
  font-size: 120px;
  line-height: 1;
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

.easter-egg-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: eggBounce 0.5s ease 3 alternate;
}

@keyframes eggBounce {
  0% { transform: translate(-50%, -50%) scale(1); }
  100% { transform: translate(-50%, -50%) scale(1.15) rotate(5deg); }
}

/* ==================== 加新浮动数字 ==================== */
.floating-new-count {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  font-weight: 900;
  color: #ff6600;
  text-shadow: 2px 2px 0 #000000, -1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  animation: floatUpFade 1.2s ease-out forwards;
}

@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -60%) scale(1.2);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -80%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -160%) scale(0.8);
  }
}