/* ===== 智脑提升训练 · 专用样式 ===== */
/* 设计主题：温暖橙色 + 活力青色 · 童趣专注训练 */

/* ========== CSS变量 ========== */
.ft-root {
  --ft-bg: #FFF9F5;
  --ft-bg2: #FFF3E8;
  --ft-card: #FFFFFF;
  --ft-ink: #2D2A26;
  --ft-text: #3D3833;
  --ft-muted: #8A827A;
  --ft-rule: #F0E8E0;
  --ft-primary: #E07A5F;
  --ft-primary-50: #FFF0EB;
  --ft-primary-100: #FFD6CC;
  --ft-teal: #3A9B8F;
  --ft-teal-50: #E6F4F2;
  --ft-green: #4CAF7A;
  --ft-green-soft: #E4F5EC;
  --ft-orange: #FFB74D;
  --ft-orange-soft: #FFF8E1;
  --ft-blue: #5B9BD5;
  --ft-blue-soft: #E3F2FD;
  --ft-purple: #9B7ED8;
  --ft-purple-soft: #F3E5F5;
  --ft-pink: #E88B9A;
  --ft-pink-soft: #FCE4EC;
  --ft-gold: #FFB74D;
  --ft-shadow: 0 2px 8px rgba(45,42,38,0.06), 0 1px 3px rgba(45,42,38,0.04);
  --ft-shadow-md: 0 6px 20px rgba(45,42,38,0.08), 0 2px 6px rgba(45,42,38,0.05);
  --ft-shadow-lg: 0 12px 40px rgba(45,42,38,0.12), 0 4px 12px rgba(45,42,38,0.06);
  --ft-radius: 24px;
  --ft-radius-sm: 16px;
  --ft-radius-xs: 10px;
  --ft-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Hero区域 ========== */
.ft-hero {
  padding: 28px 24px 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ft-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ft-ink);
  margin-bottom: 6px;
  letter-spacing: -1px;
}
.ft-hero h1 span {
  background: linear-gradient(135deg, var(--ft-primary), #D4533B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ft-hero p {
  font-size: 0.92rem;
  color: var(--ft-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}
.ft-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background-image: url('../assets/focus-illus/hero-brain-training.jpg');
  background-size: cover;
  background-position: center top;
  opacity: 0.25;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0) 100%);
}

/* ========== 容器 ========== */
.ft-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ========== 数据概览卡片 ========== */
.ft-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.ft-stat-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFDF9 100%);
  border-radius: var(--ft-radius-sm);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--ft-shadow);
  border: 1px solid var(--ft-rule);
  cursor: pointer;
  transition: var(--ft-transition);
  position: relative;
  overflow: hidden;
}
.ft-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0.7;
}
.ft-stat-card.points::before { background: linear-gradient(90deg, var(--ft-orange), var(--ft-primary)); }
.ft-stat-card.games::before { background: linear-gradient(90deg, var(--ft-teal), var(--ft-green)); }
.ft-stat-card.time::before { background: linear-gradient(90deg, var(--ft-blue), var(--ft-purple)); }
.ft-stat-card.streak::before { background: linear-gradient(90deg, var(--ft-pink), var(--ft-primary)); }
.ft-stat-card:hover {
  box-shadow: var(--ft-shadow-md);
  transform: translateY(-2px);
}
/* \u7EDF\u8BA1\u5361\u7247AI\u88C5\u9970\u63D2\u753B */
.ft-stat-card::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 70px;
  height: 70px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.35;
  pointer-events: none;
  transition: var(--ft-transition);
}
.ft-stat-card:hover::after {
  opacity: 0.6;
  transform: scale(1.1) translateY(-2px);
}
.ft-stat-card.games::after { background-image: url('../assets/focus-illus/stat-target.jpg'); }
.ft-stat-card.time::after { background-image: url('../assets/focus-illus/stat-hourglass.jpg'); }
.ft-stat-card.points::after { background-image: url('../assets/focus-illus/stat-trophy.jpg'); }
.ft-stat-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.ft-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ft-ink);
  line-height: 1.2;
}
.ft-stat-label {
  font-size: 0.82rem;
  color: var(--ft-muted);
  margin-top: 4px;
  font-weight: 600;
}

/* ========== Tab标签栏 ========== */
.ft-tab-bar {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #F0EDE8;
  border-radius: 18px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ft-tab-bar::-webkit-scrollbar { display: none; }
.ft-tab-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--ft-muted);
  transition: var(--ft-transition);
  font-family: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.ft-tab-btn:hover {
  color: var(--ft-text);
  background: rgba(255,255,255,0.4);
}
.ft-tab-btn.active {
  background: #fff;
  color: var(--ft-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}
.ft-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 50%;
  background: var(--ft-primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

/* ========== Tab面板 ========== */
.ft-tab-panel {
  display: none;
  animation: ftFadeIn 0.35s ease-out;
}
.ft-tab-panel.active {
  display: block;
}
@keyframes ftFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 通用卡片 ========== */
.ft-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFDF9 100%);
  border-radius: var(--ft-radius);
  border: 1px solid var(--ft-rule);
  border-left: 4px solid var(--ft-primary);
  padding: 28px;
  box-shadow: var(--ft-shadow-md);
  margin-bottom: 20px;
  transition: var(--ft-transition);
  position: relative;
  overflow: hidden;
}
.ft-card:hover {
  box-shadow: var(--ft-shadow-lg);
  transform: translateY(-2px);
}
.ft-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ft-primary), var(--ft-orange), var(--ft-gold));
  opacity: 0.5;
}
.ft-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ft-ink);
}

/* ========== 舒尔特方格区域 ========== */
.schulte-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.schulte-config {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.schulte-config-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.schulte-config-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ft-muted);
  min-width: 48px;
  text-align: right;
}

/* 难度选择 */
.schulte-difficulty {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.schulte-diff-btn {
  padding: 10px 20px;
  border-radius: 100px;
  border: 2px solid var(--ft-rule);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ft-text);
  cursor: pointer;
  transition: var(--ft-transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.schulte-diff-btn:hover {
  border-color: var(--ft-primary-100);
  background: var(--ft-primary-50);
}
.schulte-diff-btn.active {
  border-color: var(--ft-primary);
  background: linear-gradient(135deg, var(--ft-primary-50), #FFE0D6);
  color: var(--ft-primary);
  box-shadow: 0 3px 12px rgba(224,122,95,0.2);
}
.schulte-diff-btn.locked {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
}
.schulte-diff-btn.locked::after {
  content: '🔒';
  font-size: 0.75rem;
}

/* 游戏控制栏 */
.schulte-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.ft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--ft-transition);
  font-family: inherit;
}
.ft-btn-primary {
  background: linear-gradient(135deg, var(--ft-primary), #D4533B);
  color: #fff;
  box-shadow: 0 4px 12px rgba(224,122,95,0.3);
}
.ft-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224,122,95,0.4);
}
.ft-btn-primary:active {
  transform: translateY(0);
}
.ft-btn-secondary {
  background: #F5F0EB;
  color: var(--ft-text);
}
.ft-btn-secondary:hover { background: #EDE7E0; }
.ft-btn-teal {
  background: linear-gradient(135deg, var(--ft-teal), var(--ft-green));
  color: #fff;
  box-shadow: 0 4px 12px rgba(58,155,143,0.25);
}
.ft-btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(58,155,143,0.35);
}
.ft-btn-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
  border-radius: 10px;
}

/* ========== 状态栏重构 ========== */
.schulte-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(255,253,249,0.95), rgba(255,248,240,0.95));
  border-radius: var(--ft-radius-sm);
  border: 1px solid var(--ft-rule);
  box-shadow: var(--ft-shadow);
  position: relative;
  overflow: hidden;
}
.schulte-status-bar::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 60px;
  height: 60px;
  background-image: url('../assets/focus-illus/stat-hourglass.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

/* 大计时器 */
.schulte-timer {
  font-size: 2.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ft-primary), #D4533B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
  min-width: 180px;
  letter-spacing: 2px;
  line-height: 1;
}
.schulte-timer.running {
  animation: ftPulse 1.5s ease-in-out infinite;
}
@keyframes ftPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 右侧状态区 */
.schulte-status-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* 目标Badge */
.schulte-target-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.target-label {
  font-size: 0.7rem;
  color: var(--ft-muted);
  font-weight: 600;
}
.target-value {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ft-primary), #D4533B);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(224,122,95,0.3);
}
.target-value.pop {
  animation: ftBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ftBadgePop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* 进度条 */
.schulte-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 90px;
}
.progress-label {
  font-size: 0.7rem;
  color: var(--ft-muted);
  font-weight: 600;
}
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--ft-rule);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ft-green), var(--ft-teal));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}
.progress-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ft-ink);
}

/* 失误 */
.schulte-mistake {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.mistake-label {
  font-size: 0.7rem;
  color: var(--ft-muted);
  font-weight: 600;
}
.mistake-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #E53935;
  min-width: 32px;
  text-align: center;
}
.mistake-value.bump {
  animation: ftMistakeBump 0.3s ease;
}
@keyframes ftMistakeBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ========== 方格核心 ========== */
.schulte-grid-wrapper {
  position: relative;
  padding: 14px;
  background-image: url('../assets/focus-illus/schulte-play-bg.jpg');
  background-size: cover;
  background-position: center;
  border-radius: var(--ft-radius);
  box-shadow: var(--ft-shadow-lg);
  border: 2px solid var(--ft-rule);
  overflow: hidden;
}
.schulte-grid-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.55);
  border-radius: var(--ft-radius);
  z-index: 0;
}
.schulte-grid-wrapper > * {
  position: relative;
  z-index: 1;
}
.schulte-grid {
  display: grid;
  gap: 6px;
  margin: 0 auto;
}
.schulte-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ft-radius-xs);
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  position: relative;
  background: linear-gradient(145deg, rgba(255,253,249,0.92), rgba(255,248,240,0.92));
  border: 2px solid var(--ft-rule);
  color: var(--ft-ink);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.04);
}
.schulte-cell:hover {
  border-color: var(--ft-primary-100);
  background: var(--ft-primary-50);
  transform: scale(1.05);
  z-index: 1;
}
.schulte-cell:active {
  transform: scale(0.95);
}
.schulte-cell.correct {
  background: linear-gradient(135deg, var(--ft-green), var(--ft-teal)) !important;
  color: #fff !important;
  border-color: transparent !important;
  transform: scale(1.08);
  box-shadow: 0 3px 10px rgba(76,175,122,0.3);
  animation: ftCorrectPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ftCorrectPop {
  0% { transform: scale(0.9); }
  40% { transform: scale(1.15); }
  70% { transform: scale(1.05); }
  100% { transform: scale(1.08); }
}

/* 正确时光晕扩散 */
.schulte-cell.correct::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: translate(-50%, -50%);
  animation: ftCorrectGlow 0.5s ease-out forwards;
  pointer-events: none;
}
@keyframes ftCorrectGlow {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 140%; height: 140%; opacity: 0; }
}

.schulte-cell.wrong {
  animation: ftCellShake 0.45s ease;
  border-color: #E53935 !important;
  background: #FFEBEE !important;
}
@keyframes ftCellShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-8px) rotate(-2deg); }
  30% { transform: translateX(8px) rotate(2deg); }
  45% { transform: translateX(-5px) rotate(-1deg); }
  60% { transform: translateX(5px) rotate(1deg); }
  75% { transform: translateX(-2px) rotate(0); }
  90% { transform: translateX(2px) rotate(0); }
}

/* 错误时整个网格微震 */
.schulte-grid-wrapper.shake {
  animation: ftGridShake 0.35s ease;
}
@keyframes ftGridShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

/* 完成时全部正确格子依次闪白光 */
.schulte-cell.correct.flash-complete {
  animation: ftCompleteFlash 0.5s ease;
}
@keyframes ftCompleteFlash {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}
.schulte-cell.next-hint {
  border-color: var(--ft-teal) !important;
  box-shadow: 0 0 0 3px var(--ft-teal-50);
}

/* 方格尺寸 */
.schulte-grid.size-3x3 { grid-template-columns: repeat(3, 1fr); max-width: 280px; }
.schulte-grid.size-3x3 .schulte-cell { width: 80px; height: 80px; font-size: 1.8rem; }

.schulte-grid.size-4x4 { grid-template-columns: repeat(4, 1fr); max-width: 340px; }
.schulte-grid.size-4x4 .schulte-cell { width: 74px; height: 74px; font-size: 1.6rem; }

.schulte-grid.size-5x5 { grid-template-columns: repeat(5, 1fr); max-width: 400px; }
.schulte-grid.size-5x5 .schulte-cell { width: 70px; height: 70px; font-size: 1.5rem; }

.schulte-grid.size-6x6 { grid-template-columns: repeat(6, 1fr); max-width: 440px; }
.schulte-grid.size-6x6 .schulte-cell { width: 64px; height: 64px; font-size: 1.3rem; }

.schulte-grid.size-7x7 { grid-template-columns: repeat(7, 1fr); max-width: 470px; }
.schulte-grid.size-7x7 .schulte-cell { width: 58px; height: 58px; font-size: 1.15rem; }

.schulte-grid.size-8x8 { grid-template-columns: repeat(8, 1fr); max-width: 490px; }
.schulte-grid.size-8x8 .schulte-cell { width: 54px; height: 54px; font-size: 1.05rem; }

.schulte-grid.size-9x9 { grid-template-columns: repeat(9, 1fr); max-width: 500px; }
.schulte-grid.size-9x9 .schulte-cell { width: 50px; height: 50px; font-size: 0.95rem; }

/* 字体样式变体 */
.schulte-grid.font-colorful .schulte-cell {
  color: var(--ft-primary);
}
.schulte-grid.font-colorful .schulte-cell.correct {
  color: #fff !important;
}

/* 干扰元素 */
.schulte-grid.distraction-light .schulte-cell {
  background-image: radial-gradient(circle at 30% 30%, rgba(224,122,95,0.04) 0%, transparent 60%);
}
.schulte-grid.distraction-medium .schulte-cell {
  background-image: 
    linear-gradient(45deg, rgba(224,122,95,0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(58,155,143,0.03) 25%, transparent 25%);
  background-size: 10px 10px;
}
.schulte-grid.distraction-heavy .schulte-cell {
  animation: ftDistractionFlicker 3s ease-in-out infinite;
}
@keyframes ftDistractionFlicker {
  0%, 100% { background-color: #FFFDF9; }
  50% { background-color: #FFF8F0; }
}

/* 限时模式倒计时 */
.schulte-countdown {
  position: absolute;
  top: -12px;
  right: 16px;
  padding: 4px 14px;
  border-radius: 100px;
  background: linear-gradient(135deg, #E53935, #C62828);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(229,57,53,0.3);
  font-variant-numeric: tabular-nums;
  z-index: 10;
}
.schulte-countdown.warning {
  animation: ftCountdownWarn 0.5s ease-in-out infinite;
}
@keyframes ftCountdownWarn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ========== 完成弹窗 ========== */
.schulte-complete-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45,42,38,0.5);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: ftOverlayIn 0.3s ease;
}
.schulte-complete-overlay.show {
  display: flex;
}
@keyframes ftOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.schulte-complete-modal {
  background: #fff;
  border-radius: var(--ft-radius);
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: var(--ft-shadow-lg);
  animation: ftModalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes ftModalIn {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.schulte-complete-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: ftBounce 0.6s ease;
}
@keyframes ftBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.schulte-complete-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ft-ink);
  margin-bottom: 8px;
}
.schulte-complete-subtitle {
  font-size: 0.95rem;
  color: var(--ft-muted);
  margin-bottom: 24px;
}
.schulte-complete-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.schulte-complete-stat {
  padding: 12px;
  border-radius: var(--ft-radius-xs);
  background: #FFF9F5;
  border: 1px solid var(--ft-rule);
}
.schulte-complete-stat-label {
  font-size: 0.72rem;
  color: var(--ft-muted);
  font-weight: 600;
}
.schulte-complete-stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ft-primary);
  margin-top: 4px;
}
.schulte-complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ========== 设置面板 ========== */
.ft-settings-group {
  margin-bottom: 24px;
}
.ft-settings-group:last-child {
  margin-bottom: 0;
}
.ft-settings-group-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ft-ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ft-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--ft-rule);
  gap: 16px;
}
.ft-settings-row:last-child {
  border-bottom: none;
}
.ft-settings-label {
  font-size: 0.88rem;
  color: var(--ft-text);
  font-weight: 500;
}
.ft-settings-desc {
  font-size: 0.75rem;
  color: var(--ft-muted);
  margin-top: 2px;
}

/* 开关 */
.ft-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.ft-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ft-switch-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #D5D0CA;
  border-radius: 26px;
  cursor: pointer;
  transition: var(--ft-transition);
}
.ft-switch-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--ft-transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.ft-switch input:checked + .ft-switch-slider {
  background: var(--ft-primary);
}
.ft-switch input:checked + .ft-switch-slider::before {
  transform: translateX(22px);
}

/* 滑块 */
.ft-range {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 6px;
  border-radius: 3px;
  background: var(--ft-rule);
  outline: none;
}
.ft-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ft-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(224,122,95,0.3);
}

/* 下拉选择 */
.ft-select {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--ft-rule);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ft-text);
  background: #fff;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: var(--ft-transition);
}
.ft-select:focus {
  border-color: var(--ft-primary);
  box-shadow: 0 0 0 3px var(--ft-primary-50);
}

/* ========== 训练记录 ========== */
.ft-records-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.ft-record-card {
  background: #fff;
  border-radius: var(--ft-radius-xs);
  padding: 16px;
  border: 1px solid var(--ft-rule);
  transition: var(--ft-transition);
}
.ft-record-card:hover {
  box-shadow: var(--ft-shadow);
}
.ft-record-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.ft-record-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ft-text);
}
.ft-record-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--ft-primary-50);
  color: var(--ft-primary);
}
.ft-record-card-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ft-primary);
}
.ft-record-card-sub {
  font-size: 0.75rem;
  color: var(--ft-muted);
  margin-top: 2px;
}

/* 历史列表 */
.ft-history-list {
  max-height: 480px;
  overflow-y: auto;
}
.ft-history-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ft-rule);
  gap: 14px;
  transition: var(--ft-transition);
}
.ft-history-item:hover {
  background: var(--ft-primary-50);
  border-radius: var(--ft-radius-xs);
}
.ft-history-item:last-child {
  border-bottom: none;
}
.ft-history-rank {
  font-size: 0.85rem;
  font-weight: 800;
  width: 28px;
  text-align: center;
}
.ft-history-rank.gold { color: #FFD700; }
.ft-history-rank.silver { color: #C0C0C0; }
.ft-history-rank.bronze { color: #CD7F32; }
.ft-history-info {
  flex: 1;
}
.ft-history-info-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ft-text);
}
.ft-history-info-sub {
  font-size: 0.75rem;
  color: var(--ft-muted);
  margin-top: 2px;
}
.ft-history-time {
  font-size: 0.72rem;
  color: var(--ft-muted);
}
.ft-history-result {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ft-primary);
  font-variant-numeric: tabular-nums;
}

/* ========== 成就徽章 ========== */
.ft-achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.ft-achievement {
  padding: 20px;
  border-radius: var(--ft-radius-sm);
  border: 1px solid var(--ft-rule);
  background: #fff;
  text-align: center;
  transition: var(--ft-transition);
  position: relative;
}
.ft-achievement:hover {
  box-shadow: var(--ft-shadow-md);
  transform: translateY(-2px);
}
.ft-achievement.unlocked {
  border-color: var(--ft-primary-100);
  background: linear-gradient(135deg, var(--ft-primary-50), var(--ft-orange-soft));
}
.ft-achievement.locked {
  opacity: 0.55;
}
.ft-achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
.ft-achievement-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ft-ink);
  margin-bottom: 4px;
}
.ft-achievement-desc {
  font-size: 0.78rem;
  color: var(--ft-muted);
  line-height: 1.5;
}
.ft-achievement-date {
  font-size: 0.72rem;
  color: var(--ft-teal);
  margin-top: 8px;
  font-weight: 600;
}

/* ========== 每日打卡 ========== */
.ft-checkin-card {
  background: linear-gradient(135deg, var(--ft-orange-soft), var(--ft-primary-50));
  border-radius: var(--ft-radius-sm);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--ft-primary-100);
  margin-bottom: 20px;
}
.ft-checkin-days {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 16px 0;
  flex-wrap: wrap;
}
.ft-checkin-day {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: #fff;
  border: 2px solid var(--ft-rule);
  color: var(--ft-muted);
  transition: var(--ft-transition);
}
.ft-checkin-day.done {
  background: var(--ft-primary);
  border-color: var(--ft-primary);
  color: #fff;
}
.ft-checkin-day.today {
  border-color: var(--ft-primary);
  box-shadow: 0 0 0 3px var(--ft-primary-50);
  color: var(--ft-primary);
}
.ft-checkin-day.future {
  opacity: 0.4;
}

/* ========== 自定义难度 ========== */
.ft-custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.ft-custom-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ft-muted);
  margin-bottom: 6px;
}
.ft-custom-field input,
.ft-custom-field select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--ft-rule);
  font-size: 0.92rem;
  font-weight: 600;
  outline: none;
  font-family: inherit;
  transition: var(--ft-transition);
}
.ft-custom-field input:focus,
.ft-custom-field select:focus {
  border-color: var(--ft-primary);
  box-shadow: 0 0 0 3px var(--ft-primary-50);
}

/* ========== Toast通知 ========== */
.ft-toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: var(--ft-shadow-lg);
}
.ft-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ft-toast.success {
  background: linear-gradient(135deg, var(--ft-green), var(--ft-teal));
  color: #fff;
}
.ft-toast.error {
  background: linear-gradient(135deg, #E53935, #C62828);
  color: #fff;
}
.ft-toast.info {
  background: linear-gradient(135deg, var(--ft-blue), #3F51B5);
  color: #fff;
}

/* ========== 模式切换胶囊 ========== */
.ft-mode-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.ft-mode-pill {
  padding: 8px 16px;
  border-radius: 100px;
  border: 2px solid var(--ft-rule);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ft-text);
  cursor: pointer;
  transition: var(--ft-transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.ft-mode-pill:hover {
  border-color: var(--ft-primary-100);
  background: var(--ft-primary-50);
}
.ft-mode-pill.active {
  border-color: var(--ft-primary);
  background: linear-gradient(135deg, var(--ft-primary-50), #FFE0D6);
  color: var(--ft-primary);
  box-shadow: 0 2px 8px rgba(224,122,95,0.15);
}
.ft-mode-pill .pill-icon {
  font-size: 1rem;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .ft-hero h1 { font-size: 1.8rem; }
  .ft-hero p { font-size: 0.92rem; }
  .ft-stats { grid-template-columns: repeat(2, 1fr); }
  .ft-tab-btn { padding: 8px 12px; font-size: 0.82rem; }
  .schulte-grid.size-3x3 .schulte-cell { width: 70px; height: 70px; font-size: 1.6rem; }
  .schulte-grid.size-4x4 .schulte-cell { width: 65px; height: 65px; font-size: 1.4rem; }
  .schulte-grid.size-5x5 .schulte-cell { width: 60px; height: 60px; font-size: 1.3rem; }
  .schulte-grid.size-6x6 .schulte-cell { width: 54px; height: 54px; font-size: 1.15rem; }
  .schulte-grid.size-7x7 .schulte-cell { width: 48px; height: 48px; font-size: 1rem; }
  .schulte-grid.size-8x8 .schulte-cell { width: 44px; height: 44px; font-size: 0.9rem; }
  .schulte-grid.size-9x9 .schulte-cell { width: 40px; height: 40px; font-size: 0.85rem; }
  .schulte-status-bar { gap: 16px; padding: 12px 16px; }
  .schulte-timer { font-size: 1.6rem; min-width: 120px; }
  .ft-complete-modal { padding: 28px; }
  .ft-custom-grid { grid-template-columns: 1fr; }
}

/* ========== 路径迷宫游戏 ========== */
/* 左栏引导图 */
.maze-guide-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
}
.maze-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 3px;
}
.maze-guide-cell {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}
.maze-guide-cell.wall { background: linear-gradient(135deg, #8D7B68, #A89B8C); }
.maze-guide-cell.path { background: linear-gradient(135deg, #FFF8F0, #FFF3E0); border: 1px solid #E8DDD0; }
.maze-guide-cell.player { background: radial-gradient(circle, #4CAF50, #2E7D32); box-shadow: 0 2px 6px rgba(76,175,80,0.4); }
.maze-guide-cell.goal { background: radial-gradient(circle, #FFD54F, #FF8F00); box-shadow: 0 2px 6px rgba(255,193,7,0.4); }

/* 状态栏 */
.maze-status-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(255,253,249,0.95), rgba(255,248,240,0.95));
  border-radius: var(--ft-radius-sm);
  border: 1px solid var(--ft-rule);
  box-shadow: var(--ft-shadow);
}
.maze-stat {
  text-align: center;
  min-width: 56px;
}
.maze-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--ft-muted);
  font-weight: 600;
}
.maze-stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ft-ink);
  margin-top: 2px;
}

/* 迷宫网格 */
.maze-grid-wrapper {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
  border-radius: var(--ft-radius);
  border: 2px solid var(--ft-rule);
}
.maze-grid {
  display: grid;
  gap: 0;
  background: #8D7B68;
  padding: 4px;
  border-radius: var(--ft-radius-sm);
  box-shadow: var(--ft-shadow-lg);
}

/* 迷宫格子 */
.maze-cell {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}
.maze-cell.wall {
  background: linear-gradient(135deg, #8D7B68, #A89B8C);
  cursor: default;
}
.maze-cell.path {
  background: linear-gradient(135deg, #FFF8F0, #FFF3E0);
}
.maze-cell.path:hover {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
}
.maze-cell.visited {
  background: linear-gradient(135deg, #C8E6C9, #A5D6A7);
}
.maze-cell.start {
  background: linear-gradient(135deg, #81C784, #4CAF50);
}
.maze-cell.goal {
  background: linear-gradient(135deg, #FFD54F, #FF8F00);
}
.maze-cell.player {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.2);
  animation: mazePlayerPulse 1.5s ease-in-out infinite;
}
@keyframes mazePlayerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.maze-cell.hint {
  background: linear-gradient(135deg, #00BCD4, #0097A7) !important;
  box-shadow: inset 0 0 0 2px #fff, 0 0 12px rgba(0,188,212,0.5) !important;
  animation: mazeHintPulse 0.8s ease-in-out infinite;
}
@keyframes mazeHintPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.05); }
}
.maze-cell.backtracked {
  background: linear-gradient(135deg, #FFCCBC, #FFAB91);
}
.maze-cell.fog {
  background: #2D2A26;
  border-radius: 4px;
  opacity: 0.95;
  cursor: default;
}

/* 统一游戏区域居中包装器 */
.ft-game-playarea {
  width: fit-content;
  margin: 0 auto;
  max-width: 100%;
}

/* 迷宫信息面板 */
.maze-info-panel {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFDF9 100%);
  border-radius: var(--ft-radius-sm);
  border: 1px solid var(--ft-rule);
  padding: 20px;
  box-shadow: var(--ft-shadow);
}
.maze-info-section h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ft-ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.maze-info-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.maze-info-section li {
  font-size: 0.82rem;
  color: var(--ft-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.maze-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  background: var(--ft-primary-50);
  border: 1px solid var(--ft-primary-100);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ft-primary);
  white-space: nowrap;
}
.maze-info-divider {
  height: 1px;
  background: var(--ft-rule);
  margin: 16px 0;
}
.maze-best-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--ft-rule);
}
.maze-best-row:last-child {
  border-bottom: none;
}
.maze-best-label {
  font-size: 0.82rem;
  color: var(--ft-muted);
}
.maze-best-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ft-primary);
}

/* 响应式 */
@media (max-width: 768px) {
  .maze-cell { width: 24px; height: 24px; }
  .maze-guide-grid { grid-template-columns: repeat(3, 24px); }
  .maze-guide-cell { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
  .ft-container { padding: 0 12px 40px; }
  .ft-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .schulte-grid-wrapper { padding: 12px; }
  .schulte-grid { gap: 4px; }
  .schulte-controls { gap: 8px; }
  .ft-btn { padding: 10px 16px; font-size: 0.85rem; }
  .ft-achievements-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ========== 滚动显示动画 ========== */
.ft-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}
.ft-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== 训练记录/成就筛选按钮 ========== */
.ft-record-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.ft-record-filter {
  padding: 8px 18px;
  border-radius: 100px;
  border: 2px solid var(--ft-rule);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ft-text);
  cursor: pointer;
  transition: var(--ft-transition);
  font-family: inherit;
}
.ft-record-filter:hover {
  border-color: var(--ft-primary-100);
  background: var(--ft-primary-50);
}
.ft-record-filter.active {
  border-color: var(--ft-primary);
  background: linear-gradient(135deg, var(--ft-primary-50), #FFE0D6);
  color: var(--ft-primary);
  box-shadow: 0 2px 8px rgba(224,122,95,0.15);
}

/* ========== 成就统计摘要 ========== */
.ft-achievements-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.ft-ach-summary-item {
  background: linear-gradient(135deg, var(--ft-primary-50), var(--ft-orange-soft));
  border-radius: var(--ft-radius-xs);
  padding: 16px 8px;
  text-align: center;
  border: 1px solid var(--ft-primary-100);
}
.ft-ach-summary-item.total {
  background: linear-gradient(135deg, var(--ft-gold), #FF8F00);
  color: #fff;
  border: none;
}
.ft-ach-summary-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}
.ft-ach-summary-num {
  font-size: 1.1rem;
  font-weight: 800;
  display: block;
}
.ft-ach-group-title {
  grid-column: 1 / -1;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ft-primary);
  margin: 16px 0 8px;
  padding: 8px 16px;
  background: var(--ft-primary-50);
  border-radius: var(--ft-radius-xs);
  text-align: center;
}

/* ========== 设置面板游戏类型切换 ========== */
.ft-settings-game-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--ft-bg2);
  border-radius: 100px;
  border: 1px solid var(--ft-rule);
}
.ft-settings-game-tab {
  padding: 8px 20px;
  border-radius: 100px;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ft-muted);
  cursor: pointer;
  transition: var(--ft-transition);
  font-family: inherit;
}
.ft-settings-game-tab:hover {
  color: var(--ft-primary);
}
.ft-settings-game-tab.active {
  background: #fff;
  color: var(--ft-primary);
  box-shadow: var(--ft-shadow);
}
.ft-settings-panel {
  display: none;
}
.ft-settings-panel.active {
  display: block;
}

/* ========== 游戏区域AI装饰插画 ========== */
.ft-game-banner {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 20px;
  border-radius: var(--ft-radius-sm);
  overflow: hidden;
  box-shadow: var(--ft-shadow-md);
  border: 1px solid var(--ft-rule);
  background: #fff;
}
.ft-game-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========== 游戏面板：三段式布局 ========== */
/* 1. 顶部控制栏（模式+难度一行） */
/* 2. 主体左右分栏（左图右游戏） */
.ft-game-panel {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFDF9 100%);
  border-radius: var(--ft-radius);
  border: 1px solid var(--ft-rule);
  padding: 20px;
  box-shadow: var(--ft-shadow-md);
}

/* --- 顶部控制栏（轻量专业） --- */
.ft-top-control-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(255,253,249,0.5);
  border-radius: var(--ft-radius-sm);
  border: 1px solid rgba(240,232,224,0.5);
  margin-bottom: 14px;
}
.ft-control-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
}
.ft-control-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #B0A8A0;
  min-width: 32px;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.ft-control-divider {
  width: 1px;
  height: 24px;
  background: rgba(240,232,224,0.6);
  flex-shrink: 0;
}
.ft-top-control-bar .schulte-difficulty {
  gap: 5px;
  flex-wrap: nowrap;
}
.ft-top-control-bar .schulte-diff-btn {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-width: 1.5px;
}
.ft-top-control-bar .ft-mode-pills,
.ft-top-control-bar .memory-theme-pills {
  gap: 4px;
  flex-wrap: nowrap;
}

/* --- 主体左右分栏（左右等宽） --- */
.ft-main-body {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* 左栏：引导图片 */
.ft-main-left {
  flex: 1 1 0;
  min-width: 0;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}
.ft-guide-card {
  border-radius: var(--ft-radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(45,42,38,0.1);
  border: 1px solid var(--ft-rule);
  background: #fff;
  animation: ftGuideFloat 4s ease-in-out infinite;
}
@keyframes ftGuideFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(0.3deg); }
  75% { transform: translateY(4px) rotate(-0.2deg); }
}
.ft-guide-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========== 沉浸全屏模式 ========== */
.ft-game-panel.focus-mode {
  position: relative;
}
.ft-game-panel.focus-mode .ft-top-control-bar {
  opacity: 0;
  max-height: 0;
  padding: 0 14px;
  margin-bottom: 0;
  overflow: hidden;
  border: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ft-game-panel.focus-mode .ft-main-left {
  opacity: 0;
  width: 0;
  min-width: 0;
  flex: 0;
  padding: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.ft-game-panel.focus-mode .ft-guide-card {
  animation: none;
}
.ft-game-panel.focus-mode .ft-main-body {
  gap: 0;
}
.ft-game-panel.focus-mode .ft-main-right {
  flex: 1 1 auto;
  max-width: 600px;
  margin: 0 auto;
}
.ft-game-panel.focus-mode .schulte-grid-wrapper,
.ft-game-panel.focus-mode .memory-grid {
  box-shadow: 0 0 40px rgba(224,122,95,0.15), var(--ft-shadow-lg);
  border-color: var(--ft-primary-100);
}
.ft-game-panel.focus-mode .schulte-status-bar {
  background: linear-gradient(135deg, rgba(255,253,249,0.8), rgba(255,248,240,0.8));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* 退出沉浸模式按钮 */
.ft-focus-exit-btn {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(45,42,38,0.7);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  font-family: inherit;
}
.ft-focus-exit-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.ft-focus-exit-btn:hover {
  background: rgba(45,42,38,0.9);
  transform: scale(1.05);
}

/* 沉浸模式背景变暗 */
.ft-container.focus-active::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(45,42,38,0.08);
  z-index: -1;
  animation: ftDimIn 0.6s ease forwards;
}
@keyframes ftDimIn {
  from { opacity: 0; }
  to { opacity: 1;
  }
}

/* 右栏：游戏核心区 */
.ft-main-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ft-main-right .schulte-status-bar {
  justify-content: flex-start;
  gap: 20px;
}
.ft-main-right .schulte-controls {
  justify-content: flex-start;
}
.ft-main-right .memory-stats-bar {
  justify-content: flex-start;
}
.ft-main-right .memory-grid {
  margin: 0;
}
.ft-main-right .sudoku-numpad {
  justify-content: flex-start;
}

/* 控制按钮分隔符 */
.ft-controls-sep {
  width: 1px;
  height: 28px;
  background: var(--ft-rule);
  margin: 0 4px;
}

/* ========== 红绿灯反应游戏 ========== */
/* 左栏信号灯引导图 */
.traffic-guide-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  background: linear-gradient(135deg, #FFF8F0, #FFFDF9);
}
.traffic-guide-light {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.1);
  border: 3px solid #5A4E42;
}
.traffic-guide-light.green { background: radial-gradient(circle at 35% 35%, #81C784, #4CAF50); }
.traffic-guide-light.yellow { background: radial-gradient(circle at 35% 35%, #FFD54F, #FFC107); }
.traffic-guide-light.red { background: radial-gradient(circle at 35% 35%, #E57373, #F44336); }
.traffic-guide-stand {
  width: 12px;
  height: 40px;
  background: linear-gradient(90deg, #8D7B68, #A89B8C, #8D7B68);
  border-radius: 4px;
}

/* 状态栏 */
.traffic-status-bar {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(255,253,249,0.95), rgba(255,248,240,0.95));
  border-radius: var(--ft-radius-sm);
  border: 1px solid var(--ft-rule);
  box-shadow: var(--ft-shadow);
}
.traffic-stat {
  text-align: center;
  min-width: 56px;
}
.traffic-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--ft-muted);
  font-weight: 600;
}
.traffic-stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ft-ink);
  margin-top: 2px;
}
.green-text { color: var(--ft-green) !important; }
.red-text { color: #E53935 !important; }
.mistake-text { color: #E07A5F !important; }

/* 游戏核心区 */
.traffic-game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 320px;
  padding: 24px;
  background: linear-gradient(135deg, #FFFAF5, #FFFDF9);
  border-radius: var(--ft-radius);
  border: 2px solid var(--ft-rule);
  position: relative;
  overflow: hidden;
  width: fit-content;
  margin: 0 auto;
}

/* 信号灯主体 */
.traffic-signal {
  position: relative;
  width: 160px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #3E352F, #5A4E42);
  border-radius: 40px;
  box-shadow: 0 8px 32px rgba(45,42,38,0.3), inset 0 2px 4px rgba(255,255,255,0.05);
}
.traffic-light-housing {
  position: absolute;
  inset: 0;
  border-radius: 40px;
  border: 3px solid #2A231E;
  pointer-events: none;
}
.traffic-light-bulb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6B6B6B, #4A4A4A);
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.3), 0 1px 2px rgba(255,255,255,0.05);
  transition: all 0.15s ease;
  border: 3px solid #3A3A3A;
}

/* 信号灯点亮状态 */
.traffic-light-bulb.green-lit {
  background: radial-gradient(circle at 35% 35%, #81C784, #4CAF50);
  box-shadow: 0 0 40px rgba(76,175,80,0.6), 0 0 80px rgba(76,175,80,0.2), inset 0 2px 4px rgba(255,255,255,0.3);
  border-color: #388E3C;
  animation: greenPulse 1s ease-in-out infinite;
}
.traffic-light-bulb.yellow-lit {
  background: radial-gradient(circle at 35% 35%, #FFD54F, #FFC107);
  box-shadow: 0 0 30px rgba(255,193,7,0.5), 0 0 60px rgba(255,193,7,0.15), inset 0 2px 4px rgba(255,255,255,0.3);
  border-color: #F57F17;
}
.traffic-light-bulb.red-lit {
  background: radial-gradient(circle at 35% 35%, #E57373, #F44336);
  box-shadow: 0 0 40px rgba(244,67,54,0.6), 0 0 80px rgba(244,67,54,0.2), inset 0 2px 4px rgba(255,255,255,0.3);
  border-color: #C62828;
}
@keyframes greenPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(76,175,80,0.6), 0 0 80px rgba(76,175,80,0.2), inset 0 2px 4px rgba(255,255,255,0.3); }
  50% { box-shadow: 0 0 60px rgba(76,175,80,0.8), 0 0 100px rgba(76,175,80,0.3), inset 0 2px 4px rgba(255,255,255,0.3); }
}

/* 信号灯灯座 */
.traffic-signal::after {
  content: '';
  position: absolute;
  bottom: -20px;
  width: 24px;
  height: 30px;
  background: linear-gradient(90deg, #5A4E42, #7A6E62, #5A4E42);
  border-radius: 4px;
}

/* 游戏区提示文字 */
.traffic-instruction {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ft-muted);
  text-align: center;
  min-height: 28px;
}
.traffic-reaction-time {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--ft-primary);
  font-variant-numeric: tabular-nums;
  min-height: 48px;
  text-align: center;
}

/* 游戏区点击层（覆盖整个区域） */
.traffic-game-area.clickable {
  cursor: pointer;
}
.traffic-game-area.clickable:active {
  transform: scale(0.995);
}

/* 点击正确反馈 */
.traffic-game-area.hit-good {
  animation: trafficHitGood 0.3s ease;
}
@keyframes trafficHitGood {
  0% { box-shadow: inset 0 0 0 0 rgba(76,175,80,0); }
  50% { box-shadow: inset 0 0 60px 20px rgba(76,175,80,0.15); }
  100% { box-shadow: inset 0 0 0 0 rgba(76,175,80,0); }
}

/* 抑制成功反馈 */
.traffic-game-area.inhibit-good {
  animation: trafficInhibitGood 0.3s ease;
}
@keyframes trafficInhibitGood {
  0% { box-shadow: inset 0 0 0 0 rgba(255,193,7,0); }
  50% { box-shadow: inset 0 0 60px 20px rgba(255,193,7,0.1); }
  100% { box-shadow: inset 0 0 0 0 rgba(255,193,7,0); }
}

/* 错误反馈（红灯点击） */
.traffic-game-area.hit-bad {
  animation: trafficHitBad 0.4s ease;
}
@keyframes trafficHitBad {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

/* 响应式：小屏幕恢复堆叠 */
@media (max-width: 768px) {
  .ft-game-panel {
    padding: 14px;
  }
  .ft-top-control-bar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .ft-control-divider {
    width: 100%;
    height: 1px;
  }
  .ft-main-body {
    flex-direction: column;
  }
  .ft-main-left {
    flex: none;
    width: 100%;
    position: static;
  }
  .ft-guide-card {
    max-width: 280px;
    margin: 0 auto;
  }
  .ft-main-right {
    align-items: center;
  }
  .ft-main-right .schulte-status-bar,
  .ft-main-right .schulte-controls,
  .ft-main-right .memory-stats-bar,
  .ft-main-right .sudoku-numpad {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .ft-achievements-summary { grid-template-columns: repeat(2, 1fr); }
  .ft-ach-group-title { grid-column: 1 / -1; }
}

/* ========== 星级评分（完成弹窗） ========== */
.complete-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}
.complete-stars .star {
  font-size: 2.4rem;
  color: #E0E0E0;
  transition: all 0.3s ease;
}
.complete-stars .star.gold {
  color: #FFB74D;
  filter: drop-shadow(0 2px 4px rgba(255,183,77,0.4));
  animation: starPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.complete-stars .star:nth-child(2).gold { animation-delay: 0.1s; }
.complete-stars .star:nth-child(3).gold { animation-delay: 0.2s; }
@keyframes starPop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ========== 训练报告 ========== */
.ft-report-section h3 { font-size: 1.1rem; font-weight: 700; color: var(--ft-ink); }
.ft-report-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.ft-report-card {
  flex: 1;
  min-width: 260px;
  background: linear-gradient(135deg, #FFFFFF, #FFFDF9);
  border-radius: var(--ft-radius-sm);
  padding: 16px;
  box-shadow: var(--ft-shadow);
  border: 1px solid var(--ft-rule);
}
.ft-report-card canvas {
  width: 100%;
  height: auto;
}
