/* ======================================================== */
/*  CELESTIAL CARD DECK // IMMERSIVE FULLSCREEN STYLES     */
/*  周天全学科随堂抽卡系统 · 沉浸式全屏样式表                 */
/* ======================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #030712;
  color: #f3f4f6;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* 彻底清除全局文字选中高亮背景色(变蓝)，保证任何浏览器长按都绝不会出现蓝色选区底色 */
::selection {
  background: transparent;
  color: inherit;
}
::-moz-selection {
  background: transparent;
  color: inherit;
}

/* 彻底禁用全局图片、卡牌、按钮和容器的拖拽半透明鬼影 */
img, svg, button, div, a, canvas {
  -webkit-user-drag: none;
}

/* 严格保护 AI 提示词输入框与文本域，确保正常光标定位、打字与文字选择 */
input, textarea, [contenteditable="true"] {
  user-select: text !important;
  -webkit-user-select: text !important;
  -webkit-touch-callout: default !important;
}

input::selection, textarea::selection, [contenteditable="true"]::selection {
  background: rgba(59, 130, 246, 0.45) !important;
  color: #ffffff !important;
}

/* ========================================================= */
/* 0. 宇宙深空背景与环境光晕                                  */
/* ========================================================= */
.deck-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 50% 30%, rgba(30, 58, 138, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(124, 58, 237, 0.18) 0%, transparent 50%),
    #030712;
}

.deck-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

.deck-app {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ========================================================= */
/* 1. 顶部全屏导航抬头                                        */
/* ========================================================= */
.deck-header {
  flex-shrink: 0;
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 15, 29, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.deck-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.deck-brand-logo {
  font-size: 24px;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.6));
}

.deck-brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.deck-brand-text p {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.75);
}

.deck-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.deck-guide-btn:hover {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
  transform: translateY(-1px);
}

.deck-guide-btn.is-active {
  background: rgba(251, 191, 36, 0.28);
  border-color: #f59e0b;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.4);
}

.deck-return-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.deck-return-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.3);
}

/* ========================================================= */
/* 2. 学科与学段统一导航行                                    */
/* ========================================================= */
.subject-nav-wrapper {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 24px;
  background: rgba(6, 11, 20, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.stage-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.stage-switch-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(226, 232, 240, 0.85);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.stage-switch-btn.is-active {
  background: #38bdf8;
  color: #030712;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

.subject-nav-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.subject-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.subject-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(226, 232, 240, 0.8);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.subject-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.subject-tab-btn.is-active {
  background: var(--subject-accent-bg, rgba(56, 189, 248, 0.2));
  color: #ffffff;
  border-color: var(--subject-accent, #38bdf8);
  box-shadow: 0 0 20px var(--subject-accent-glow, rgba(56, 189, 248, 0.35));
}

.subject-tab-btn .tab-icon {
  font-size: 15px;
}

/* ========================================================= */
/* 3. 考查模式工具条                                          */
/* ========================================================= */
.deck-toolbar {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
  background: rgba(4, 8, 16, 0.4);
}

.mode-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mode-pill-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(203, 213, 225, 0.85);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-pill-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mode-pill-btn.is-active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 600;
}

.mode-pill-btn .pill-count {
  font-size: 11px;
  opacity: 0.75;
  margin-left: 4px;
}

.mode-pill-btn.is-empty {
  opacity: 0.45;
}

.pool-counter-badge {
  position: absolute;
  right: 32px;
  font-size: 11.5px;
  color: rgba(148, 163, 184, 0.75);
  letter-spacing: 0.06em;
}

/* ========================================================= */
/* 4. 主抽卡竞技舞台                                          */
/* ========================================================= */
/* ========================================================= */
/* 4. 主抽卡竞技舞台与随堂实体切牌发牌动效                      */
/* ========================================================= */
.deck-main-arena {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 24px;
  min-height: 0;
  perspective: 1800px;
  perspective-origin: 50% 48%;
}

/* 3D 卡牌舞台 (支持牌堆堆叠与凌空飞牌) */
.card-scene {
  width: 100%;
  max-width: 800px;
  height: min(540px, 68vh);
  perspective: 1600px;
  margin-bottom: 20px;
  cursor: pointer;
  position: relative;
  transition: filter 0.3s ease;
  will-change: transform, opacity;
  transform-style: preserve-3d;
}

/* 随堂牌堆物理实体叠层感 (Physical Deck Layers - 2张底牌微错位堆叠) */
.card-scene::before,
.card-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: rgba(10, 18, 38, 0.7);
  border: 1.5px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: -1;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

/* 底层第 1 张牌：微下沉偏左 */
.card-scene::before {
  transform: translate3d(-6px, 8px, -30px) rotate(-1deg);
  opacity: 0.75;
}

/* 底层第 2 张牌：再下沉偏右 */
.card-scene::after {
  transform: translate3d(7px, 15px, -60px) rotate(1.2deg);
  opacity: 0.45;
}

/* 抽卡切牌瞬间，牌堆轻微向两侧弹动洗牌 (Deck Shuffle Ripple) */
.card-scene.is-card-glide-out::before {
  transform: translate3d(-18px, 12px, -35px) rotate(-3.5deg);
  opacity: 0.9;
}

.card-scene.is-card-glide-out::after {
  transform: translate3d(20px, 20px, -70px) rotate(4deg);
  opacity: 0.7;
}

/* 阶段 1: 旧卡顺势滑出牌堆切牌退场 (Card Glide Out ~200ms) */
.card-scene.is-card-glide-out .card-3d-flipper {
  animation: cardGlideOut 0.22s cubic-bezier(0.4, 0, 0.8, 1) forwards;
  pointer-events: none;
}

@keyframes cardGlideOut {
  0% {
    transform: translate3d(0, 0, 0) rotateZ(0deg) rotateY(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(120px, -70px, -180px) rotateZ(8deg) rotateY(16deg) scale(0.82);
    opacity: 0;
  }
}

/* 阶段 2: 新卡自牌堆凌空弧线抛滑入位 (3D Arc Deal & Spring Landing ~520ms) */
.card-scene.is-card-arc-deal .card-3d-flipper {
  animation: cardArcDeal 0.52s cubic-bezier(0.18, 0.9, 0.28, 1) forwards;
  pointer-events: none;
}

@keyframes cardArcDeal {
  0% {
    transform: translate3d(-140px, 90px, -280px) rotateZ(-10deg) rotateY(-28deg) scale(0.72);
    opacity: 0;
  }
  50% {
    transform: translate3d(14px, -20px, 90px) rotateZ(2.8deg) rotateY(6deg) scale(1.04);
    opacity: 1;
  }
  80% {
    transform: translate3d(-3px, 4px, -12px) rotateZ(-0.8deg) rotateY(-1.5deg) scale(0.99);
  }
  100% {
    transform: translate3d(0, 0, 0) rotateZ(0deg) rotateY(0deg) scale(1);
    opacity: 1;
  }
}

/* 动效极速硬件加速优化：飞行切牌期间屏蔽重度着色器，落地静止后无缝呈现 */
.card-scene.is-card-glide-out .card-iridescent-foil,
.card-scene.is-card-arc-deal .card-iridescent-foil {
  opacity: 0 !important;
  visibility: hidden;
}

.card-3d-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1);
  border-radius: 24px;
  transform: scale(var(--touch-press-scale, 1)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  will-change: transform;
}

.card-scene.is-flipped .card-3d-flipper {
  transform: scale(var(--touch-press-scale, 1)) rotateX(var(--tilt-x, 0deg)) rotateY(calc(180deg + var(--tilt-y, 0deg)));
}

/* 触屏/手势交互状态增强：极速跟随与高拟真弹簧释放 */
.card-scene.is-touching {
  --touch-press-scale: 0.985;
}

.card-scene.is-touch-dragging .card-3d-flipper {
  transition: transform 0.04s ease-out !important;
}

.card-scene.is-spring-back .card-3d-flipper {
  transition: transform 0.48s cubic-bezier(0.18, 0.89, 0.32, 1.28) !important;
}

/* 待机全息微光巡航状态 (大屏/触屏无触摸2秒后自动唤醒微光呼吸) */
.card-scene.is-ambient-idle .card-holographic-sheen {
  opacity: 0.95;
  transition: opacity 0.8s ease;
}

.card-scene.is-ambient-idle .card-iridescent-foil {
  opacity: 0.36;
  transition: opacity 0.8s ease;
}

.card-scene.is-ambient-idle .card-face[data-rarity="gold"] .card-iridescent-foil {
  opacity: 0.48;
}

.card-scene.is-ambient-idle .card-face[data-rarity="blackgold"] .card-iridescent-foil {
  opacity: 0.58;
}



/* ========================================================= */
/* 4. 卡牌正反两面共用核心装甲容器                            */
/* ========================================================= */
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  contain: layout style;
  border-radius: 24px;
  padding: 26px 36px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: radial-gradient(130% 120% at 50% 0%, #0d1730 0%, #080e1e 55%, #040710 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 
    0 28px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(56, 189, 248, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.3),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 背景微暗纹：深邃星云与微光氛围，彻底告别生硬方块感 */
.card-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(56, 189, 248, 0.16) 0%, transparent 62%),
    radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 85%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* 顶部纳米物理高光镜面弧 */
.card-glass-specular {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 45%, transparent 100%);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse at 50% 0%, black 65%, transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 65%, transparent 95%);
}

/* 鼠标视差移动高光掠影 */
.card-holographic-sheen {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(circle 380px at var(--shine-x, 50%) var(--shine-y, 30%), rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

/* 4.0.1 典藏级冷烫微雕光学全息镭射 (Optically Etched Prismatic Cold-Foil Shader) */
.card-iridescent-foil {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.22;
  background-image:
    /* 1. 钛金各向异性聚光刃 (Anisotropic Specular Blade) */
    linear-gradient(
      var(--iridescent-angle, 115deg),
      transparent 0%,
      transparent calc(var(--pointer-x-pct, 50%) - 26%),
      rgba(255, 255, 255, 0.04) calc(var(--pointer-x-pct, 50%) - 16%),
      rgba(56, 189, 248, 0.25) calc(var(--pointer-x-pct, 50%) - 7%),
      rgba(255, 255, 255, 0.88) var(--pointer-x-pct, 50%),
      rgba(245, 158, 11, 0.28) calc(var(--pointer-x-pct, 50%) + 7%),
      rgba(255, 255, 255, 0.04) calc(var(--pointer-x-pct, 50%) + 16%),
      transparent calc(var(--pointer-x-pct, 50%) + 26%),
      transparent 100%
    ),
    /* 2. 微棱镜星钻点阵微闪 (Prismatic Starlight Micro-Facet Dots) */
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.2px 1.2px at 48% 65%, rgba(254, 240, 138, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 75% 28%, rgba(186, 230, 253, 0.85), transparent),
    radial-gradient(1.2px 1.2px at 85% 82%, rgba(244, 114, 182, 0.75), transparent),
    /* 3. 纳米光刻干涉光栅纹 (Nanometer Grating Micro-Interference Lines) */
    repeating-linear-gradient(
      calc(var(--iridescent-angle, 115deg) + 55deg),
      transparent 0px,
      transparent 3px,
      rgba(255, 255, 255, 0.045) 3px,
      rgba(255, 255, 255, 0.045) 5px
    );
  background-size: 100% 100%, 75px 75px, 75px 75px, 75px 75px, 75px 75px, 100% 100%;
  background-position: 0 0, 0 0, 35px 25px, 15px 50px, 50px 60px, 0 0;
  transition: opacity 0.3s ease;
}

.card-face[data-rarity="gold"] .card-iridescent-foil {
  opacity: 0.32;
  mix-blend-mode: color-dodge;
  background-image:
    linear-gradient(
      var(--iridescent-angle, 115deg),
      transparent 0%,
      transparent calc(var(--pointer-x-pct, 50%) - 25%),
      rgba(251, 191, 36, 0.12) calc(var(--pointer-x-pct, 50%) - 14%),
      rgba(254, 240, 138, 0.42) calc(var(--pointer-x-pct, 50%) - 5%),
      rgba(255, 255, 255, 0.95) var(--pointer-x-pct, 50%),
      rgba(245, 158, 11, 0.46) calc(var(--pointer-x-pct, 50%) + 5%),
      rgba(251, 191, 36, 0.12) calc(var(--pointer-x-pct, 50%) + 14%),
      transparent calc(var(--pointer-x-pct, 50%) + 25%),
      transparent 100%
    ),
    radial-gradient(1.8px 1.8px at 18% 22%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.5px 1.5px at 52% 68%, rgba(254, 240, 138, 0.9), transparent),
    radial-gradient(1.8px 1.8px at 78% 32%, rgba(253, 224, 71, 0.95), transparent),
    radial-gradient(1.5px 1.5px at 88% 84%, rgba(251, 146, 60, 0.9), transparent),
    repeating-linear-gradient(
      calc(var(--iridescent-angle, 115deg) + 55deg),
      transparent 0px,
      transparent 3px,
      rgba(254, 240, 138, 0.065) 3px,
      rgba(254, 240, 138, 0.065) 5px
    );
}

.card-face[data-rarity="blackgold"] .card-iridescent-foil {
  opacity: 0.40;
  mix-blend-mode: color-dodge;
  background-image:
    linear-gradient(
      var(--iridescent-angle, 115deg),
      transparent 0%,
      transparent calc(var(--pointer-x-pct, 50%) - 25%),
      rgba(192, 132, 252, 0.15) calc(var(--pointer-x-pct, 50%) - 14%),
      rgba(234, 179, 8, 0.45) calc(var(--pointer-x-pct, 50%) - 5%),
      rgba(255, 255, 255, 0.98) var(--pointer-x-pct, 50%),
      rgba(244, 63, 94, 0.42) calc(var(--pointer-x-pct, 50%) + 5%),
      rgba(168, 85, 247, 0.15) calc(var(--pointer-x-pct, 50%) + 14%),
      transparent calc(var(--pointer-x-pct, 50%) + 25%),
      transparent 100%
    ),
    radial-gradient(2px 2px at 15% 25%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.6px 1.6px at 55% 65%, rgba(234, 179, 8, 0.9), transparent),
    radial-gradient(2px 2px at 80% 35%, rgba(192, 132, 252, 0.95), transparent),
    radial-gradient(1.6px 1.6px at 85% 85%, rgba(244, 63, 94, 0.9), transparent),
    repeating-linear-gradient(
      calc(var(--iridescent-angle, 115deg) + 55deg),
      transparent 0px,
      transparent 3px,
      rgba(234, 179, 8, 0.075) 3px,
      rgba(234, 179, 8, 0.075) 5px
    );
}

/* 4.0.2 9大学科专属微观知识暗纹图层与微晶质感 (Subject Knowledge Vector Textures) */
.card-knowledge-texture {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  opacity: 0.38;
  overflow: hidden;
  mix-blend-mode: screen;
  transition: opacity 0.35s ease;
}

.card-face[data-rarity="gold"] .card-knowledge-texture {
  opacity: 0.44;
}

.card-face[data-rarity="blackgold"] .card-knowledge-texture {
  opacity: 0.48;
}

.card-knowledge-texture .knowledge-texture-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 各学科专属深空微晶底衬与色调空间 */
.card-face[data-subject="physics"] {
  background-color: #030712;
  background-image: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.15) 0%, rgba(2, 6, 23, 0.96) 75%);
}

.card-face[data-subject="math"] {
  background-color: #030712;
  background-image: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.14) 0%, rgba(3, 7, 18, 0.96) 75%);
}

.card-face[data-subject="chemistry"] {
  background-color: #021a12;
  background-image: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.16) 0%, rgba(2, 26, 18, 0.96) 75%);
}

.card-face[data-subject="biology"] {
  background-color: #021f11;
  background-image: radial-gradient(circle at 50% 30%, rgba(34, 197, 94, 0.16) 0%, rgba(2, 28, 15, 0.96) 75%);
}

.card-face[data-subject="history"] {
  background-color: #170d03;
  background-image: radial-gradient(circle at 50% 30%, rgba(217, 119, 6, 0.17) 0%, rgba(23, 13, 3, 0.96) 75%);
}

.card-face[data-subject="geography"] {
  background-color: #021526;
  background-image: radial-gradient(circle at 50% 30%, rgba(14, 165, 233, 0.16) 0%, rgba(2, 21, 38, 0.96) 75%);
}

.card-face[data-subject="chinese"] {
  background-color: #1a0808;
  background-image: radial-gradient(circle at 50% 30%, rgba(239, 68, 68, 0.16) 0%, rgba(26, 8, 8, 0.96) 75%);
}

.card-face[data-subject="english"] {
  background-color: #0d0f2b;
  background-image: radial-gradient(circle at 50% 30%, rgba(99, 102, 241, 0.16) 0%, rgba(13, 15, 43, 0.96) 75%);
}

.card-face[data-subject="politics"] {
  background-color: #1f0717;
  background-image: radial-gradient(circle at 50% 30%, rgba(236, 72, 153, 0.16) 0%, rgba(31, 7, 23, 0.96) 75%);
}

/* 4.0.3 待机流金与量子冰蓝浮游微尘 (教学场景禁用以节约 GPU 损耗与保持画面纯净) */
.card-ambient-particles {
  display: none !important;
}

.card-ambient-particles .ambient-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: floatAmbientParticle 5s infinite ease-in-out;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.card-ambient-particles .ap1 { width: 3px; height: 3px; left: 18%; bottom: 10%; animation-delay: 0s; animation-duration: 4.8s; }
.card-ambient-particles .ap2 { width: 2.5px; height: 2.5px; left: 35%; bottom: 15%; animation-delay: 1.4s; animation-duration: 5.6s; }
.card-ambient-particles .ap3 { width: 3.5px; height: 3.5px; left: 62%; bottom: 8%; animation-delay: 2.2s; animation-duration: 6.2s; }
.card-ambient-particles .ap4 { width: 2px; height: 2px; left: 82%; bottom: 20%; animation-delay: 0.8s; animation-duration: 4.4s; }
.card-ambient-particles .ap5 { width: 3px; height: 3px; left: 74%; bottom: 12%; animation-delay: 3.1s; animation-duration: 5.2s; }

.card-face[data-rarity="gold"] .ambient-particle {
  background: #fde047;
  box-shadow: 0 0 8px #f59e0b;
}

.card-face[data-rarity="blackgold"] .ambient-particle {
  background: #fde047;
  box-shadow: 0 0 10px #c084fc;
}

@keyframes floatAmbientParticle {
  0% {
    transform: translateY(0) scale(0.6);
    opacity: 0;
  }
  25% {
    opacity: 0.75;
  }
  75% {
    opacity: 0.55;
  }
  100% {
    transform: translateY(-160px) scale(1.1);
    opacity: 0;
  }
}

/* 卡牌四角精密钛合金装甲切角 */
.card-corner-bracket {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.92;
  transition: all 0.3s ease;
}

.card-corner-bracket--tl {
  top: 8px;
  left: 8px;
  border-top: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-left: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-top-left-radius: 16px;
}

.card-corner-bracket--tr {
  top: 8px;
  right: 8px;
  border-top: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-right: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-top-right-radius: 16px;
}

.card-corner-bracket--bl {
  bottom: 8px;
  left: 8px;
  border-bottom: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-left: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-bottom-left-radius: 16px;
}

.card-corner-bracket--br {
  bottom: 8px;
  right: 8px;
  border-bottom: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-right: 2.2px solid var(--accent-border, rgba(56, 189, 248, 0.85));
  border-bottom-right-radius: 16px;
}

/* 卡面主体内容提升到最顶层 */
.card-inner-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ========================================================= */
/* 4.1 三阶稀有度专属材质光环体系                             */
/* ========================================================= */

/* 💎 普卡 · 概念再现 (量子冰蓝) */
.card-face[data-rarity="common"] {
  --accent-border: rgba(56, 189, 248, 0.85);
  border-color: rgba(56, 189, 248, 0.5);
  background: radial-gradient(130% 120% at 50% 0%, #0d1a33 0%, #071021 55%, #030712 100%);
  box-shadow: 
    0 26px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 35px rgba(56, 189, 248, 0.22),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.card-face[data-rarity="common"]::before {
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(56, 189, 248, 0.2) 0%, transparent 65%),
    radial-gradient(circle at 15% 85%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* 👑 金卡 · 重点推演 (太阳耀斑金辉) */
.card-face[data-rarity="gold"] {
  --accent-border: rgba(251, 191, 36, 0.95);
  border: 1.8px solid rgba(251, 191, 36, 0.75);
  background: radial-gradient(130% 120% at 50% -5%, #221c0e 0%, #14141a 45%, #07080e 100%);
  box-shadow: 
    0 28px 75px -12px rgba(0, 0, 0, 0.9),
    0 0 42px rgba(245, 158, 11, 0.35),
    0 0 18px rgba(251, 191, 36, 0.2),
    inset 0 1px 2px rgba(254, 240, 138, 0.5),
    inset 0 -1px 1px rgba(0, 0, 0, 0.6);
}

.card-face[data-rarity="gold"]::before {
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(251, 191, 36, 0.24) 0%, transparent 65%),
    radial-gradient(circle at 15% 85%, rgba(245, 158, 11, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(217, 119, 6, 0.1) 0%, transparent 50%);
}

/* 🌌 黑金卡 · 压轴探坑 (黑曜石紫金流光) */
.card-face[data-rarity="blackgold"] {
  --accent-border: rgba(234, 179, 8, 1);
  border: 2px solid rgba(234, 179, 8, 0.9);
  background: radial-gradient(130% 120% at 50% -5%, #25142e 0%, #150d1e 45%, #07060d 100%);
  box-shadow: 
    0 32px 85px -10px rgba(0, 0, 0, 0.95),
    0 0 48px rgba(234, 179, 8, 0.45),
    0 0 50px rgba(168, 85, 247, 0.3),
    inset 0 1.5px 2px rgba(254, 240, 138, 0.6);
}

.card-face[data-rarity="blackgold"]::before {
  background-image: 
    radial-gradient(circle at 50% 10%, rgba(234, 179, 8, 0.26) 0%, transparent 62%),
    radial-gradient(circle at 20% 85%, rgba(168, 85, 247, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(234, 179, 8, 0.14) 0%, transparent 50%);
}

/* ========================================================= */
/* 4.2 卡牌正面精装排版                                       */
/* ========================================================= */

/* 顶部信息行 (左右两端严格对齐，禁止任何换行折行) */
.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.card-badges-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.card-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  word-break: keep-all;
  flex-shrink: 0;
  line-height: 1.25;
}

.card-badge--stage {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.3);
  color: #f1f5f9;
}

.card-badge--subject {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.card-badge--rarity {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.card-face[data-rarity="gold"] .card-badge--rarity {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.3) 100%);
  color: #fde047;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.card-face[data-rarity="blackgold"] .card-badge--rarity {
  background: linear-gradient(135deg, #d97706 0%, #7c2d12 100%);
  color: #fef08a;
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* 正面右侧元数据区 (工业序列号 + 考点芯片) */
.card-front-meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.card-serial-code {
  font-family: "SF Mono", Menlo, Consolas, Monaco, monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.55);
  white-space: nowrap !important;
  word-break: keep-all;
  flex-shrink: 0;
}

.card-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  max-width: 220px;
  white-space: nowrap !important;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  line-height: 1.25;
}

.card-source-chip .source-pin {
  font-size: 11px;
  opacity: 0.85;
  flex-shrink: 0;
}

/* 考点标题与维度指示区 */
.card-title-container {
  text-align: center;
  margin: 10px 0 8px;
}

.card-category-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 8px;
}

.card-face[data-rarity="gold"] .card-category-indicator {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.card-face[data-rarity="blackgold"] .card-category-indicator {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
}

.indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.card-face[data-rarity="gold"] .indicator-dot {
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
}

.card-face[data-rarity="blackgold"] .indicator-dot {
  background: #fde047;
  box-shadow: 0 0 8px #fde047;
}

.indicator-text {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #e2e8f0;
}

.card-front-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  line-height: 1.35;
  margin-bottom: 8px;
}

.card-face[data-rarity="gold"] .card-front-title {
  background: linear-gradient(180deg, #ffffff 30%, #fef08a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-face[data-rarity="blackgold"] .card-front-title {
  background: linear-gradient(180deg, #fffbeb 20%, #fde047 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 分割线与学科动态全息图腾微雕 (Holographic Subject Crest) */
.card-title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 12px;
  max-width: 360px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.divider-sparkle {
  font-size: 10px;
  color: rgba(56, 189, 248, 0.75);
}

.card-face[data-rarity="gold"] .divider-sparkle {
  color: rgba(251, 191, 36, 0.85);
}

/* 4.2.1 学科动态全息图腾光翼 (Subject Holographic Glyph Crest) */
.card-glyph-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 2px auto 8px;
  max-width: 300px;
  position: relative;
  z-index: 4;
}

.crest-fin {
  flex: 1;
  height: 1px;
  position: relative;
  opacity: 0.45;
}

.crest-fin--left {
  background: linear-gradient(90deg, transparent 0%, var(--glyph-color, #38bdf8) 100%);
}

.crest-fin--right {
  background: linear-gradient(90deg, var(--glyph-color, #38bdf8) 0%, transparent 100%);
}

.crest-emblem {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.95) 0%, rgba(3, 7, 18, 0.9) 100%);
  border: 1.2px solid var(--glyph-color, rgba(56, 189, 248, 0.65));
  box-shadow: 
    0 0 12px var(--glyph-color, rgba(56, 189, 248, 0.4)),
    inset 0 0 8px var(--glyph-color, rgba(56, 189, 248, 0.25));
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.crest-emblem:hover {
  transform: scale(1.12) rotate(12deg);
  box-shadow: 0 0 20px var(--glyph-color, rgba(56, 189, 248, 0.7));
}

.subject-glyph-svg {
  width: 18px;
  height: 18px;
  color: var(--glyph-color, #38bdf8);
  filter: drop-shadow(0 0 4px var(--glyph-color, rgba(56, 189, 248, 0.6)));
  display: block;
}

/* 核心设问高精透晶石视窗 (Obsidian Question Console) */
.card-front-question-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(8, 16, 32, 0.75) 0%, rgba(4, 9, 20, 0.88) 100%);
  border: 1.2px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 16px 24px;
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
}

.question-accent-bar {
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #38bdf8 0%, rgba(56, 189, 248, 0.15) 100%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.card-face[data-rarity="gold"] .question-accent-bar {
  background: linear-gradient(180deg, #f59e0b 0%, rgba(245, 158, 11, 0.15) 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.card-face[data-rarity="blackgold"] .question-accent-bar {
  background: linear-gradient(180deg, #eab308 0%, #a855f7 100%);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.6);
}

/* 设问标题栏与考频五星指数 */
.question-header-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}

.question-tag-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  white-space: nowrap !important;
  text-transform: uppercase;
}

.question-tag-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap !important;
}

.exam-star-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #64748b;
  text-transform: uppercase;
}

.exam-stars {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.card-face[data-rarity="gold"] .exam-stars {
  color: #fde047;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.card-face[data-rarity="blackgold"] .exam-stars {
  color: #fde047;
  text-shadow: 0 0 12px rgba(234, 179, 8, 0.7);
}

.card-front-question {
  font-size: 16.5px;
  line-height: 1.8;
  color: #f8fafc;
  font-weight: 500;
  letter-spacing: 0.025em;
  text-align: left;
}

/* 破题探针线索区 (Clue Chips) */
.card-front-clues-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.clues-header-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.06em;
}

.card-front-clues {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-clue-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.card-face[data-rarity="gold"] .card-clue-chip {
  border-color: rgba(245, 158, 11, 0.4);
}

.card-face[data-rarity="blackgold"] .card-clue-chip {
  border-color: rgba(234, 179, 8, 0.45);
}

.clue-chip-num {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-face[data-rarity="gold"] .clue-chip-num {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.clue-chip-text {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

/* 全息呼吸翻转交互胶囊 (Interactive Flip Pill) */
.card-flip-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
}

.flip-prompt-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
  animation: flipPillGlow 3s ease-in-out infinite alternate;
}

@keyframes flipPillGlow {
  0% {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
  100% {
    border-color: var(--accent-border, rgba(56, 189, 248, 0.6));
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
  }
}

.card-scene:hover .flip-prompt-pill {
  background: rgba(255, 255, 255, 0.12);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.flip-icon-spin {
  font-size: 14px;
  color: #38bdf8;
  display: inline-block;
  transition: transform 0.4s ease;
}

.card-scene:hover .flip-icon-spin {
  transform: rotate(180deg);
}

.flip-prompt-text {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.04em;
}

.flip-key-badge {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: monospace;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

/* 4.2.3 底部交互与终审防伪金印栏 (Bottom Actions & Authenticity Seal) */
.card-bottom-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
  position: relative;
  z-index: 5;
}

.card-bottom-actions-row .card-flip-prompt {
  flex: 1;
  padding-top: 0;
}

.card-certified-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 30%, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  position: relative;
  white-space: nowrap !important;
  user-select: none;
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-certified-seal:hover {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.35);
}

.card-face[data-rarity="gold"] .card-certified-seal {
  border-color: rgba(245, 158, 11, 0.5);
  background: radial-gradient(circle at 50% 30%, rgba(45, 30, 10, 0.95) 0%, rgba(20, 15, 8, 0.98) 100%);
  box-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.6),
    0 0 10px rgba(245, 158, 11, 0.25),
    inset 0 1px 1px rgba(254, 240, 138, 0.45);
}

.card-face[data-rarity="blackgold"] .card-certified-seal {
  border-color: rgba(234, 179, 8, 0.65);
  background: radial-gradient(circle at 50% 30%, rgba(35, 15, 45, 0.95) 0%, rgba(15, 8, 25, 0.98) 100%);
  box-shadow: 
    0 2px 12px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(234, 179, 8, 0.35),
    inset 0 1px 1.5px rgba(254, 240, 138, 0.5);
}

.seal-inner-circle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.seal-star {
  font-size: 8.5px;
  color: #38bdf8;
  filter: drop-shadow(0 0 4px currentColor);
}

.card-face[data-rarity="gold"] .seal-star {
  color: #fbbf24;
}

.card-face[data-rarity="blackgold"] .seal-star {
  color: #fde047;
}

.seal-text {
  font-family: "SF Mono", Menlo, Consolas, Monaco, monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #cbd5e1;
  text-transform: uppercase;
}

.card-face[data-rarity="gold"] .seal-text {
  color: #fef08a;
}

.card-face[data-rarity="blackgold"] .seal-text {
  color: #fef08a;
}

/* ========================================================= */
/* 4.3 卡牌反面精装排版 (解密终审与名师锦囊)                 */
/* ========================================================= */
.card-face--back {
  transform: rotateY(180deg);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) transparent;
}

/* 反面顶部元数据与工具栏 (与正面完全对称) */
.card-back-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-back-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 15;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}

/* 反面核心主标题区 (居中独占，舒展大气) */
.card-back-title-container {
  text-align: center;
  margin: 10px 0 10px;
}

.card-back-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.35;
  margin-bottom: 6px;
}

.card-face[data-rarity="gold"] .card-back-title {
  background: linear-gradient(180deg, #ffffff 30%, #fef08a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-face[data-rarity="blackgold"] .card-back-title {
  background: linear-gradient(180deg, #fffbeb 20%, #fde047 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 💡 思维秘钥金句条 (Keynote Banner) - 自然舒展、不再被挤在左侧成黄色膏药 */
.card-back-kicker-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 92%;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  margin: 2px auto 4px;
  transition: all 0.2s ease;
}

.card-face[data-rarity="common"] .card-back-kicker-banner {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.35);
}

.card-face[data-rarity="blackgold"] .card-back-kicker-banner {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.4);
}

.kicker-key-icon {
  font-size: 13px;
}

.kicker-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fbbf24;
  white-space: nowrap;
}

.card-face[data-rarity="common"] .kicker-label {
  color: #38bdf8;
}

.card-face[data-rarity="blackgold"] .kicker-label {
  color: #fde047;
}

.kicker-text {
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.card-ai-variant-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6.5px 14px;
  min-height: 33px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3) 0%, rgba(236, 72, 153, 0.28) 100%);
  border: 1.2px solid rgba(216, 180, 254, 0.65);
  color: #fdf4ff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: visible;
  z-index: 2;
}

/* 隐式触控热区扩展 (Touch Slop)，杜绝手指在黑板/触屏点偏或点在缝隙时误翻牌 */
.card-ai-variant-btn::before {
  content: "";
  position: absolute;
  inset: -8px -6px;
  border-radius: inherit;
  z-index: 1;
}

.card-ai-variant-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.5) 0%, rgba(236, 72, 153, 0.5) 100%);
  border-color: rgba(240, 171, 252, 0.95);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.02);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.55), 0 0 12px rgba(236, 72, 153, 0.35);
}

.card-ai-variant-btn:active,
.card-ai-variant-btn.is-clicked {
  transform: translateY(0) scale(0.96);
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.65) 0%, rgba(244, 114, 182, 0.65) 100%);
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.6), inset 0 1px 4px rgba(0, 0, 0, 0.3);
}

.card-ai-variant-btn .ai-icon {
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.8));
  display: inline-block;
  transition: transform 0.2s ease;
}

.card-ai-variant-btn:hover .ai-icon {
  transform: scale(1.15) rotate(-6deg);
}

.card-starmap-jump-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6.5px 14px;
  min-height: 33px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22) 0%, rgba(129, 140, 248, 0.22) 100%);
  border: 1.2px solid rgba(56, 189, 248, 0.65);
  color: #f0f9ff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: visible;
  z-index: 2;
}

/* 隐式触控热区扩展 (Touch Slop) */
.card-starmap-jump-btn::before {
  content: "";
  position: absolute;
  inset: -8px -6px;
  border-radius: inherit;
  z-index: 1;
}

.card-starmap-jump-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.38) 0%, rgba(129, 140, 248, 0.38) 100%);
  border-color: rgba(125, 211, 252, 0.95);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.45), 0 0 12px rgba(56, 189, 248, 0.3);
  color: #ffffff;
  transform: translateY(-1.5px) scale(1.02);
}

.card-starmap-jump-btn:active,
.card-starmap-jump-btn.is-clicked {
  transform: translateY(0) scale(0.96);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.5) 0%, rgba(129, 140, 248, 0.5) 100%);
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.5), inset 0 1px 4px rgba(0, 0, 0, 0.3);
}

.card-starmap-jump-btn .jump-icon {
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.8));
  display: inline-block;
  transition: transform 0.2s ease;
}

.card-starmap-jump-btn:hover .jump-icon {
  transform: scale(1.15) rotate(12deg);
}

.card-starmap-jump-btn .jump-arrow {
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  transition: transform 0.2s ease, color 0.2s ease;
}

.card-starmap-jump-btn:hover .jump-arrow {
  transform: translate(2px, -2px);
  color: #7dd3fc;
}

/* 核心答案终审解密面板 */
.card-back-section {
  position: relative;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  text-align: left;
}

.card-back-section--answer {
  background: rgba(8, 20, 38, 0.7);
  border: 1.2px solid rgba(56, 189, 248, 0.35);
  border-left: 5px solid #38bdf8;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.card-back-section--answer .section-label {
  color: #38bdf8;
}

.card-answer-text {
  font-size: 15px;
  line-height: 1.7;
  color: #ffffff;
  font-weight: 500;
  white-space: pre-wrap;
}

/* ⚠️ 名师避坑雷区面板 */
.card-back-section--pitfall {
  background: rgba(30, 20, 10, 0.7);
  border: 1.2px solid rgba(245, 158, 11, 0.38);
  border-left: 5px solid #f59e0b;
}

.card-back-section--pitfall .section-label {
  color: #fbbf24;
}

.card-pitfall-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #fef08a;
}

/* ➕ 课堂连环追问面板 */
.card-back-section--followup {
  background: rgba(26, 14, 38, 0.7);
  border: 1.2px solid rgba(168, 85, 247, 0.38);
  border-left: 5px solid #a855f7;
}

.card-back-section--followup .section-label {
  color: #d8b4fe;
}

.card-followup-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #f5f3ff;
}

/* 全景星谱联动徽章 */
.card-star-node-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  font-size: 11.5px;
  color: #7dd3fc;
  margin-top: 4px;
}

.card-star-node-badge strong {
  color: #ffffff;
}

/* ========================================================= */
/* 4.4 迎宾教学玩法指南卡片专属样式 (Guide Card Styles)        */
/* ========================================================= */
.card-guide-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: center;
  overflow-y: auto;
  scrollbar-width: none;
}

.card-guide-body::-webkit-scrollbar {
  display: none;
}

.card-guide-headline {
  text-align: center;
}

.card-guide-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #ffffff 40%, #fde047 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: block;
}

.card-guide-subtitle {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
  margin-top: 4px;
  display: block;
  letter-spacing: 0.03em;
}

.guide-steps-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(4, 9, 22, 0.6);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

.guide-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.guide-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-step-info strong {
  font-size: 14px;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.guide-step-info p {
  font-size: 12.5px;
  color: #cbd5e1;
  margin: 2px 0 0;
  line-height: 1.45;
}

.guide-subjects-section {
  text-align: left;
  margin-top: 2px;
}

.guide-subjects-label {
  font-size: 12px;
  color: #fbbf24;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.guide-subjects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.guide-subject-chip:hover {
  border-color: var(--sub-color, #38bdf8);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--sub-color, #38bdf8);
}

.guide-subject-chip:active {
  transform: translateY(0) scale(0.97);
}

/* 反面：特色考查维度与快捷键 */
.guide-back-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto 0;
  text-align: left;
}

.guide-modes-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(4, 9, 22, 0.6);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-mode-item strong {
  font-size: 14px;
  color: #38bdf8;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}

.guide-mode-item p {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.55;
  margin: 0;
}

.guide-shortcuts-box {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.shortcut-pill {
  font-size: 12.5px;
  color: #cbd5e1;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shortcut-pill kbd {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: 11px;
  color: #38bdf8;
  font-family: inherit;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}


/* ========================================================= */
/* 5. 底部主抽卡控制按钮                                      */
/* ========================================================= */
.deck-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.draw-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 32px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.6);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 
    0 10px 30px rgba(2, 132, 199, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.25s ease;
}

.draw-action-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 14px 40px rgba(2, 132, 199, 0.6),
    0 0 20px rgba(56, 189, 248, 0.5);
}

.draw-action-btn:active {
  transform: translateY(0) scale(0.98);
}

.draw-action-btn .btn-icon {
  font-size: 18px;
}

.flip-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.flip-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(192, 132, 252, 0.65);
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #4f46e5 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 
    0 8px 24px rgba(124, 58, 237, 0.35),
    0 0 16px rgba(168, 85, 247, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.ai-action-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 12px 32px rgba(124, 58, 237, 0.55),
    0 0 25px rgba(216, 180, 254, 0.6);
  border-color: rgba(232, 121, 249, 0.95);
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #6366f1 100%);
}

.ai-action-btn:active {
  transform: translateY(0) scale(0.98);
}

.ai-action-btn .btn-icon {
  font-size: 16px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

/* ========================================================= */
/* 6. AI 实时无限出题工坊模态对话框                             */
/* ========================================================= */
.ai-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.22s ease-out;
}

.ai-modal-overlay[hidden] {
  display: none !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ai-modal-card {
  width: 100%;
  max-width: 580px;
  background: radial-gradient(130% 120% at 50% 0%, #1c1432 0%, #0c1022 60%, #030712 100%);
  border: 1.8px solid rgba(168, 85, 247, 0.5);
  border-radius: 20px;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.85),
    0 0 50px rgba(147, 51, 234, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: modalSlideUp 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideUp {
  from { transform: translateY(18px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-modal-icon {
  font-size: 26px;
}

.ai-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #e9d5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ai-modal-desc {
  margin: 3px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.ai-modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  line-height: 1;
}

.ai-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.ai-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-prompt-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.preset-label {
  font-size: 12px;
  color: #c084fc;
  font-weight: 700;
}

.preset-chip {
  background: rgba(147, 51, 234, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #e9d5ff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
}

.preset-chip:hover {
  background: rgba(147, 51, 234, 0.25);
  border-color: rgba(192, 132, 252, 0.7);
  color: #ffffff;
  transform: translateY(-1px);
}

.ai-prompt-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(6, 11, 25, 0.7);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 13.5px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ai-prompt-input:focus {
  outline: none;
  border-color: #c084fc;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ai-prompt-input::placeholder {
  color: #64748b;
  font-size: 12.5px;
}

.ai-modal-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ai-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-filter-group label {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
}

.ai-filter-group select {
  background: rgba(15, 23, 42, 0.85);
  border: 1.2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.ai-filter-group select:focus {
  border-color: #a855f7;
}

.ai-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.ai-modal-cancel-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ai-modal-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ai-modal-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
  border: 1px solid rgba(216, 180, 254, 0.6);
  color: #ffffff;
  padding: 9px 24px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
  transition: all 0.22s ease;
}

.ai-modal-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(147, 51, 234, 0.6);
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
}

.ai-modal-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ai-modal-submit-btn.is-generating .btn-icon {
  animation: spin 1s linear infinite;
}

/* ========================================================= */
/* 7. 空状态展示                                              */
/* ========================================================= */
.card-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.card-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.card-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.card-empty-desc {
  font-size: 13px;
  color: #94a3b8;
  max-width: 320px;
  line-height: 1.5;
}

.empty-reset-btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.empty-reset-btn:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.7);
  transform: translateY(-1px);
}

/* ========================================================= */
/* 7. 触屏设备专属手感优化 (Touch Screen Optimizations)         */
/* ========================================================= */
button,
.card-scene,
.subject-tab-btn,
.mode-pill-btn,
.stage-switch-btn,
.guide-subject-chip {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* 触屏手指按下时的微物理压缩质感 (与 3D 旋转及翻面姿态解耦) */
.card-scene.is-touching {
  --touch-press-scale: 0.985;
}

/* 触屏设备上强化按压反馈 */
@media (hover: none) {
  .draw-action-btn:active,
  .flip-action-btn:active,
  .subject-tab-btn:active,
  .mode-pill-btn:active,
  .deck-guide-btn:active,
  .deck-return-btn:active {
    transform: scale(0.96);
    filter: brightness(1.2);
  }

  .card-scene:hover .flip-prompt-pill {
    transform: none;
  }
}

/* ========================================================= */
/* 8. 多设备屏幕响应式深度适配                                 */
/* ========================================================= */

/* --- A. 超大屏 / 教室 4K 电子黑板 / 交互白板 (86寸/75寸/65寸) --- */
@media (min-width: 1921px) and (min-height: 980px), (min-height: 1200px) {
  .deck-header {
    height: 76px;
    padding: 0 40px;
  }

  .deck-brand-logo {
    font-size: 30px;
  }

  .deck-brand-text h1 {
    font-size: 22px;
  }

  .deck-brand-text p {
    font-size: 11px;
  }

  .deck-guide-btn,
  .deck-return-btn {
    height: 44px;
    padding: 0 22px;
    font-size: 14px;
  }

  .subject-nav-wrapper {
    padding: 12px 36px;
    gap: 18px;
  }

  .stage-switch-btn {
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
  }

  .subject-tab-btn {
    height: 42px;
    padding: 0 20px;
    font-size: 15px;
  }

  .deck-toolbar {
    padding: 12px 40px;
  }

  .mode-pill-btn {
    height: 36px;
    padding: 0 18px;
    font-size: 14px;
  }

  .pool-counter-badge {
    font-size: 13.5px;
    right: 40px;
  }

  /* 4K 大黑板卡牌等比放大，后排学生一目了然 */
  .card-scene {
    max-width: 1040px;
    height: min(660px, 68vh);
    margin-bottom: 26px;
  }

  .card-face {
    padding: 34px 46px 26px;
    border-radius: 28px;
  }

  .card-corner-bracket {
    width: 24px;
    height: 24px;
  }

  .card-corner-bracket--tl {
    top: 10px;
    left: 10px;
    border-top-left-radius: 20px;
  }

  .card-corner-bracket--tr {
    top: 10px;
    right: 10px;
    border-top-right-radius: 20px;
  }

  .card-corner-bracket--bl {
    bottom: 10px;
    left: 10px;
    border-bottom-left-radius: 20px;
  }

  .card-corner-bracket--br {
    bottom: 10px;
    right: 10px;
    border-bottom-right-radius: 20px;
  }

  .card-badge {
    font-size: 12px;
    padding: 4px 10px;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  .card-serial-code {
    font-size: 11.5px;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  .card-source-chip {
    font-size: 12px;
    padding: 4px 12px;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  .card-category-indicator {
    padding: 4px 16px;
    margin-bottom: 10px;
  }

  .indicator-text {
    font-size: 13px;
  }

  .card-front-title {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .card-glyph-crest {
    margin: 4px auto 12px;
    max-width: 380px;
  }

  .crest-emblem {
    width: 36px;
    height: 36px;
  }

  .subject-glyph-svg {
    width: 24px;
    height: 24px;
  }

  .exam-stars {
    font-size: 14.5px;
  }

  .card-certified-seal {
    padding: 6px 14px;
  }

  .seal-text {
    font-size: 11px;
  }

  .card-front-question-panel {
    padding: 22px 32px;
    border-radius: 20px;
    margin-bottom: 16px;
  }

  .question-header-tag {
    font-size: 13.5px;
    margin-bottom: 10px;
  }

  .card-front-question {
    font-size: 19.5px;
    line-height: 1.85;
  }

  .clues-header-label {
    font-size: 13.5px;
  }

  .card-clue-chip {
    padding: 6px 16px;
    font-size: 13.5px;
  }

  .flip-prompt-pill {
    padding: 8px 24px;
  }

  .flip-prompt-text {
    font-size: 13.5px;
  }

  .card-back-title {
    font-size: 24px;
  }

  .card-back-section {
    padding: 18px 26px;
    border-radius: 18px;
    margin-bottom: 14px;
  }

  .section-label {
    font-size: 13.5px;
  }

  .card-answer-text {
    font-size: 18px;
    line-height: 1.75;
  }

  .card-pitfall-text,
  .card-followup-text {
    font-size: 16px;
    line-height: 1.7;
  }

  /* 底部按钮 */
  .draw-action-btn {
    height: 56px;
    padding: 0 44px;
    font-size: 17px;
  }

  .flip-action-btn {
    height: 50px;
    padding: 0 28px;
    font-size: 15px;
  }
}

/* --- B. 教室讲台笔记本 / 投影仪 / 矮屏显示器 (高度 <= 768px 或 <= 720px) --- */
@media (max-height: 768px) {
  .deck-header {
    height: 50px;
    padding: 0 20px;
  }

  .deck-brand-logo {
    font-size: 20px;
  }

  .deck-brand-text h1 {
    font-size: 15px;
  }

  .deck-guide-btn,
  .deck-return-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 11px;
  }

  .subject-nav-wrapper {
    padding: 4px 16px;
    gap: 10px;
  }

  .stage-switch-btn {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }

  .subject-tab-btn {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
  }

  .deck-toolbar {
    padding: 4px 20px;
  }

  .mode-pill-btn {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }

  .pool-counter-badge {
    font-size: 10.5px;
  }

  .deck-main-arena {
    padding: 8px 16px 12px;
  }

  /* 卡牌紧凑适配，彻底避免纵向溢出滚动 */
  .card-scene {
    max-width: 760px;
    height: min(440px, 62vh);
    margin-bottom: 10px;
  }

  .card-face {
    padding: 16px 24px 12px;
    border-radius: 18px;
  }

  .card-meta-row {
    padding-bottom: 8px;
  }

  .card-badge {
    font-size: 10px;
    padding: 2px 7px;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  .card-serial-code {
    font-size: 9.5px;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  .card-source-chip {
    font-size: 10px;
    padding: 2px 8px;
    white-space: nowrap !important;
    flex-shrink: 0;
  }

  .card-title-container {
    margin: 4px 0 6px;
  }

  .card-category-indicator {
    padding: 2px 10px;
    margin-bottom: 4px;
  }

  .indicator-text {
    font-size: 10.5px;
  }

  .card-front-title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .card-title-divider {
    margin: 0 auto 8px;
  }

  .card-glyph-crest {
    margin: 1px auto 4px;
    max-width: 240px;
  }

  .crest-emblem {
    width: 22px;
    height: 22px;
  }

  .subject-glyph-svg {
    width: 14px;
    height: 14px;
  }

  .card-certified-seal {
    padding: 2px 7px;
  }

  .seal-text {
    font-size: 8.5px;
  }

  .exam-stars {
    font-size: 11px;
  }

  .card-front-question-panel {
    padding: 10px 18px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .question-header-tag {
    font-size: 10.5px;
    margin-bottom: 4px;
  }

  .card-front-question {
    font-size: 14px;
    line-height: 1.6;
  }

  .card-front-clues-section {
    margin-bottom: 6px;
    gap: 8px;
  }

  .clues-header-label {
    font-size: 10.5px;
  }

  .card-clue-chip {
    padding: 3px 10px;
  }

  .clue-chip-text {
    font-size: 11px;
  }

  .flip-prompt-pill {
    padding: 4px 14px;
  }

  .flip-prompt-text {
    font-size: 11px;
  }

  .card-back-header {
    padding-bottom: 6px;
    margin-bottom: 8px;
  }

  .card-back-title {
    font-size: 16.5px;
  }

  .card-back-section {
    padding: 10px 14px;
    margin-bottom: 6px;
    border-radius: 10px;
  }

  .section-label {
    font-size: 10.5px;
    margin-bottom: 4px;
  }

  .card-answer-text {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .card-pitfall-text,
  .card-followup-text {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .draw-action-btn {
    height: 40px;
    padding: 0 24px;
    font-size: 13.5px;
  }

  .flip-action-btn {
    height: 36px;
    padding: 0 16px;
    font-size: 12px;
  }

  .ai-action-btn {
    height: 36px;
    padding: 0 16px;
    font-size: 12px;
  }
}

/* --- C. 教师平板横屏 / 中等尺寸大屏 (1024px ~ 1280px) --- */
@media (max-width: 1280px) {
  .subject-nav-bar {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .subject-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .mode-pills-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 2px 0;
    max-width: calc(100% - 130px);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mode-pills-row::-webkit-scrollbar {
    display: none;
  }

  .card-scene {
    max-width: 90vw;
  }
}

/* ========================================================= */
/* 8. 移动端专属自适应与触控性能增强 (手机 / 平板 <= 768px)    */
/* ========================================================= */
@media (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }

  .deck-header {
    height: 52px;
    padding: 0 12px;
  }

  .deck-brand-text p {
    display: none;
  }

  .deck-brand-text h1 {
    font-size: 15px;
    letter-spacing: 0.05em;
  }

  .deck-guide-btn,
  .deck-return-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 11px;
    gap: 4px;
  }

  .subject-nav-wrapper {
    padding: 6px 12px;
    gap: 8px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .stage-switch-btn {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
  }

  .subject-tab-btn {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
    gap: 4px;
  }

  .deck-toolbar {
    padding: 4px 12px;
    gap: 8px;
  }

  .mode-pill-btn {
    height: 26px;
    padding: 0 9px;
    font-size: 10.5px;
  }

  .pool-counter-badge {
    font-size: 10px;
    padding: 2px 8px;
  }

  .deck-main-arena {
    padding: 6px 10px 10px;
  }

  .card-scene {
    width: 100%;
    max-width: 94vw;
    height: min(480px, 60vh);
    margin-bottom: 8px;
    touch-action: pan-y;
  }

  .card-face {
    padding: 16px 18px 12px;
    border-radius: 18px;
  }

  .card-meta-row {
    padding-bottom: 6px;
  }

  .card-badge {
    font-size: 9.5px;
    padding: 2px 6px;
  }

  .card-serial-code {
    font-size: 9px;
  }

  .card-source-chip {
    font-size: 9.5px;
    padding: 2px 7px;
  }

  .card-front-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .card-front-question-panel {
    padding: 10px 14px;
    margin-bottom: 6px;
  }

  .card-front-question {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .card-front-clues-section {
    margin-bottom: 4px;
    gap: 6px;
  }

  .card-clue-chip {
    padding: 2px 8px;
  }

  .clue-chip-text {
    font-size: 10.5px;
  }

  .flip-prompt-pill {
    padding: 3px 12px;
  }

  .flip-prompt-text {
    font-size: 10.5px;
  }

  .flip-key-badge {
    display: none;
  }

  .card-back-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

  .card-back-title {
    font-size: 15px;
  }

  .card-back-actions {
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    gap: 6px;
    padding: 2px 3px;
  }

  .card-ai-variant-btn,
  .card-starmap-jump-btn {
    padding: 5px 11px;
    min-height: 29px;
    font-size: 11px;
  }

  .card-back-section {
    padding: 8px 12px;
    margin-bottom: 6px;
  }

  .card-answer-text {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .card-pitfall-text,
  .card-followup-text {
    font-size: 11.5px;
    line-height: 1.45;
  }

  /* 底部操作行响应式适配 */
  .deck-controls-row {
    width: 100%;
    max-width: 94vw;
    gap: 6px;
    padding: 0 4px;
  }

  .draw-action-btn {
    flex: 1.2;
    height: 40px;
    padding: 0 10px;
    font-size: 12.5px;
    gap: 6px;
    touch-action: manipulation;
  }

  .flip-action-btn {
    flex: 0.9;
    height: 40px;
    padding: 0 8px;
    font-size: 11.5px;
    touch-action: manipulation;
  }

  .ai-action-btn {
    flex: 1.1;
    height: 40px;
    padding: 0 8px;
    font-size: 11.5px;
    gap: 5px;
    touch-action: manipulation;
  }

  /* AI 模态框移动端适配 */
  .ai-modal-card {
    width: 95%;
    max-height: 90vh;
    border-radius: 16px;
  }

  .ai-modal-header {
    padding: 14px 18px 10px;
  }

  .ai-modal-body {
    padding: 14px 18px;
    gap: 12px;
  }

  .ai-modal-filters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ai-modal-footer {
    padding: 10px 18px 14px;
  }
}

@media (max-width: 480px) {
  .deck-brand-logo {
    font-size: 20px;
  }

  .deck-brand-text h1 {
    font-size: 13.5px;
  }

  .deck-controls-row {
    gap: 4px;
  }

  .draw-action-btn {
    font-size: 11.5px;
  }

  .flip-action-btn,
  .ai-action-btn {
    font-size: 10.5px;
  }
}

