/* 快乐汉字学堂 - 进阶互动样式表 */
:root {
  --primary-color: #ff6b6b;
  --primary-hover: #fa5252;
  --secondary-color: #4dabf7;
  --success-color: #51cf66;
  --warning-color: #fcc419;
  --purple-color: #845ef7;
  --bg-color: #fcf9f2;
  --card-bg: #ffffff;
  --text-main: #2d3748;
  --text-muted: #718096;
  --mizi-border: #d9383a;
  --mizi-line: #fca5a5;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(220, 100, 50, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Comic Sans MS", "Chalkboard SE", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 顶部导航 */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 3px solid #ffeedb;
}

.header-left .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  font-size: 32px;
  animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.logo-text h1 {
  font-size: 22px;
  font-weight: 800;
  color: #ff6b4a;
  letter-spacing: 1px;
}

.logo-text .sub-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* 成就星级宝箱按钮 */
.header-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.star-chest-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fff3bf, #ffd43b);
  border: 2px solid #fab005;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 0 #e67700;
  transition: all 0.15s;
}

.star-chest-badge:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #e67700;
}

.chest-star-icon {
  font-size: 18px;
  animation: spinSlow 6s linear infinite;
}

@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.chest-star-count {
  font-size: 16px;
  font-weight: 900;
  color: #d9480f;
}

.chest-title {
  font-size: 13px;
  font-weight: 800;
  color: #a61e4d;
}

/* 快捷输入与切换 */
.quick-input-box {
  display: flex;
  align-items: center;
  background: #fff4eb;
  padding: 4px 6px;
  border-radius: var(--radius-md);
  border: 2px solid #ffd8bf;
}

.quick-input-box input {
  width: 50px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  border: none;
  background: transparent;
  outline: none;
  color: #d4380d;
}

.quick-input-box input::placeholder {
  font-size: 13px;
  font-weight: normal;
  color: #ffa39e;
}

.nav-prev-next {
  display: flex;
  gap: 6px;
}

.btn-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #ffd8bf;
  background: #fff;
  font-size: 15px;
  font-weight: bold;
  color: #fa541c;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 3px 0 #ffd8bf;
}

.btn-circle:active {
  transform: translateY(3px);
  box-shadow: none;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #e9ecef;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 3px 0 #dee2e6;
}

.btn-icon:active {
  transform: translateY(3px);
  box-shadow: none;
}

.btn-bubble {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: bold;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-orange {
  background: #ff7a45;
  color: #fff;
  box-shadow: 0 4px 0 #d4380d;
}

.btn-orange:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-green {
  background: #52c41a;
  color: #fff;
  box-shadow: 0 4px 0 #389e0d;
}

.btn-green:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* 汉字信息卡片 */
.char-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 2px dashed #ffc069;
  box-shadow: var(--shadow-sm);
}

.char-pinyin-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.char-pinyin {
  font-size: 32px;
  font-weight: 800;
  color: #d4380d;
  font-family: "Lucida Sans", "Trebuchet MS", sans-serif;
  letter-spacing: 2px;
}

.btn-speaker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e6f7ff;
  border: 2px solid #91d5ff;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  color: #096dd9;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 3px 0 #91d5ff;
  transition: all 0.15s;
}

.btn-speaker:active {
  transform: translateY(3px);
  box-shadow: none;
}

.speaker-wave {
  font-size: 18px;
}

/* 汉字变身大按钮 */
.btn-magic-transform {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d0bfff, #b197fc);
  color: #49129e;
  border: 2px solid #9775fa;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #7048e8;
  transition: all 0.15s;
}

.btn-magic-transform:active {
  transform: translateY(4px);
  box-shadow: none;
}

.magic-icon {
  font-size: 18px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.char-meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-badge {
  background: #f4f5f7;
  color: #555;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.tag-highlight {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}

/* 核心舞台与伴学小熊猫 */
.stage-section {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  width: 100%;
}

/* 伴学小萌宠侧栏 */
.pet-companion-box {
  width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pet-speech-bubble {
  position: relative;
  background: #ffffff;
  border: 3px solid #ffb020;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(255, 176, 32, 0.2);
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #795548;
  line-height: 1.4;
  animation: floatBubble 3s ease-in-out infinite;
}

.pet-speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: #ffb020 transparent;
  display: block;
  width: 0;
}

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.pet-avatar {
  width: 86px;
  height: 86px;
  background: linear-gradient(135deg, #fff3bf, #ffe066);
  border: 4px solid #fcc419;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 0 #e67700;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pet-avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

.pet-avatar:active {
  transform: scale(0.95);
  box-shadow: 0 2px 0 #e67700;
}

.pet-face {
  font-size: 46px;
  animation: petWobble 4s ease-in-out infinite;
}

@keyframes petWobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

/* 主写字舞台区域 */
.stage-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
  background: #ffffff;
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 3px solid #ffe8d6;
}

/* 鼓励横幅浮层 */
.encouragement-banner {
  position: absolute;
  top: 10px;
  background: linear-gradient(135deg, #ff922b, #ff6b6b);
  color: white;
  padding: 8px 24px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(255, 107, 107, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hidden {
  display: none !important;
}

/* 象形字变身大卡片浮层 */
.transform-card {
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(135deg, #fff9db, #fff3bf);
  border: 4px solid #fab005;
  border-radius: var(--radius-lg);
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(250, 176, 5, 0.3);
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-close-card {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #ffe066;
  font-size: 22px;
  cursor: pointer;
  color: #666;
  font-weight: bold;
}

.transform-visual {
  font-size: 96px;
  animation: bounce 2s infinite;
}

.transform-title {
  font-size: 24px;
  font-weight: 900;
  color: #e67700;
}

.transform-desc {
  font-size: 16px;
  color: #795548;
  font-weight: 700;
  text-align: center;
  max-width: 380px;
  line-height: 1.6;
}

/* 听音辨字小游戏浮层 */
.game-panel {
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: #f8f9fa;
  border: 4px solid #4dabf7;
  border-radius: var(--radius-lg);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

.game-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.game-badge {
  background: #339af0;
  color: white;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
}

.game-question {
  font-size: 18px;
  font-weight: 900;
  color: #1864ab;
}

.game-cards-container {
  display: flex;
  gap: 16px;
}

.game-card-btn {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  border: 3px solid #74c0fc;
  background: white;
  font-size: 42px;
  font-weight: 900;
  color: #1971c2;
  cursor: pointer;
  box-shadow: 0 6px 0 #4dabf7;
  transition: all 0.15s;
}

.game-card-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #4dabf7;
}

.game-card-btn.correct {
  background: #d3f9d8;
  border-color: #40c057;
  box-shadow: 0 0 16px #40c057;
  transform: scale(1.1);
}

.game-card-btn.wrong {
  background: #ffe3e3;
  border-color: #fa5252;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.game-feedback {
  font-size: 16px;
  font-weight: 800;
  min-height: 24px;
}

/* 米字格大舞台 */
.character-board-wrapper {
  position: relative;
  width: 350px;
  height: 350px;
  background: #fffdfa;
  border: 4px solid var(--mizi-border);
  border-radius: 14px;
  box-shadow: inset 0 0 10px rgba(217, 56, 58, 0.08), 0 8px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  touch-action: none;
}

.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--mizi-border);
}

.corner-tl { top: 4px; left: 4px; border-right: none; border-bottom: none; }
.corner-tr { top: 4px; right: 4px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 4px; left: 4px; border-right: none; border-top: none; }
.corner-br { bottom: 4px; right: 4px; border-left: none; border-top: none; }

.mizi-grid {
  position: relative;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, transparent 49.5%, var(--mizi-line) 49.5%, var(--mizi-line) 50.5%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, var(--mizi-line) 49.5%, var(--mizi-line) 50.5%, transparent 50.5%),
    linear-gradient(45deg, transparent 49.6%, var(--mizi-line) 49.6%, var(--mizi-line) 50.4%, transparent 50.4%),
    linear-gradient(-45deg, transparent 49.6%, var(--mizi-line) 49.6%, var(--mizi-line) 50.4%, transparent 50.4%);
}

.character-target {
  display: flex;
  justify-content: center;
  align-items: center;
}

.character-target svg {
  width: 100% !important;
  height: 100% !important;
}

/* 粒子与画板 Canvas */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.free-draw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: crosshair;
}

.stroke-hint-bubble {
  position: absolute;
  bottom: -40px;
  background: #333;
  color: #fff;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: bold;
}

/* 魔法画笔切换条 */
.magic-brush-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e9ecef;
  flex-wrap: wrap;
  justify-content: center;
}

.magic-label {
  font-size: 13px;
  font-weight: 700;
  color: #868e96;
}

.brush-chip {
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  background: white;
  font-size: 13px;
  font-weight: 700;
  color: #495057;
  cursor: pointer;
  transition: all 0.15s;
}

.brush-chip.active {
  background: #7048e8;
  color: white;
  border-color: #7048e8;
  box-shadow: 0 2px 6px rgba(112, 72, 232, 0.3);
}

/* 控制面板 */
.control-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.mode-tabs {
  display: flex;
  background: #f1f3f5;
  padding: 6px;
  border-radius: 40px;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: 30px;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn.active {
  background: #fff;
  color: #ff6b6b;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
  transform: scale(1.05);
}

.panel-sub {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.panel-sub.active {
  display: flex;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.btn-pill {
  padding: 9px 18px;
  border-radius: 30px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b6b, #fa5252);
  color: white;
  box-shadow: 0 4px 0 #c92a2a;
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #4dabf7, #339af0);
  color: white;
  box-shadow: 0 4px 0 #1864ab;
}

.btn-secondary:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-yellow {
  background: linear-gradient(135deg, #fcc419, #fab005);
  color: #5c3b00;
  box-shadow: 0 4px 0 #d97706;
}

.btn-yellow:active {
  transform: translateY(4px);
  box-shadow: none;
}

.speed-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid #e9ecef;
}

.speed-label {
  font-size: 13px;
  font-weight: 700;
  color: #868e96;
}

.btn-speed {
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #ced4da;
  background: white;
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
}

.btn-speed.active {
  background: #ff6b6b;
  color: white;
  border-color: #ff6b6b;
}

.quiz-tips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.star-rating {
  font-size: 24px;
  letter-spacing: 4px;
}

.progress-text {
  font-size: 15px;
  font-weight: 700;
  color: #fa5252;
}

.free-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.color-palette {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 6px 14px;
  border-radius: 30px;
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}

.color-dot.active {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px #ff6b6b;
}

/* 笔画分步拆解区与字库 */
.stroke-breakdown-section, .wordbank-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  border: 2px solid #ffeedb;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title h3 {
  font-size: 16px;
  font-weight: 800;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stroke-steps-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px;
  scrollbar-width: thin;
}

.step-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fffdf9;
  border: 2px solid #ffd8bf;
  border-radius: 12px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.step-card:hover, .step-card.active {
  border-color: #ff6b6b;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(255, 107, 107, 0.2);
}

.step-mini-char {
  width: 56px;
  height: 56px;
  border: 1px dashed #ffa39e;
  border-radius: 6px;
}

.step-info {
  font-size: 12px;
  font-weight: 700;
  color: #fa541c;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cat-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #ffd591;
  background: #fffbe6;
  color: #d46b08;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cat-tab.active {
  background: #ff7a45;
  color: white;
  border-color: #ff7a45;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.char-item-btn {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid #ffe7ba;
  background: #ffffff;
  font-size: 22px;
  font-weight: 800;
  color: #434343;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 3px 0 #ffd591;
}

.char-item-btn:hover {
  border-color: #ff7a45;
  color: #ff7a45;
  transform: scale(1.08);
}

.char-item-btn.active {
  background: #ff7a45;
  color: white;
  border-color: #d4380d;
  box-shadow: 0 3px 0 #ad2102;
}

/* 字卡宝箱模态窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 4px solid #ffd43b;
  overflow: hidden;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #fff9db;
  border-bottom: 2px solid #ffe066;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title h3 {
  font-size: 18px;
  color: #e67700;
  font-weight: 800;
}

.btn-close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #ffe066;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.achievement-banner {
  background: linear-gradient(135deg, #fff3bf, #ffe066);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  border: 2px solid #fcc419;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge-icon {
  font-size: 42px;
}

.badge-info h4 {
  font-size: 17px;
  font-weight: 900;
  color: #d9480f;
}

.badge-info p {
  font-size: 13px;
  color: #795548;
  font-weight: 700;
}

.unlocked-section h4 {
  font-size: 14px;
  font-weight: 800;
  color: #495057;
  margin-bottom: 10px;
}

.unlocked-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.unlocked-card {
  aspect-ratio: 1;
  background: #fff3bf;
  border: 2px solid #fab005;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 900;
  color: #d9480f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(250, 176, 5, 0.2);
  transition: transform 0.15s;
}

.unlocked-card:hover {
  transform: scale(1.15);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.app-footer {
  text-align: center;
  font-size: 12px;
  color: #adb5bd;
  padding: 8px 0 16px;
}

/* 响应式调整 (手机) */
@media (max-width: 768px) {
  .stage-section {
    flex-direction: column;
    align-items: center;
  }
  .pet-companion-box {
    width: 100%;
    flex-direction: row;
    justify-content: center;
  }
  .pet-speech-bubble {
    width: auto;
    max-width: 280px;
    font-size: 12px;
  }
  .pet-speech-bubble::after {
    left: auto;
    right: -10px;
    bottom: 50%;
    transform: translateY(50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #ffb020;
  }
  .character-board-wrapper {
    width: 290px;
    height: 290px;
  }
  .char-pinyin {
    font-size: 26px;
  }
}
