/* 2026-11-15 P4：参考图的版式覆盖层（只放布局与新增组件，原 style.css 保持不动）
   版式：顶栏（左 tab / 右小红书）+ 左栏（标题·步骤·含义卡）+ 右栏（电视框·摇杆·按钮） */

body {
  position: relative;
  justify-content: flex-start !important;
  padding-top: 0 !important;
}

/* 顶栏 */
.tab-bar {
  position: static !important;
  transform: none !important;
  margin: 16px 0 0 24px !important;
  z-index: 20;
}
.xhs-link {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a3c34;
  text-decoration: none;
  padding: 7px 14px;
  border: 1.5px solid rgba(26, 60, 52, 0.28);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
  z-index: 20;
}
.xhs-link:hover {
  background: rgba(26, 60, 52, 0.06);
  border-color: rgba(26, 60, 52, 0.5);
}

/* 主栅格 */
.container {
  display: grid !important;
  grid-template-columns: minmax(260px, 352px) minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  max-width: 1320px;
  width: 100%;
  min-height: auto !important;
  margin: 4px auto 0;
  padding: 0 24px 36px !important;
}
.left-panel {
  width: auto !important;
  align-items: stretch !important;
  text-align: left;
}
.left-panel .title-img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.left-panel .subtitle-img {
  width: 100%;
  max-width: 320px;
  margin: 4px auto 0;
}
.speech-analysis-btn {
  margin: 14px auto 0 !important;
  display: block;
  width: fit-content;
}
.right-panel {
  width: 100% !important;
  align-items: center;
}
.dropdown-row {
  transform: none !important;
  margin-bottom: 10px;
  justify-content: center;
}

/* 电视 / 游戏机框 */
.stage-v2 {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tv-frame {
  position: relative;
  width: 100%;
  border: 8px solid #1a3c34;
  border-radius: 26px;
  background: #fffdf6;
  padding: 12px;
  box-shadow: 0 14px 34px rgba(26, 60, 52, 0.18), inset 0 0 0 2px rgba(26, 60, 52, 0.06);
  box-sizing: border-box;
}
.tv-scanlines {
  position: absolute;
  inset: 12px;
  border-radius: 16px;
  background: repeating-linear-gradient(0deg, rgba(26, 60, 52, 0.035) 0 1px, transparent 1px 4px);
  pointer-events: none;
  z-index: 1;
}
.tv-frame .topic-window {
  width: 100%;
  height: 336px !important;
  margin-top: 0 !important;
  border-radius: 12px;
  box-shadow: inset 0 20px 30px -20px rgba(26, 60, 52, 0.10), inset 0 -20px 30px -20px rgba(26, 60, 52, 0.10);
}
.tv-frame .reel-item {
  font-size: 4.2rem;
}
.tv-frame .reel-center-line {
  width: 86%;
}

/* 摇杆 */
.joystick {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.joy-base {
  position: relative;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px dashed rgba(201, 43, 48, 0.5);
  background: radial-gradient(circle at 50% 78%, rgba(26, 60, 52, 0.10), transparent 72%);
  box-shadow: inset 0 2px 8px rgba(26, 60, 52, 0.08);
}
.joy-arm {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 6px;
  height: 36px;
  margin-left: -3px;
  transform-origin: bottom center;
  transform: rotate(0deg);
  z-index: 2;
}
.joy-arm.spring {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.joy-knob {
  position: absolute;
  top: -15px;
  left: 50%;
  margin-left: -16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e8d8ff, #d4c0f9 50%, #b89ee8);
  border: 2px solid #1a3c34;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 2px 6px rgba(26, 60, 52, 0.2);
}
.joy-knob:active,
.joy-arm.grabbing .joy-knob {
  cursor: grabbing;
}
.joy-knob:focus-visible {
  outline: 2px solid #c92b30;
  outline-offset: 3px;
}
.joy-arm.disabled .joy-knob {
  opacity: 0.5;
  pointer-events: none;
}
.joy-hint {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  line-height: 1.5;
  color: rgba(26, 60, 52, 0.66);
  max-width: 230px;
}
.joy-hint strong {
  color: #1a3c34;
}
.desktop-btn-row {
  margin-top: 16px !important;
}

/* 含义卡（复用原 vocab-definition 的 DOM） */
.vocab-definition {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin-top: 18px !important;
  padding: 14px 16px !important;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(26, 60, 52, 0.25) !important;
  border-radius: 14px !important;
  min-height: 118px;
}
.vocab-definition .meaning-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(26, 60, 52, 0.45);
  margin-bottom: 2px;
}
.vocab-word {
  font-size: 1.35rem !important;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.vocab-def {
  font-size: 0.9rem !important;
  margin-bottom: 8px !important;
}
.vocab-pos {
  margin-bottom: 4px !important;
}
.vocab-definition.is-loading .vocab-def {
  color: rgba(26, 60, 52, 0.45);
}
.vocab-definition.is-empty .vocab-example-label,
.vocab-definition.is-empty .vocab-example,
.vocab-definition.is-empty .vocab-angle-label,
.vocab-definition.is-empty .vocab-angle {
  display: none;
}
.vocab-speak-btn[hidden] {
  display: none;
}

/* 移动端：单列 */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 16px 28px !important;
  }
  .tab-bar {
    margin: 12px auto 0 !important;
    max-width: calc(100vw - 32px);
  }
  .xhs-link {
    position: static;
    display: block;
    width: fit-content;
    margin: 10px auto 0;
  }
  .left-panel {
    text-align: center;
  }
  .left-panel .title-img {
    max-width: 260px;
  }
  .vocab-definition {
    text-align: left;
    min-height: 0;
  }
  .tv-frame {
    border-width: 6px;
    border-radius: 20px;
    padding: 8px;
  }
  .tv-frame .topic-window {
    height: 280px !important;
  }
  .tv-frame .reel-item {
    font-size: 2.6rem;
  }
  .joystick {
    margin-top: 14px;
  }
  .joy-base {
    width: 84px;
    height: 84px;
  }
  .joy-arm {
    height: 30px;
  }
  .joy-knob {
    top: -13px;
    margin-left: -14px;
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .tv-frame .topic-window {
    height: 232px !important;
  }
  .tv-frame .reel-item {
    font-size: 2rem;
  }
  .joy-hint {
    font-size: 0.7rem;
    max-width: 180px;
  }
}

/* body 默认 flex 居中会把顶栏拉回中间 */
body { align-items: stretch !important; }
.tab-bar { align-self: flex-start; }


[hidden] { display: none !important; }


.vocab-word.is-sentence { font-size: 0.98rem !important; font-weight: 600; font-family: 'Inter', sans-serif; line-height: 1.4; }

