/* ============================================================
   spin-do.css — 魔法动作转盘（Spin & Do）
   依赖 game-common.css 的主题变量与顶部按钮样式
   ============================================================ */

.is-hidden{display:none !important;}

/* ---------- 返回首页 ---------- */
.back-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;flex:0 0 auto;border-radius:12px;
  background:#fff;border:1.5px solid var(--line);color:var(--mut);
  box-shadow:0 3px 0 #F3DDC7;
  transition:transform .12s ease,box-shadow .12s ease,color .12s ease;
}
.back-btn svg{
  width:20px;height:20px;fill:none;stroke:currentColor;
  stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;
}
.back-btn:hover{color:var(--pri-d);}
.back-btn:active{transform:translateY(2px);box-shadow:none;}
.back-btn:focus-visible{outline:3px solid var(--teal);outline-offset:2px;}

/* ---------- 舞台骨架 ---------- */
.spin-stage{
  position:relative;
  display:flex;flex-direction:column;align-items:stretch;
  gap:12px;padding:16px 16px 20px;
}

/* ---------- 星星板 ---------- */
.progress{
  display:flex;justify-content:center;align-items:center;
  gap:5px;flex-wrap:nowrap;min-height:34px;
}
.slot{
  width:clamp(26px,7vw,34px);height:clamp(26px,7vw,34px);
  flex:0 0 auto;border-radius:50%;box-sizing:border-box;
  display:inline-flex;align-items:center;justify-content:center;
  background:#FFF4E2;border:2px dashed #E9CFB0;
  transition:background .2s ease,border-color .2s ease,transform .2s ease;
}
.slot.filled{
  background:radial-gradient(circle at 34% 28%,#FFF3C9,#FFC94A 72%);
  border:2px solid #E0A800;
  box-shadow:0 2px 6px rgba(224,168,0,.28);
  animation:slotPop .42s cubic-bezier(.34,1.56,.64,1) both;
}
.slot svg{
  width:22px;height:22px;max-width:100%;max-height:100%;display:block;
}
@keyframes slotPop{
  0%{transform:scale(.4);opacity:.2;}
  60%{transform:scale(1.18);opacity:1;}
  100%{transform:scale(1);opacity:1;}
}

/* ---------- 转盘与箭头 ---------- */
.wheel-scene{
  position:relative;width:min(100%,380px);margin:0 auto;
  border-radius:24px;overflow:hidden;background:#FFF8EC;
  box-shadow:0 12px 26px rgba(199,91,31,.16);
}
.wheel-scene svg{width:100%;height:auto;display:block;}
#arrow{
  transform-box:view-box;
  transform-origin:180px 170px;
  transition:transform 2.2s cubic-bezier(.2,.8,.2,1);
  will-change:transform;
}

/* ---------- 主按钮 ---------- */
.spin-btn{
  width:100%;min-height:62px;border:0;border-radius:999px;
  background:linear-gradient(180deg,#FFB061,var(--pri) 45%,var(--pri-d));
  color:#fff;font-size:24px;font-weight:900;letter-spacing:2px;
  font-family:inherit;cursor:pointer;
  box-shadow:0 8px 0 #A94A15,0 13px 24px rgba(199,91,31,.28),inset 0 2px 0 rgba(255,255,255,.45);
  transition:transform .14s ease,box-shadow .14s ease,background .18s ease;
}
.spin-btn:hover:not(:disabled){transform:translateY(-2px);}
.spin-btn:active:not(:disabled){transform:translateY(4px);box-shadow:0 3px 0 #A94A15,0 6px 14px rgba(199,91,31,.3);}
.spin-btn:disabled{
  background:linear-gradient(180deg,#F8E8D6,#F1DAC2);
  color:#A89073;cursor:default;
  box-shadow:0 5px 0 #E4CFB8,inset 0 1px 0 #fff;
}
.spin-btn:focus-visible{outline:3px solid var(--teal);outline-offset:4px;}

.primary-btn{
  display:block;margin:0 auto;min-height:56px;padding:0 40px;border:0;border-radius:999px;
  background:linear-gradient(180deg,#FFB061,var(--pri) 45%,var(--pri-d));
  color:#fff;font-size:19px;font-weight:900;letter-spacing:1px;cursor:pointer;
  font-family:inherit;
  box-shadow:0 7px 0 #A94A15,0 12px 22px rgba(199,91,31,.28),inset 0 2px 0 rgba(255,255,255,.45);
  transition:transform .14s ease,box-shadow .14s ease;
}
.primary-btn:active{transform:translateY(4px);box-shadow:0 3px 0 #A94A15,0 6px 14px rgba(199,91,31,.3);}
.primary-btn:focus-visible{outline:3px solid var(--teal);outline-offset:4px;}

/* ---------- 句子卡 ---------- */
.command-card{
  margin-top:2px;text-align:center;
  padding:16px 16px 18px;border-radius:24px;
  background:linear-gradient(180deg,#fff,#FFFBF3);
  border:2px solid var(--line);
  box-shadow:0 10px 24px rgba(199,91,31,.12);
  animation:cardIn .42s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes cardIn{
  0%{opacity:0;transform:translateY(12px) scale(.96);}
  100%{opacity:1;transform:none;}
}
.category-badge{
  display:inline-block;padding:4px 16px;border-radius:999px;
  background:var(--teal);color:#fff;font-size:13px;font-weight:800;
  letter-spacing:2px;box-shadow:0 2px 6px rgba(27,143,130,.22);
}
.category-badge[data-category="action"]{background:#3E8E41;box-shadow:0 2px 6px rgba(62,142,65,.24);}
.category-badge[data-category="body"]{background:#C75B1F;box-shadow:0 2px 6px rgba(199,91,31,.24);}
.category-badge[data-category="dress"]{background:#3F7FB5;box-shadow:0 2px 6px rgba(63,127,181,.24);}
.category-badge[data-category="point"]{background:#D95C72;box-shadow:0 2px 6px rgba(217,92,114,.24);}

.instruction-en{
  margin-top:8px;font-size:clamp(1.7rem,8vw,2.6rem);
  line-height:1.16;font-weight:900;color:var(--pri-d);
  letter-spacing:.2px;text-wrap:balance;overflow-wrap:anywhere;
  text-shadow:0 2px 0 #FFE8CE,0 4px 8px rgba(199,91,31,.08);
}
.instruction-zh{
  display:none;margin-top:5px;font-size:16px;font-weight:800;
  color:var(--ink);line-height:1.5;
}
body.show-zh .instruction-zh{display:block;}

.parent-tip{
  margin-top:12px;padding:10px 14px;border-radius:16px;
  background:linear-gradient(180deg,var(--teal-l),#DFF4F0);
  border:1px solid rgba(27,143,130,.16);
  font-size:13px;line-height:1.6;color:var(--teal);text-align:center;
}
.sticker-btn{
  margin-top:14px;width:100%;min-height:58px;
  background:linear-gradient(180deg,#38B3A4,var(--teal) 50%,#117166);
  box-shadow:0 7px 0 #0D5C54,0 12px 20px rgba(27,143,130,.26),inset 0 2px 0 rgba(255,255,255,.4);
}
.sticker-btn:active{box-shadow:0 3px 0 #0D5C54,0 6px 12px rgba(27,143,130,.28);}

/* ---------- 开始 / 结束面板 ---------- */
.start-panel,.finale{
  position:absolute;inset:10px;z-index:6;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:10px;padding:24px 18px;text-align:center;overflow:auto;
  border-radius:24px;border:2px solid var(--line);
  background:rgba(255,251,245,.97);
  box-shadow:0 18px 38px rgba(74,44,26,.2);
}
.panel-emoji{
  font-size:52px;line-height:1;
  filter:drop-shadow(0 8px 12px rgba(199,91,31,.16));
}
.start-panel h2,.finale h2{
  margin:0;font-size:clamp(1.4rem,5.4vw,1.9rem);
  color:var(--pri-d);line-height:1.25;
}
.start-panel p,.finale p{
  margin:0;max-width:420px;color:var(--mut);
  font-size:14px;font-weight:600;line-height:1.65;
}
.finale-art{width:min(190px,55vw);margin:0 auto;}
.finale-art svg{width:100%;height:auto;display:block;}
.finale-zh{
  display:none;margin-top:-2px;font-size:15px;font-weight:800;color:var(--mut);
}
body.show-zh .finale-zh{display:block;}
.start-panel .primary-btn,.finale .primary-btn{margin-top:6px;}

/* ---------- 底部提示 ---------- */
.foot-note{
  margin:14px auto 0;text-align:center;color:var(--mut);
  font-size:12px;line-height:1.6;max-width:520px;
}

/* ---------- 全屏 ---------- */
body.is-fullscreen .spin-stage{
  justify-content:flex-start;overflow:auto;cursor:default;
  padding-top:14px;
}
body.is-fullscreen .wheel-scene{width:min(100%,clamp(220px,40vh,380px));}
body.is-fullscreen .spin-btn,
body.is-fullscreen .command-card{max-width:760px;width:100%;margin-left:auto;margin-right:auto;}
body.is-fullscreen .foot-note{display:none;}

/* ---------- 响应式 ---------- */
@media (max-width:420px){
  .spin-stage{padding:14px 11px 16px;gap:10px;}
  .progress{gap:4px;min-height:30px;}
  .instruction-en{font-size:clamp(1.55rem,8.2vw,2rem);}
  .start-panel,.finale{inset:8px;padding:18px 12px;}
  .back-btn{width:34px;height:34px;}
  .logo{gap:7px;}
}
@media (max-width:560px){
  .logo .t2{display:none;}
  .logo .title-en{display:none;}
  .logo .t1{white-space:nowrap;}
  .top-actions{gap:5px;}
}
@media (max-width:380px){
  .top{gap:6px;}
  .logo{gap:6px;}
  .logo > svg{width:34px;height:34px;}
  .logo .t1{font-size:13px;}
  .back-btn{width:32px;height:32px;}
  .top-actions{gap:4px;}
  .top-actions .icon-btn{width:38px;min-height:40px;}
}
@media (min-width:720px){
  .wheel-scene{width:min(100%,400px);}
  .instruction-en{font-size:clamp(2.1rem,5vw,2.7rem);}
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion:reduce){
  #arrow{transition:none !important;}
  .slot,.slot.filled,.command-card,.primary-btn,.spin-btn,.back-btn{
    animation:none !important;transition:none !important;
  }
}
