/* ===== 商店页（Tab 切换：金币商店 / 怪兽商店） ===== */
.shop-page {
  padding: 0 12px 110px;
  position: relative;
  overflow-x: hidden;
}

/* ===== 顶部 Tab 切换 ===== */
.shop-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 0 8px;
  position: sticky;
  top: 56px;
  z-index: 20;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.85) 100%);
  backdrop-filter: blur(8px);
}
.shop-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 8px;
  border-radius: 14px;
  border: 2px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.7);
  color: var(--gc-muted-foreground);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.shop-tab.active {
  color: white;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79,140,255,0.28);
  transform: translateY(-1px);
}
.shop-tab[data-tab="coin"].active {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  box-shadow: 0 6px 16px rgba(245,158,11,0.32);
}
.shop-tab[data-tab="monster"].active {
  background: linear-gradient(135deg, #4F8CFF, #60A5FA);
  box-shadow: 0 6px 16px rgba(79,140,255,0.32);
}

/* ===== 面板切换 ===== */
.shop-panel {
  display: none;
  animation: panel-fade-in 0.3s ease;
}
.shop-panel.active {
  display: block;
}
@keyframes panel-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 金币商店：介绍条 ===== */
.coin-shop-intro {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,191,36,0.04));
  border: 1px solid rgba(245,158,11,0.15);
  color: #92400E;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.coin-shop-intro i { color: #F59E0B; flex-shrink: 0; }

/* ===== 金币商店：道具区 ===== */
.coin-shop-section {
  margin-bottom: 16px;
}
.coin-shop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}
.coin-shop-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gc-foreground);
}
.coin-shop-sub {
  font-size: 11px;
  color: var(--gc-muted-foreground);
}
.coin-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 480px) {
  .coin-shop-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 金币商店：道具卡片 ===== */
.coin-shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 10px;
  border-radius: 14px;
  background: var(--gc-card);
  border: 2px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.coin-shop-item.affordable {
  border-color: rgba(245,158,11,0.35);
  box-shadow: 0 4px 12px rgba(245,158,11,0.12);
}
.coin-shop-item.affordable:active {
  transform: scale(0.97);
}
.coin-shop-item.locked {
  opacity: 0.6;
}
.coin-shop-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.coin-shop-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--gc-foreground);
  margin-bottom: 2px;
  line-height: 1.25;
}
.coin-shop-item-desc {
  font-size: 12px;
  color: var(--gc-muted-foreground);
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 30px;
}
.coin-shop-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
  margin-bottom: 6px;
}
.coin-shop-item-price {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 15px;
  font-weight: 800;
  color: #F59E0B;
}
.coin-shop-item-owned {
  font-size: 12px;
  color: var(--gc-muted-foreground);
  background: rgba(0,0,0,0.05);
  padding: 3px 7px;
  border-radius: 6px;
}
.coin-shop-item-buy {
  width: 100%;
  padding: 9px 0;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.coin-shop-item-buy:active {
  transform: scale(0.95);
}
.coin-shop-item-buy.disabled {
  background: rgba(0,0,0,0.1);
  color: var(--gc-muted-foreground);
  cursor: not-allowed;
}

/* ===== 道具栏 ===== */
.inventory-section {
  margin: 16px 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(167,139,250,0.06);
  border: 1px solid rgba(167,139,250,0.15);
}
.inventory-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #6D28D9;
  margin-bottom: 10px;
}
.inventory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inv-item {
  position: relative;
  display: flex;
  align-items: center;
}
.inv-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inv-item-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid white;
}

/* ===== 怪兽商店：模式切换（平均分配 / 怪兽餐厅） ===== */
.monster-modes {
  display: flex;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 4px;
}
.monster-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.7);
  color: var(--gc-muted-foreground);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.monster-mode-btn.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #4F8CFF, #60A5FA);
  box-shadow: 0 4px 12px rgba(79,140,255,0.3);
  transform: translateY(-1px);
}

/* ===== 模式面板切换 ===== */
.monster-mode-panel {
  display: none;
  animation: panel-fade-in 0.3s ease;
}
.monster-mode-panel.active {
  display: block;
}

/* ===== 怪兽餐厅：订单气泡 ===== */
.order-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 12px;
  background: white;
  border: 2px solid #22C55E;
  box-shadow: 0 2px 8px rgba(34,197,94,0.2);
  margin-bottom: 6px;
  position: relative;
  animation: order-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.order-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid white;
}
.order-bubble.done {
  background: #22C55E;
  color: white;
  border-color: #22C55E;
}
.order-bubble.done::after {
  border-top-color: #22C55E;
}
@keyframes order-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.order-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.order-count {
  font-size: 13px;
  font-weight: 800;
  color: #1A2332;
}

/* ===== 怪兽餐厅：怪兽卡片状态 ===== */
.monster-card.rest-monster.done {
  border-color: #22C55E !important;
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(34,197,94,0.02));
}
.monster-card.rest-monster.done .monster-idle {
  animation: monster-happy 0.8s ease-in-out infinite;
}
@keyframes monster-happy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(5deg); }
  75% { transform: translateY(-6px) rotate(-5deg); }
}

/* 怪兽摇头（上餐错误） */
.monster-card.shake {
  animation: monster-shake 0.5s ease-in-out;
}
@keyframes monster-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ===== 怪兽餐厅：进度条 ===== */
.rest-progress {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.15);
}
.rest-progress-text {
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 6px;
  text-align: center;
}
.rest-progress-bar {
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.rest-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22C55E, #4ADE80);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.shop-float-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.float-star {
  position: absolute;
  opacity: 0.08;
  animation: monster-bounce 6s ease-in-out infinite;
}
.float-star.star1 { top: 6%; left: 10%; font-size: 24px; }
.float-star.star2 { top: 20%; right: 8%; font-size: 20px; animation-delay: 1s; animation-duration: 8s; }
.float-star.star3 { top: 55%; left: 5%; font-size: 24px; animation-delay: 2s; animation-duration: 7s; }
.float-star.star4 { top: 75%; right: 6%; font-size: 20px; animation-delay: 0.5s; animation-duration: 9s; }

.shop-top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -16px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gc-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.shop-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-title-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gc-logic);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.shop-title-text { min-width: 0; }
.shop-title-main { font-size: 15px; font-weight: 800; color: var(--gc-foreground); }
.shop-title-sub { font-size: 12px; color: var(--gc-muted-foreground); }

.shop-timer {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-coin-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1px solid rgba(245,158,11,0.3);
  font-size: 14px;
  font-weight: 800;
  color: #92400E;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(245,158,11,0.15);
}
.shop-timer-ring {
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}
.shop-timer-text {
  position: absolute;
  font-size: 13px;
  font-weight: 800;
  color: var(--gc-logic);
}

.shop-scenario {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: var(--gc-radius-lg);
  background: var(--gc-card);
  box-shadow: var(--gc-shadow-md);
  position: relative;
  z-index: 10;
}
.scenario-question {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
.scenario-q-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(167,139,250,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gc-logic);
  flex-shrink: 0;
  margin-top: 2px;
}
.scenario-text { font-size: 16px; font-weight: 700; line-height: 1.6; flex: 1; color: var(--gc-foreground); }
.scenario-text b { color: var(--gc-logic); }
.scenario-hint {
  font-size: 13px;
  color: var(--gc-muted-foreground);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 36px;
}
.scenario-hint svg { color: var(--gc-warning); width: 12px; height: 12px; }
.shop-voice-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #A78BFA, #8B5CF6);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.shop-voice-btn i { width: 14px; height: 14px; }

.candy-display {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: var(--gc-radius-md);
  background: var(--gc-card);
  box-shadow: var(--gc-shadow-sm);
  text-align: center;
  position: relative;
  z-index: 10;
}
@keyframes candy-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(3deg); }
  75% { transform: rotate(-3deg); }
}
.candy-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gc-muted-foreground);
  margin-bottom: 8px;
}
.candy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(167,139,250,0.4) transparent;
}
.candy-row::-webkit-scrollbar { width: 4px; }
.candy-row::-webkit-scrollbar-thumb { background: rgba(167,139,250,0.4); border-radius: 4px; }
.candy-row::-webkit-scrollbar-track { background: transparent; }
.candy {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s, box-shadow 0.2s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.candy:active { transform: scale(0.92); }
.candy.selected {
  transform: scale(1.25);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1), 0 0 0 3px rgba(167,139,250,0.5), 0 4px 12px rgba(167,139,250,0.4);
  z-index: 5;
  position: relative;
}
.candy.used {
  opacity: 0.25;
  pointer-events: none;
  transform: scale(0.75);
  filter: grayscale(0.6);
}

/* 怪兽卡片：可接收糖果时高亮 */
.monster-card.ready {
  border-color: var(--gc-logic) !important;
  border-style: solid !important;
  box-shadow: 0 0 16px rgba(167,139,250,0.35);
  animation: monster-pulse 1.2s ease-in-out infinite;
}
@keyframes monster-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(167,139,250,0.3); }
  50% { transform: scale(1.03); box-shadow: 0 0 20px rgba(167,139,250,0.5); }
}

.drag-hint {
  text-align: center;
  font-size: 13px;
  color: var(--gc-muted-foreground);
  margin-top: 8px;
  margin-bottom: 4px;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.drag-hint i { width: 14px; height: 14px; }

.monsters-area {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 8px;
  padding: 0;
  margin-top: 4px;
  position: relative;
  z-index: 10;
}
.monster-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: var(--gc-radius-lg);
  background: var(--gc-card);
  box-shadow: var(--gc-shadow-sm);
  border: 2px solid var(--gc-success);
  transition: border-color 0.3s, transform 0.15s;
  cursor: pointer;
  min-width: 0;
}
.monster-card.waiting { border: 2px dashed var(--gc-border); }
.monster-card:active { transform: scale(0.97); }
.monster-card.selected {
  border-color: var(--gc-logic);
  box-shadow: 0 0 16px rgba(167,139,250,0.3);
}
.monster-idle {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  animation: monster-bounce 2.5s ease-in-out infinite;
}
.monster-card:nth-child(2) .monster-idle { animation-delay: 0.4s; }
.monster-card:nth-child(3) .monster-idle { animation-delay: 0.8s; }
.monster-card:nth-child(4) .monster-idle { animation-delay: 1.2s; }
.monster-card:nth-child(5) .monster-idle { animation-delay: 1.6s; }

@keyframes monster-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.monster-antenna-stem {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 12px;
  border-radius: 999px;
}
.monster-antenna-ball {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.monster-body {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
}
.monster-eye {
  position: absolute;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1A2332;
}
.monster-eye.left { left: 10px; }
.monster-eye.right { right: 10px; }
.monster-mouth {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  border: 2px solid #1A2332;
  border-top: none;
  border-radius: 0 0 20px 20px;
}
.monster-candies {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4px;
  min-height: 14px;
}
.monster-candies .candy { width: 12px; height: 12px; cursor: default; }
.monster-candies .candy:active { transform: none; }
.monster-question {
  font-size: 16px;
  font-weight: 700;
  color: var(--gc-muted-foreground);
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.monster-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--gc-success);
  text-align: center;
  line-height: 1.25;
}
.monster-card.waiting .monster-status { color: var(--gc-muted-foreground); }

.formula-reveal {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: var(--gc-radius-md);
  background: rgba(167,139,250,0.08);
  border: 1px dashed rgba(167,139,250,0.3);
  text-align: center;
  position: relative;
  z-index: 10;
}
.formula-text { font-size: 16px; font-weight: 800; color: var(--gc-foreground); }
.formula-text .op, .formula-text .eq { margin: 0 4px; }
.formula-text .result { color: var(--gc-logic); }
.formula-sub {
  font-size: 13px;
  color: var(--gc-muted-foreground);
  margin-top: 4px;
}
.formula-sub b { color: var(--gc-logic); }

.shop-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(240,247,255,0) 0%, rgba(240,247,255,.92) 30%, var(--gc-background) 100%);
  max-width: var(--gc-container-width);
  margin: 0 auto;
}
.shop-action-btn {
  flex: 1;
  height: 48px;
  border-radius: var(--gc-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.12s;
}
.shop-action-btn:active { transform: scale(0.97); }
.shop-restart-btn {
  background: var(--gc-card);
  color: var(--gc-primary);
  border: 1.5px solid rgba(79,140,255,0.3);
  box-shadow: var(--gc-shadow-sm);
}
.shop-confirm-btn {
  background: var(--gc-logic);
  color: white;
  box-shadow: 0 4px 14px rgba(167,139,250,0.35);
}
.shop-confirm-btn.success {
  background: var(--gc-success);
  box-shadow: 0 4px 14px rgba(34,197,94,0.35);
}

.shop-float-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 32px;
  border-radius: 20px;
  font-size: 24px;
  font-weight: 800;
  pointer-events: none;
  z-index: 100;
  animation: float-feedback 1.2s ease-out forwards;
}
.shop-float-feedback.correct {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
  box-shadow: 0 10px 40px rgba(34,197,94,0.4);
}
.shop-float-feedback.wrong {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  box-shadow: 0 10px 40px rgba(239,68,68,0.4);
}

/* ===== 响应式：平板竖屏（>=768px） ===== */
@media (min-width: 768px) {
  /* 商店页底部操作按钮加高，便于触控 */
  .shop-action-btn { height: 58px; }
}

/* ===== 金币商店（顶部消费区） ===== */
.coin-shop-section {
  margin: 12px 0 16px;
  background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
  border-radius: var(--gc-radius-md);
  padding: 14px 12px;
  position: relative;
  z-index: 1;
}
.coin-shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.coin-shop-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #92400E;
  font-weight: 700;
  font-size: 17px;
}
.coin-shop-sub {
  font-size: 13px;
  color: #B45309;
}
.coin-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 360px) {
  .coin-shop-grid { grid-template-columns: repeat(2, 1fr); }
}
.coin-shop-item {
  background: white;
  border-radius: 12px;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.coin-shop-item.affordable {
  border-color: rgba(245,158,11,0.4);
  box-shadow: 0 4px 12px rgba(245,158,11,0.12);
}
.coin-shop-item.locked {
  opacity: 0.65;
}
.coin-shop-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}
.coin-shop-item-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--gc-text, #1F2937);
  margin-bottom: 2px;
  line-height: 1.25;
}
.coin-shop-item-desc {
  font-size: 12px;
  color: var(--gc-muted, #9CA3AF);
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 32px;
}
.coin-shop-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
  margin-bottom: 6px;
}
.coin-shop-item-price {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 800;
  color: #F59E0B;
}
.coin-shop-item-owned {
  font-size: 12px;
  color: var(--gc-success, #22C55E);
  font-weight: 700;
}
.coin-shop-item-buy {
  width: 100%;
  padding: 9px 0;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s;
}
.coin-shop-item-buy:active { transform: scale(0.96); }
.coin-shop-item-buy.disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
}

/* ===== 已拥有道具栏 ===== */
.inventory-section {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: white;
  border-radius: 12px;
  border: 1px dashed rgba(79,140,255,0.3);
}
.inventory-head {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gc-primary, #4F8CFF);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}
.inventory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inv-item {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(79,140,255,0.05);
  padding: 5px 8px 5px 5px;
  border-radius: 10px;
  position: relative;
}
.inv-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inv-item-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--gc-text, #1F2937);
  padding-right: 2px;
}

/* ===== 分隔线 ===== */
.shop-divider {
  text-align: center;
  margin: 16px 0 12px;
  position: relative;
}
.shop-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gc-border, #E5E7EB), transparent);
}
.shop-divider-text {
  position: relative;
  background: var(--gc-bg, #F9FAFB);
  padding: 0 12px;
  font-size: 12px;
  color: var(--gc-muted, #9CA3AF);
}

/* ===== 计时器行（与金币商店合并显示） ===== */
.shop-timer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.shop-mode-label {
  font-size: 13px;
  color: var(--gc-muted, #6B7280);
  font-weight: 600;
}

/* ===== 金币商店：模式切换（道具兑换 / 幸运扭蛋机） ===== */
.coin-modes {
  display: flex;
  gap: 6px;
  padding: 8px 0;
  margin-bottom: 4px;
}
.coin-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.7);
  color: var(--gc-muted-foreground);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.coin-mode-btn.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
  transform: translateY(-1px);
}
.coin-mode-panel {
  display: none;
  animation: panel-fade-in 0.3s ease;
}
.coin-mode-panel.active {
  display: block;
}

/* ===== 幸运扭蛋机 ===== */
.gacha-intro {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,191,36,0.04));
  border: 1px solid rgba(245,158,11,0.15);
  color: #92400E;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.gacha-intro i { color: #F59E0B; flex-shrink: 0; }

/* 扭蛋机本体 */
.gacha-machine {
  position: relative;
  width: 200px;
  height: 280px;
  margin: 8px auto 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.gacha-machine:hover {
  transform: scale(1.02);
}
.gacha-machine:active {
  transform: scale(0.98);
}
.gacha-machine.shaking {
  animation: gacha-shake 0.12s ease-in-out infinite;
}
@keyframes gacha-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-3px) rotate(-1deg); }
  75% { transform: translateX(3px) rotate(1deg); }
}
.gacha-dome {
  width: 180px;
  height: 180px;
  border-radius: 50% 50% 12px 12px / 45% 45% 12px 12px;
  background: linear-gradient(180deg, rgba(79,140,255,0.12), rgba(167,139,250,0.08));
  border: 3px solid rgba(79,140,255,0.25);
  border-bottom: none;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.gacha-dome-glass {
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  overflow: hidden;
}
.gacha-egg {
  position: absolute;
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset -2px -3px 4px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.1);
  animation: egg-float 3s ease-in-out infinite;
}
.gacha-egg.egg1 { background: linear-gradient(135deg, #FBBF24, #F59E0B); top: 20%; left: 15%; animation-delay: 0s; }
.gacha-egg.egg2 { background: linear-gradient(135deg, #60A5FA, #4F8CFF); top: 30%; right: 18%; animation-delay: 0.4s; }
.gacha-egg.egg3 { background: linear-gradient(135deg, #A78BFA, #8B5CF6); top: 55%; left: 22%; animation-delay: 0.8s; }
.gacha-egg.egg4 { background: linear-gradient(135deg, #4ADE80, #22C55E); top: 60%; right: 25%; animation-delay: 1.2s; }
.gacha-egg.egg5 { background: linear-gradient(135deg, #F87171, #EF4444); top: 15%; left: 45%; animation-delay: 1.6s; }
@keyframes egg-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}
.gacha-machine.shaking .gacha-egg {
  animation: egg-bounce 0.15s ease-in-out infinite;
}
@keyframes egg-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.gacha-body {
  width: 170px;
  padding: 10px 0 14px;
  background: linear-gradient(135deg, #4F8CFF, #60A5FA);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  margin-top: -6px;
  box-shadow: 0 4px 12px rgba(79,140,255,0.25);
}
.gacha-coin-slot {
  width: 40px;
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.25);
}
.gacha-plate {
  color: white;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.gacha-exit {
  width: 70px;
  height: 24px;
  background: linear-gradient(135deg, #4F8CFF, #60A5FA);
  border-radius: 0 0 12px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
  margin-top: -4px;
}
.gacha-exit-hole {
  width: 44px;
  height: 12px;
  border-radius: 0 0 8px 8px;
  background: rgba(0,0,0,0.3);
}

/* 掉落区 */
.gacha-drop-zone {
  min-height: 90px;
  margin: 8px 0 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(34,197,94,0.04);
  border: 1px dashed rgba(34,197,94,0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.gacha-drop-hint {
  font-size: 12px;
  color: var(--gc-muted-foreground);
  font-weight: 600;
}

/* 掉落的蛋 */
.gacha-drop-egg {
  position: relative;
  width: 64px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-40px) scale(0.5);
}
.gacha-drop-egg.drop-in {
  animation: egg-drop 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes egg-drop {
  0% { opacity: 0; transform: translateY(-40px) scale(0.5); }
  60% { opacity: 1; transform: translateY(6px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.drop-egg-shell {
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  box-shadow: inset -3px -4px 6px rgba(0,0,0,0.12), 0 3px 6px rgba(0,0,0,0.12);
  transition: all 0.3s ease;
  z-index: 2;
}
.gacha-drop-egg.cracked .drop-egg-shell {
  transform: scale(1.3);
  opacity: 0;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 55% 45%, 60% 100%, 0 100%);
}
.drop-egg-crack {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 3;
  opacity: 0;
  background:
    linear-gradient(45deg, transparent 48%, rgba(255,255,255,0.8) 49%, rgba(255,255,255,0.8) 51%, transparent 52%),
    linear-gradient(-30deg, transparent 48%, rgba(255,255,255,0.6) 49%, rgba(255,255,255,0.6) 51%, transparent 52%);
}
.gacha-drop-egg.cracked .drop-egg-crack {
  opacity: 1;
  animation: crack-flash 0.3s ease;
}
@keyframes crack-flash {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}
.drop-egg-reward {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1) 0.15s;
}
.gacha-drop-egg.cracked .drop-egg-reward {
  opacity: 1;
  transform: scale(1);
}
.drop-reward-name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

/* 稀有度光效 */
.gacha-drop-egg.rarity-legend .drop-egg-reward {
  box-shadow: 0 0 16px rgba(245,158,11,0.5);
  border: 2px solid #F59E0B;
}
.gacha-drop-egg.rarity-rare .drop-egg-reward {
  box-shadow: 0 0 12px rgba(167,139,250,0.4);
  border: 2px solid #A78BFA;
}
.gacha-drop-egg.rarity-common .drop-egg-reward {
  border: 2px solid rgba(0,0,0,0.06);
}
.gacha-drop-egg.rarity-legend {
  animation: egg-drop 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards, legend-glow 1.2s ease-in-out infinite 0.5s;
}
@keyframes legend-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(245,158,11,0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(245,158,11,0.7)); }
}

/* 奖池预览 */
.gacha-pool {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: var(--gc-card);
  border: 1px solid rgba(0,0,0,0.06);
}
.gacha-pool-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--gc-foreground);
  margin-bottom: 10px;
}
.gacha-pool-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gacha-pool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.02);
}
.pool-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pool-info { min-width: 0; }
.pool-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--gc-foreground);
  line-height: 1.25;
}
.pool-rarity-label {
  font-size: 12px;
  font-weight: 800;
  margin-top: 2px;
}
.pool-rarity-label.legend { color: #F59E0B; }
.pool-rarity-label.rare { color: #8B5CF6; }
.pool-rarity-label.common { color: var(--gc-muted-foreground); }

/* 操作按钮 */
.gacha-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.gacha-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 14px 8px;
  border-radius: 14px;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.gacha-btn i { width: 22px; height: 22px; }
.gacha-btn span { font-size: 15px; font-weight: 800; }
.gacha-btn .gacha-price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  opacity: 0.95;
}
.gacha-one {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.gacha-ten {
  background: linear-gradient(135deg, #A78BFA, #8B5CF6);
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
  position: relative;
}
.gacha-discount {
  position: absolute;
  top: -8px;
  right: -4px;
  background: #EF4444;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1.5px solid white;
}
.gacha-btn:active { transform: scale(0.96); }
.gacha-btn.disabled {
  filter: grayscale(0.7);
  opacity: 0.55;
  cursor: not-allowed;
}

/* 抽奖记录 */
.gacha-history {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(167,139,250,0.05);
  border: 1px solid rgba(167,139,250,0.12);
}
.gacha-history-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 800;
  color: #6D28D9;
  margin-bottom: 10px;
}
.gacha-clear-btn {
  margin-left: auto;
  border: none;
  background: rgba(239,68,68,0.1);
  color: #EF4444;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.gacha-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gacha-history-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(0,0,0,0.03);
  font-size: 13px;
  font-weight: 700;
}
.gacha-history-item.rarity-legend {
  background: rgba(245,158,11,0.12);
  color: #92400E;
}
.gacha-history-item.rarity-rare {
  background: rgba(167,139,250,0.12);
  color: #6D28D9;
}
.hist-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hist-name { line-height: 1; }

/* ===== 怪兽餐厅：浅粉主题背景 ===== */
.restaurant-themed {
  position: relative;
  padding: 12px;
  margin-top: 8px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,221,235,0.55) 0%, transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(255,228,245,0.45) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(252,231,243,0.6) 0%, transparent 55%),
    linear-gradient(135deg, #FFF5F9 0%, #FFE9F2 100%);
  border: 1px solid rgba(244,114,182,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 8px rgba(244,114,182,0.08);
  overflow: hidden;
}
/* 淡淡的底案：小心心装饰 */
.restaurant-themed::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 28%, rgba(244,114,182,0.07) 1.5px, transparent 2px),
    radial-gradient(circle at 88% 65%, rgba(244,114,182,0.06) 1.5px, transparent 2px),
    radial-gradient(circle at 65% 12%, rgba(236,72,153,0.05) 2px, transparent 2.5px),
    radial-gradient(circle at 25% 75%, rgba(236,72,153,0.04) 1.5px, transparent 2px);
  background-size: 80px 80px, 96px 96px, 112px 112px, 88px 88px;
  pointer-events: none;
  opacity: 0.7;
}
.restaurant-themed > * {
  position: relative;
  z-index: 1;
}

/* 餐厅模式标签条配色调整为粉系 */
.restaurant-themed .shop-mode-label {
  color: #BE185D;
  font-weight: 700;
}
.restaurant-themed .shop-timer-text {
  color: #DB2777;
}
.restaurant-themed .shop-timer-progress,
.restaurant-themed #rest-timer-progress {
  stroke: #EC4899;
}

/* 餐厅问题区配淡粉卡片 */
.restaurant-themed .shop-scenario {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(244,114,182,0.2);
  box-shadow: 0 2px 10px rgba(244,114,182,0.08);
}
.restaurant-themed .scenario-q-icon {
  background: rgba(244,114,182,0.14);
  color: #DB2777;
}
.restaurant-themed .scenario-text b {
  color: #DB2777;
}

/* 餐厅糖果仓库配粉系 */
.restaurant-themed .candy-display {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(244,114,182,0.15);
}
.restaurant-themed .candy-label {
  color: #BE185D;
}

/* 餐厅进度条改粉色 */
.restaurant-themed .rest-progress {
  background: rgba(244,114,182,0.08);
  border: 1px solid rgba(244,114,182,0.18);
}
.restaurant-themed .rest-progress-text {
  color: #BE185D;
}
.restaurant-themed .rest-progress-bar span {
  background: linear-gradient(90deg, #EC4899, #F472B6);
}

/* 餐厅底部按钮配粉系强调 */
.restaurant-themed .shop-confirm-btn {
  background: linear-gradient(135deg, #EC4899, #F472B6);
  box-shadow: 0 4px 12px rgba(236,72,153,0.32);
}

