/* ========== 宝箱界面 ========== */
.chest-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  background: linear-gradient(180deg, #1a1a2e 0%, #2a2a1e 100%);
  gap: 20px;
}

.chest-visual {
  text-align: center;
}

.chest-emoji {
  font-size: 80px;
  animation: float 2s ease-in-out infinite;
  transition: all 0.5s ease;
}

.chest-emoji.opening {
  animation: chestOpen 0.8s ease forwards;
}

.chest-emoji.shine {
  animation: chestShine 1s ease infinite;
}

.chest-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 8px;
}

.chest-lock {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.lock-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.lock-icon.breaking {
  animation: lockBreak 0.5s ease forwards;
}

.lock-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.chest-input {
  margin: 12px 0;
}

.chest-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 10px;
}

.chest-result {
  text-align: center;
  padding: 20px;
  animation: slideUp 0.3s ease;
}

.chest-reward-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.chest-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 215, 0, 0.08);
  border-radius: 10px;
  animation: slideUp 0.3s ease;
}

.chest-reward-item {
  font-size: 15px;
  flex: 1;
}

.chest-dr-btn {
  white-space: nowrap;
  font-size: 12px !important;
  padding: 4px 10px !important;
}

.chest-dr-done {
  font-size: 12px;
  color: var(--hp-green, #4caf50);
  white-space: nowrap;
}

/* 宝箱做题再次获取 */
.chest-dr-quiz {
  text-align: center;
  padding: 12px;
}

.chest-dr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chest-dr-title {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--gold);
}

.chest-dr-progress {
  font-size: 0.9em;
  color: var(--text-dim);
}

.chest-dr-question {
  font-size: 1.6em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
}

.chest-dr-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.chest-dr-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

/* ========== 商店界面 ========== */
.shop-scene {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, #1a1a2e 0%, #1a2a1e 100%);
}

.shop-header {
  text-align: center;
  padding: 20px;
  flex-shrink: 0;
}

.shop-keeper {
  font-size: 56px;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.shop-header h2 {
  font-size: 20px;
  color: var(--gold);
  margin-top: 8px;
}

.shop-greeting {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
}

.shop-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.2s;
}

.shop-item-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.shop-item-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.shop-item-info {
  flex: 1;
}

.shop-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
}

.shop-item-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.shop-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.shop-item-price {
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
}

.shop-item-price.discounted {
  color: var(--success);
}

.shop-item-price .original-price {
  text-decoration: line-through;
  color: var(--text-dim);
  font-size: 12px;
  margin-right: 4px;
}

.btn-buy {
  padding: 6px 14px;
  font-size: 13px;
  background: rgba(74, 144, 217, 0.2);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy:hover {
  background: var(--primary);
  color: white;
}

.btn-buy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-bargain {
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-bargain:hover {
  background: rgba(255, 215, 0, 0.25);
}

.shop-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* ========== 砍价弹窗 ========== */
.bargain-modal {
  text-align: center;
}

.bargain-header {
  margin-bottom: 12px;
}

.bargain-header span {
  font-size: 48px;
}

.bargain-header p {
  font-size: 16px;
  color: var(--text-dim);
  font-style: italic;
}

.bargain-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ========== 隐藏墙壁答题弹窗 ========== */
.hidden-puzzle-modal {
  text-align: center;
  background: linear-gradient(180deg, #1a1a2e 0%, #2a1a2e 100%);
  border: 1px solid rgba(160, 100, 255, 0.3);
}

.hidden-puzzle-header {
  margin-bottom: 16px;
}

.hidden-puzzle-icon {
  font-size: 56px;
  display: block;
  animation: float 2s ease-in-out infinite;
}

.hidden-puzzle-title {
  font-size: 20px;
  font-weight: 700;
  color: #c9a0ff;
  margin-top: 8px;
}

.hidden-puzzle-desc {
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
}

.hidden-puzzle-body {
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(160, 100, 255, 0.15);
  margin-bottom: 16px;
}

.hidden-puzzle-body .question-text {
  font-size: 26px;
  margin-bottom: 16px;
}

.hidden-puzzle-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto;
}

.hidden-choice-btn {
  padding: 12px 8px;
  font-size: 20px;
  font-weight: 700;
  background: rgba(160, 100, 255, 0.12);
  color: var(--text-bright);
  border: 2px solid rgba(160, 100, 255, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hidden-choice-btn:hover {
  background: rgba(160, 100, 255, 0.25);
  border-color: rgba(160, 100, 255, 0.6);
  transform: scale(1.05);
}

.hidden-choice-btn:active {
  transform: scale(0.95);
}

.hidden-choice-btn.correct {
  background: rgba(40, 167, 69, 0.4);
  border-color: var(--success);
  color: #4cff6e;
  animation: correctPulse 0.5s ease;
}

.hidden-choice-btn.wrong {
  background: rgba(220, 53, 69, 0.4);
  border-color: var(--danger);
  color: #ff6b6b;
  animation: wrongShake 0.4s ease;
}

.hidden-choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.hidden-puzzle-input {
  margin: 12px auto 0;
}

.hidden-puzzle-footer {
  display: flex;
  justify-content: center;
}

.hidden-puzzle-footer .btn-sm {
  padding: 8px 20px;
  font-size: 13px;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

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

/* ========== 怪物信息面板（真实之眼） ========== */
.monster-info-modal {
  text-align: center;
  background: linear-gradient(180deg, #1a1a2e 0%, #1e1a2e 100%);
  border: 1px solid rgba(100, 180, 255, 0.3);
  max-width: 300px;
}

.mi-header {
  margin-bottom: 12px;
}

.mi-img {
  margin: 0 auto 8px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mi-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
}

.mi-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.mi-stat {
  font-size: 15px;
  font-weight: 600;
}

.mi-stat span {
  font-variant-numeric: tabular-nums;
}

.mi-stat-hp { color: #ff6b6b; }
.mi-stat-hp span { color: #ff6b6b; }
.mi-stat-atk { color: #ffa94d; }
.mi-stat-atk span { color: #ffa94d; }
.mi-stat-def { color: #74c0fc; }
.mi-stat-def span { color: #74c0fc; }

.mi-divider {
  font-size: 13px;
  color: var(--text-dim);
  margin: 8px 0;
  letter-spacing: 2px;
}

.mi-prediction {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.mi-pred-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.mi-pred-row b {
  color: var(--text-bright);
}

.mi-pred-result {
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 8px;
  font-weight: 600;
}

.mi-pred-win {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #4cff6e;
}

.mi-pred-win b { color: #4cff6e; }

.mi-pred-lose {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #ff6b6b;
}

.mi-pred-lose b { color: #ff6b6b; }

.mi-pred-after {
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.2);
}

.mi-pred-after b { color: #74c0fc; }


