/**
 * Ponics Classroom Theme System (v2 精修版)
 * 自然拼读儿童 3D 萌系主题 - 消除暗黑夜店感，修复顶栏吸顶与空闲遮挡白块
 */

/* 1. 全局调色板 */
:root {
  --pn-emerald: #10b981;
  --pn-emerald-dark: #059669;
  --pn-amber: #f59e0b;
  --pn-sky: #38bdf8;
  --pn-coral: #fb7185;
  --pn-cream: #faf7ee;
  --pn-glass-bg: rgba(255, 255, 255, 0.9);
  --pn-glass-border: rgba(255, 255, 255, 0.75);
  --pn-text-main: #1e293b;
  --pn-text-muted: #64748b;
}

/* 2. 喊麦王 (Hanmai Studio) 完美少儿化与视口保顶 */
body.chant-studio.hanmai-enhanced {
  background: #f0fdf4 !important;
  color: var(--pn-text-main) !important;
  min-height: 100vh !important;
}

body.chant-studio.hanmai-enhanced .hanmai-app {
  background: var(--pn-glass-bg) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 2px solid var(--pn-glass-border) !important;
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  border-radius: 20px !important;
  margin: 6px auto !important;
}

/* 顶栏吸顶固定，永不滚出屏幕视野！ */
body.chant-studio.hanmai-enhanced .hm-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 2px solid rgba(16, 185, 129, 0.2) !important;
  color: var(--pn-text-main) !important;
  border-radius: 20px 20px 0 0 !important;
  padding: 10px 18px !important;
}

body.chant-studio.hanmai-enhanced .hm-logo {
  color: #065f46 !important;
  text-shadow: none !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 20px !important;
}
body.chant-studio.hanmai-enhanced .hm-logo::before {
  content: "🦕" !important;
  font-size: 22px !important;
}

/* 按钮积木化、圆角化 */
body.chant-studio.hanmai-enhanced .hm-btn {
  background: #ffffff !important;
  color: #065f46 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
  border-bottom: 3px solid #10b981 !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  padding: 6px 14px !important;
  min-height: 36px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.15s ease !important;
}
body.chant-studio.hanmai-enhanced .hm-btn:hover {
  background: #ecfdf5 !important;
  transform: translateY(-1px) !important;
}
body.chant-studio.hanmai-enhanced .hm-btn:active {
  transform: translateY(2px) !important;
  border-bottom-width: 1px !important;
}

/* 开始游戏主操作按钮 - 阳光金橙 */
body.chant-studio.hanmai-enhanced .hm-btn.primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #ffffff !important;
  border: 1px solid #f59e0b !important;
  border-bottom: 3px solid #d97706 !important;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35) !important;
  font-weight: 900 !important;
}

/* 舞台背景：透明阳光，透出 Poni 森林音乐会场景 */
body.chant-studio.hanmai-enhanced .hm-stage {
  background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.08)), var(--cs-scene) center/cover !important;
  border-radius: 0 0 20px 20px !important;
  min-height: min(540px, 62vh) !important;
  padding: 16px !important;
}

/* 关键修复：未开始/静止状态下彻底消除大白板！透明无遮挡展示小恐龙！ */
.cs-block {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 只有激活打拍子或填词时，才弹出晶莹翡翠积木词卡 */
.cs-block.active,
.cs-block.filled {
  background: rgba(240, 253, 244, 0.94) !important;
  border: 3px solid #10b981 !important;
  border-radius: 20px !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2), 0 12px 24px rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(8px) !important;
}
.cs-block.active span,
.cs-block.filled span {
  color: #065f46 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

/* 舞台顶部提示条 */
.cs-stage-head {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(16, 185, 129, 0.25) !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
  padding: 8px 16px !important;
}
.cs-stage-head b {
  color: #059669 !important;
}

/* 3. 警察抓小偷优化 */
body.ad-game[data-game="police"] {
  background: #f0fdf4 !important;
}
body.ad-game[data-game="police"] .ad-app {
  border-radius: 20px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08) !important;
}

/* 4. Arcade 类顶栏通透化 */
.arcade2-top {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 2px solid rgba(16, 185, 129, 0.15) !important;
}
