/* ===== 乘法果园 ===== */
.orchard-page {
  background:
    radial-gradient(120% 50% at 50% -8%, #DCEFD8 0%, rgba(220,239,216,0) 55%),
    linear-gradient(180deg, #E8F5E9 0%, #F0F7FF 40%, #EAF3FF 100%);
}
.orchard-top-bar {
  background: linear-gradient(180deg, rgba(232,245,233,.92) 0%, rgba(232,245,233,.55) 70%, rgba(232,245,233,0) 100%);
}
.orchard-chip { background: linear-gradient(135deg, var(--gc-success), #16A34A); box-shadow: 0 4px 10px rgba(34,197,94,0.32); }
.orchard-counters { display: flex; gap: 6px; flex-shrink: 0; }
.counter-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255,255,255,0.85);
  box-shadow: var(--gc-shadow-sm);
  border: 1px solid var(--gc-border);
}
.counter-pill.stars { color: var(--gc-warning); background: rgba(255,246,224,0.9); border-color: rgba(245,158,11,0.28); }
.counter-pill.coins { color: var(--gc-success); background: rgba(230,249,239,0.9); border-color: rgba(34,197,94,0.24); }

.prompt-card {
  margin: 6px 14px 4px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border-radius: var(--gc-radius-lg);
  background: var(--gc-card);
  box-shadow: var(--gc-shadow-md);
  border: 1px solid rgba(34,197,94,0.12);
  position: relative;
  overflow: hidden;
}
.prompt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--gc-success), #16A34A);
}
.prompt-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E6F9EF, #DCFCE7);
  color: var(--gc-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.prompt-text { font-size: 14px; font-weight: 700; line-height: 1.4; flex: 1; min-width: 0; }
.prompt-sub { font-size: 11px; color: var(--gc-muted-foreground); margin-top: 2px; }

.orchard-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 4px;
}
.strip-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gc-muted-foreground);
}
.strip-item .num { color: var(--gc-success); font-weight: 800; }
.progress-mini {
  flex: 1;
  margin: 0 12px;
  height: 7px;
  border-radius: 999px;
  background: rgba(34,197,94,0.16);
  overflow: hidden;
}
.progress-mini-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4ADE80, var(--gc-success), #16A34A);
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
  position: relative;
  transition: width 0.3s ease;
}
.progress-mini-fill::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: orchard-progress-shimmer 1.5s linear infinite;
}
@keyframes orchard-progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

.orchard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 10px;
  background: linear-gradient(180deg, rgba(220,239,216,.5) 0%, rgba(232,245,233,.2) 100%);
  border-radius: var(--gc-radius-xl);
  border: 1.5px dashed rgba(34,197,94,0.28);
}
.orchard-slot {
  aspect-ratio: 1;
  border-radius: var(--gc-radius-md);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  background: linear-gradient(180deg, transparent 0%, transparent 55%, #D9B98A 55%, #C8A06A 100%);
  user-select: none;
  cursor: pointer;
}
.orchard-slot:active { transform: scale(0.97); }
.tree { position: relative; width: 100%; height: 70%; display: flex; align-items: flex-end; justify-content: center; }
.tree-trunk {
  width: 14px;
  height: 38px;
  background: linear-gradient(180deg, #A86B3C 0%, #8B5A2B 100%);
  border-radius: 4px 4px 6px 6px;
  position: relative;
  z-index: 1;
}
.tree-canopy {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 60px;
  background: radial-gradient(circle at 38% 32%, #6FBF73 0%, #4CAF50 55%, #388E3C 100%);
  border-radius: 50% 50% 48% 48%;
  z-index: 2;
}
.eq-chip {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: var(--gc-success);
  background: rgba(255,255,255,0.92);
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: var(--gc-shadow-sm);
  border: 1px solid rgba(34,197,94,0.3);
  white-space: nowrap;
  z-index: 5;
}
.orchard-slot.current .tree-canopy {
  background: radial-gradient(circle at 38% 32%, #BBD9FF 0%, var(--gc-primary) 55%, #3B6FD9 100%);
  animation: tree-breathe 2s ease-in-out infinite;
}
@keyframes tree-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}
.question-fruit {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFF1B8, var(--gc-warning));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: white;
  z-index: 6;
  animation: fruit-bounce 1.6s ease-in-out infinite;
}
@keyframes fruit-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}
.current-eq {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  font-weight: 800;
  color: var(--gc-primary);
  background: rgba(255,255,255,0.95);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: var(--gc-shadow-sm);
  border: 1px solid rgba(79,140,255,0.35);
  white-space: nowrap;
  z-index: 5;
}

.orchard-question-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFEFB 100%);
  border-radius: 20px;
  box-shadow:
    0 8px 30px rgba(34,197,94,0.08),
    0 2px 8px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.8);
  padding: 18px 16px 16px;
  border: 1px solid rgba(34,197,94,0.12);
  position: relative;
  overflow: hidden;
}
.orchard-question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4ADE80, #22C55E, #16A34A, #4ADE80);
  background-size: 300% 100%;
  animation: orchard-card-accent 4s linear infinite;
}
@keyframes orchard-card-accent {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
.orchard-q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.orchard-q-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #16A34A;
  background: linear-gradient(135deg, #F0FDF4, #DCFCE7);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,0.15);
}
.orchard-q-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 16px;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #F0FDF4 100%);
  border-radius: 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.orchard-q-body::before,
.orchard-q-body::after {
  content: '';
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  opacity: 0.4;
}
.orchard-q-body::before {
  top: -10px; left: -10px;
  background: radial-gradient(circle, rgba(34,197,94,0.25), transparent 70%);
}
.orchard-q-body::after {
  bottom: -10px; right: -10px;
  background: radial-gradient(circle, rgba(74,222,128,0.25), transparent 70%);
}
.orchard-q-eq {
  flex: 1;
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.2;
  color: #1E293B;
  position: relative;
  z-index: 1;
}
.orchard-q-eq .op { color: #16A34A; margin: 0 4px; font-size: 28px; }
.orchard-q-eq .eq { color: #F59E0B; margin: 0 6px; }
.q-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
  color: #16A34A;
  font-size: 24px;
  vertical-align: middle;
  border: 2px dashed rgba(34,197,94,0.4);
  animation: q-bounce 1.5s ease-in-out infinite;
}
@keyframes q-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.orchard-answers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ans-btn {
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 2px solid #E2E8F0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  color: #1E293B;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.ans-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.8) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.ans-btn:active { transform: scale(0.94); }
.ans-btn:active::before { opacity: 1; }
.ans-btn.selected {
  border-color: #22C55E;
  background: linear-gradient(180deg, #F0FDF4 0%, #DCFCE7 100%);
  box-shadow: 0 4px 16px rgba(34,197,94,0.25);
  color: #15803D;
  transform: translateY(-2px);
}
.ans-btn.correct {
  border-color: #22C55E !important;
  background: linear-gradient(180deg, #DCFCE7 0%, #BBF7D0 100%) !important;
  color: #15803D !important;
  box-shadow: 0 4px 16px rgba(34,197,94,0.35) !important;
}
.ans-btn.wrong {
  border-color: #EF4444 !important;
  background: linear-gradient(180deg, #FEE2E2 0%, #FECACA 100%) !important;
  color: #DC2626 !important;
  box-shadow: 0 4px 16px rgba(239,68,68,0.3) !important;
}

.orchard-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(232,245,233,0) 0%, rgba(232,245,233,.95) 25%, #E8F5E9 60%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: var(--gc-container-width);
  margin: 0 auto;
}
.water-btn {
  flex: 1.6;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4ADE80 0%, #22C55E 50%, #16A34A 100%);
  color: white;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34,197,94,0.4);
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}
.water-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}
.water-btn:active { transform: scale(0.97); }
.water-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.water-btn.watering {
  animation: water-btn-pulse 0.6s ease-in-out infinite;
}
.water-btn.ready {
  animation: water-btn-ready 1s ease-in-out infinite;
  background: linear-gradient(135deg, #34D399 0%, #10B981 50%, #059669 100%);
  box-shadow: 0 8px 28px rgba(16,185,129,0.5);
}
@keyframes water-btn-ready {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(16,185,129,0.45); }
  50% { transform: scale(1.04); box-shadow: 0 10px 32px rgba(16,185,129,0.6); }
}
@keyframes water-btn-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); box-shadow: 0 8px 28px rgba(34,197,94,0.55); }
}
.change-btn {
  flex: 1;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
  color: #16A34A;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid #86EFAC;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34,197,94,0.12);
  transition: all 0.15s ease;
}
.change-btn:active { transform: scale(0.95); background: #DCFCE7; }

.orchard-answers .ans-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.orchard-answers .ans-btn.correct {
  animation: orchard-correct-pulse 0.6s ease-out;
}
@keyframes orchard-correct-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(34,197,94,0.3); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.orchard-answers .ans-btn.wrong {
  animation: orchard-wrong-shake 0.5s ease-out;
}
@keyframes orchard-wrong-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

.orchard-float-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px 32px;
  border-radius: 20px;
  font-size: 28px;
  font-weight: 800;
  pointer-events: none;
  z-index: 100;
  animation: orchard-float-feedback 1.2s ease-out forwards;
}
.orchard-float-feedback.correct {
  background: linear-gradient(135deg, #4ADE80, #16A34A);
  color: white;
  box-shadow: 0 10px 40px rgba(34,197,94,0.4);
}
.orchard-float-feedback.wrong {
  background: linear-gradient(135deg, #F87171, #DC2626);
  color: white;
  box-shadow: 0 10px 40px rgba(239,68,68,0.4);
}
@keyframes orchard-float-feedback {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  40% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -55%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(0.9); }
}

.water-droplets {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 20;
}
.water-drop {
  position: absolute;
  width: 10px;
  height: 14px;
  background: linear-gradient(180deg, #60A5FA, #3B82F6);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0;
  animation: water-drop-fall 1s ease-in forwards;
}
.water-drop:nth-child(1) { left: -20px; animation-delay: 0s; }
.water-drop:nth-child(2) { left: 0px; animation-delay: 0.1s; }
.water-drop:nth-child(3) { left: 20px; animation-delay: 0.2s; }
.water-drop:nth-child(4) { left: -10px; animation-delay: 0.15s; }
.water-drop:nth-child(5) { left: 10px; animation-delay: 0.25s; }
@keyframes water-drop-fall {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  20% { opacity: 1; transform: translateY(10px) scale(1); }
  100% { opacity: 0; transform: translateY(60px) scale(0.8); }
}

.orchard-slot.current .tree-canopy {
  animation: tree-wobble 2s ease-in-out infinite;
}
@keyframes tree-wobble {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
.orchard-slot.harvest-anim .tree-canopy {
  animation: tree-harvest 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes tree-harvest {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); filter: brightness(1.2); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.orchard-question-card {
  transition: transform 0.3s ease;
}
.orchard-question-card.new-question {
  animation: orchard-q-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes orchard-q-enter {
  0% { opacity: 0; transform: translateY(15px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== 响应式：平板竖屏（>=768px） ===== */
@media (min-width: 768px) {
  /* 果园浇水按钮加高，便于触控 */
  .water-btn { height: 58px; }
}
