/*
 * ============================================
 * 通用UI质感组件库 - ui-theme.css
 * 所有游戏共享，通过CSS变量切换主题色
 * 设计语言：多层边框+金边强调+毛玻璃层次
 * ============================================
 */

/* ---- 主题变量（默认：古风墨绿）---- */
:root {
  /* 主色调 */
  --theme-primary: #2d5a4a;
  --theme-primary-light: #3a7a5a;
  --theme-primary-dark: #1a4030;

  /* 强调色 */
  --theme-accent: #c9a227;
  --theme-accent-light: #ffd700;
  --theme-accent-dark: #8b6914;

  /* 内容区背景 */
  --theme-bg-content: #f5e6d0;
  --theme-bg-content-alt: #faf0e4;
  --theme-bg-panel: rgba(26, 64, 48, 0.92);

  /* 文字色 */
  --theme-text-primary: #f5e6d0;
  --theme-text-secondary: rgba(212, 168, 67, 0.65);
  --theme-text-accent: #ffd700;

  /* 阴影 */
  --theme-shadow-gold: 0 4px 20px rgba(201, 162, 39, 0.3);
  --theme-shadow-deep: 0 6px 24px rgba(0, 0, 0, 0.4);
  --theme-shadow-inset: inset 0 1px 0 rgba(255, 215, 0, 0.08), inset 0 -3px 10px rgba(0, 0, 0, 0.25);

  /* 边框 */
  --theme-border-gold: 2px solid var(--theme-accent);
  --theme-border-gold-thin: 1px solid rgba(201, 162, 39, 0.35);

  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 50px;

  /* 过渡 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.32s ease;
  --transition-slow: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* 毛玻璃 */
  --blur-sm: blur(8px);
  --blur-md: blur(16px);
  --blur-lg: blur(24px);
}

/* ---- 基础重置 ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden;
  font-family: 'STKaiti', 'KaiTi', '楷体', 'SimSun', serif;
  -webkit-tap-highlight-color: transparent; user-select: none;
}

/* ==========================================
   一、质感面板 (核心组件)
   三层结构：外金框 → 内深衬 → 内容区
   ========================================== */

.panel-premium {
  position: relative;
  background: linear-gradient(160deg,
    var(--theme-bg-content) 0%,
    var(--theme-bg-content-alt) 50%,
    var(--theme-bg-content) 100%);
  border: 3px solid var(--theme-accent);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.45),
    inset 0 -3px 8px rgba(0, 0, 0, 0.12),
    var(--theme-shadow-gold),
    var(--theme-shadow-deep);
}

/* 面板四角装饰 */
.panel-premium::before,
.panel-premium::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 3px solid var(--theme-accent);
  pointer-events: none;
}
.panel-premium::before {
  top: -3px; left: -3px;
  border-right: none; border-bottom: none;
  border-top-left-radius: var(--radius-lg);
}
.panel-premium::after {
  bottom: -3px; right: -3px;
  border-left: none; border-top: none;
  border-bottom-right-radius: var(--radius-lg);
}

/* 深色面板变体 */
.panel-dark {
  background: linear-gradient(160deg,
    var(--theme-primary) 0%,
    var(--theme-primary-dark) 100%);
  color: var(--theme-text-primary);
  border: 3px solid var(--theme-accent);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.08),
    inset 0 -3px 8px rgba(0, 0, 0, 0.35),
    var(--theme-shadow-gold),
    var(--theme-shadow-deep);
}

/* 毛玻璃面板 */
.panel-glass {
  background: linear-gradient(160deg,
    rgba(45, 90, 74, 0.75),
    rgba(26, 64, 48, 0.85));
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-md);
  box-shadow: var(--theme-shadow-deep);
}

/* 卷轴式面板（参考图风格）*/
.panel-scroll {
  position: relative;
  background: linear-gradient(180deg,
    var(--theme-bg-content) 0%,
    var(--theme-bg-content-alt) 50%,
    var(--theme-bg-content) 100%);
  border-left: 4px solid var(--theme-accent);
  border-right: 4px solid var(--theme-accent);
  border-top: 2px solid var(--theme-accent);
  border-bottom: 2px solid var(--theme-accent);
  border-radius: var(--radius-lg);
  padding: 18px 28px;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    var(--theme-shadow-gold),
    var(--theme-shadow-deep);
}
/* 卷轴两端装饰 */
.panel-scroll::before,
.panel-scroll::after {
  content: '';
  position: absolute;
  top: -4px; bottom: -4px;
  width: 14px;
  background: linear-gradient(180deg,
    var(--theme-accent) 0%, var(--theme-accent-dark) 50%, var(--theme-accent) 100%);
  border: 2px solid var(--theme-accent-dark);
  border-radius: 8px;
  z-index: 2;
}
.panel-scroll::before { left: -8px; }
.panel-scroll::after { right: -8px; }

/* ==========================================
   二、金字标题
   ========================================== */

.title-gold {
  font-weight: bold;
  letter-spacing: 6px;
  text-align: center;
  background: linear-gradient(180deg,
    var(--theme-accent-light) 0%,
    #fff5cc 30%,
    #ffffff 48%,
    #fff5cc 65%,
    var(--theme-accent) 100%);
  background-size: 100% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 3px 6px rgba(201, 162, 39, 0.5));
}

.title-large { font-size: 42px; }
.title-medium { font-size: 28px; }
.title-small { font-size: 20px; }

/* 标题逐字入场动画 */
@keyframes char-appear {
  0% { opacity: 0; transform: translateY(36px) rotate(-6deg); filter: blur(4px); }
  40% { opacity: 1; transform: translateY(-6px) rotate(2deg); filter: blur(0); }
  70% { transform: translateY(3px) rotate(-1deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}
.char-animate {
  display: inline-block;
  animation: char-appear 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* ==========================================
   三、按钮系统
   ========================================== */

/* 主按钮（卷轴内嵌式，参考图PLAY按钮）*/
.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 52px;
  font-family: inherit;
  font-size: 19px;
  font-weight: bold;
  letter-spacing: 5px;
  color: var(--theme-accent-light);
  background: linear-gradient(180deg,
    var(--theme-primary-light) 0%,
    var(--theme-primary) 50%,
    var(--theme-primary-dark) 100%);
  border: 2px solid var(--theme-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-slow);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -4px 12px rgba(0, 0, 0, 0.25),
    0 6px 24px rgba(0, 0, 0, 0.35);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}
.btn-play:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: var(--theme-accent-light);
  box-shadow:
    inset 0 2px 0 rgba(255, 215, 0, 0.2),
    inset 0 -4px 12px rgba(0, 0, 0, 0.25),
    0 12px 36px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(201, 162, 39, 0.15);
}
.btn-play:active { transform: scale(0.96) translateY(0); }

/* 扫光效果 */
.btn-play::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 220%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.12), transparent);
  transition: left 0.6s ease;
}
.btn-play:hover::after { left: 100%; }

/* 脉冲发光 */
.btn-glow {
  animation: glow-pulse 2.5s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -4px 12px rgba(0, 0, 0, 0.25),
    0 6px 24px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(201, 162, 39, 0.4); }
  50% { box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -4px 12px rgba(0, 0, 0, 0.25),
    0 6px 24px rgba(0, 0, 0, 0.35),
    0 0 28px rgba(201, 162, 39, 0.65); }
}

/* 次级按钮 */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 38px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--theme-text-accent);
  background: rgba(45, 90, 74, 0.35);
  backdrop-filter: var(--blur-sm);
  border: 2px solid rgba(201, 162, 39, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: inset 0 1px 0 rgba(255, 215, 0, 0.08);
}
.btn-secondary:hover {
  background: rgba(180, 60, 60, 0.25);
  border-color: rgba(201, 162, 39, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* 危险/退出按钮 */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 44px;
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--theme-text-accent);
  background: linear-gradient(180deg, #5a2020 0%, #3a1515 100%);
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(60, 14, 14, 0.45);
}

/* 圆形道具按钮（参考图圆形工具按钮）*/
.btn-tool-circle {
  position: relative;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: linear-gradient(180deg,
    var(--theme-primary) 0%,
    var(--theme-primary-dark) 100%);
  border: 3px solid var(--theme-accent);
  cursor: pointer;
  transition: all var(--transition-slow);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
  color: var(--theme-text-primary);
  font-size: 11px;
}
.btn-tool-circle .tool-icon { font-size: 22px; line-height: 1; }
.btn-tool-circle .tool-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  background: linear-gradient(135deg, #e07850, #c23a3a);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--theme-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.btn-tool-circle:hover {
  transform: scale(1.1);
  border-color: var(--theme-accent-light);
  box-shadow: 0 4px 18px rgba(201, 162, 39, 0.35);
}
.btn-tool-circle:active { transform: scale(0.95); }
.btn-tool-circle.disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.5);
}

/* 返回按钮 */
.btn-back {
  background: none;
  border: none;
  color: var(--theme-text-secondary);
  font-size: 16px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
}
.btn-back:hover {
  background: rgba(180, 40, 40, 0.2);
  color: var(--theme-text-accent);
  transform: translateX(-3px);
}

/* 图标按钮 */
.btn-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(45, 90, 74, 0.4);
  border: 2px solid rgba(201, 162, 39, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-slow);
  backdrop-filter: var(--blur-sm);
}
.btn-icon:hover {
  background: rgba(180, 40, 40, 0.3);
  border-color: rgba(201, 162, 39, 0.6);
  transform: rotate(360deg) scale(1.12);
}

/* ==========================================
   四、资源条 / HUD
   ========================================== */

/* 胶囊形资源条（参考图Lives/Coin样式）*/
.resource-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: linear-gradient(180deg,
    rgba(26, 64, 48, 0.9),
    rgba(26, 64, 48, 0.95));
  border: 2px solid var(--theme-accent);
  border-radius: var(--radius-pill);
  color: var(--theme-text-accent);
  font-size: 15px;
  font-weight: bold;
  box-shadow:
    inset 0 1px 0 rgba(255, 215, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.25);
}
.resource-pill .res-icon { font-size: 17px; }
.resource-pill .res-value {
  color: var(--theme-accent-light);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* 精致进度条（参考图Score进度条）*/
.progress-premium {
  position: relative;
  width: 100%;
  height: 16px;
  background: var(--theme-primary-dark);
  border: 2px solid var(--theme-accent);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.2);
}
.progress-premium-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--theme-primary-light),
    #6aba8a,
    var(--theme-primary-light));
  border-radius: 7px;
  transition: width 0.35s ease;
  box-shadow: 0 0 8px rgba(74, 154, 106, 0.5);
  position: relative;
}
.progress-premium-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%);
  animation: progress-shimmer 2s ease-in-out infinite;
}
@keyframes progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 进度条危险状态（低值时变红）*/
.progress-premium.danger .progress-premium-fill {
  background: linear-gradient(90deg, #a03030, #c85050, #a03030);
  box-shadow: 0 0 8px rgba(200, 80, 80, 0.5);
}

/* ==========================================
   五、弹窗/遮罩层
   ========================================== */

.overlay-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: var(--blur-md);
  -webkit-backdrop-filter: var(--blur-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: overlay-fade-in 0.25s ease-out;
}
@keyframes overlay-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-panel {
  background: linear-gradient(160deg,
    var(--theme-bg-content) 0%,
    var(--theme-bg-content-alt) 100%);
  border: 3px solid var(--theme-accent);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  max-width: 360px;
  width: 88%;
  text-align: center;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.45),
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(201, 162, 39, 0.15);
  animation: panel-pop-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes panel-pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.overlay-panel h2 {
  margin-bottom: 16px;
}
.overlay-panel .overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* ==========================================
   六、底部导航栏（参考图BOTTOM NAVIGATION）
   ========================================== */

.bottom-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 12px;
  background: linear-gradient(180deg,
    var(--theme-primary) 0%,
    var(--theme-primary-dark) 100%);
  border-top: 3px solid var(--theme-accent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow:
    0 -4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 215, 0, 0.1);
  position: relative;
}
.bottom-nav-bar::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 8px;
  background: var(--theme-accent);
  border-radius: 4px 4px 0 0;
}

.nav-slot {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(180deg,
    rgba(26, 64, 48, 0.8),
    rgba(15, 30, 24, 0.9));
  border: 2.5px solid var(--theme-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}
.nav-slot:hover {
  transform: scale(1.1);
  border-color: var(--theme-accent-light);
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.4);
}
.nav-slot .nav-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  background: #c23a3a;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--theme-accent);
}

/* ==========================================
   七、卡片组件
   ========================================== */

.card-premium {
  position: relative;
  background: linear-gradient(160deg,
    rgba(45, 90, 74, 0.5),
    rgba(26, 64, 48, 0.4));
  border: 2px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 215, 0, 0.06);
  overflow: hidden;
}
.card-premium::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg,
    rgba(255, 215, 0, 0.03),
    transparent 50%,
    rgba(255, 215, 0, 0.02));
  pointer-events: none;
}
.card-premium::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 200%; height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 215, 0, 0.05),
    transparent);
  animation: gold-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gold-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.card-premium:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255, 215, 0, 0.65);
  box-shadow:
    0 12px 36px rgba(139, 26, 26, 0.4),
    0 0 24px rgba(201, 162, 39, 0.12),
    inset 0 1px 0 rgba(255, 215, 0, 0.1);
}
.card-premium:active { transform: scale(0.97); }
.card-premium.locked {
  filter: brightness(0.4) saturate(0.3);
  cursor: not-allowed;
}
.card-premium.locked:hover {
  transform: none;
  border-color: rgba(201, 162, 39, 0.2);
  box-shadow: none;
}

/* ==========================================
   八、动画工具类
   ========================================== */

/* 入场动画 */
.animate-slide-up {
  animation: slide-up-fade 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(40px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-scale-in {
  animation: scale-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}
@keyframes scale-pop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.animate-float {
  animation: float-gentle 3s ease-in-out infinite;
}
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 减少动效模式支持 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================
   九、滚动列表优化
   ========================================== */

.scroll-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }

/* ==========================================
   十、广告加载遮罩
   ========================================== */

.ad-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 28px;
}
.ad-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(201, 162, 39, 0.2);
  border-top-color: var(--theme-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ad-loading-text {
  color: var(--theme-text-accent);
  font-size: 16px;
  font-weight: bold;
}
.ad-loading-tip {
  color: var(--theme-text-secondary);
  font-size: 13px;
}

/* ==========================================
   十一、连击弹窗
   ========================================== */

.combo-popup {
  position: fixed;
  top: 35%; left: 50%;
  transform: translate(-50%, -50%) scale(0.15);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
}
.combo-popup.show {
  animation: combo-pop 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes combo-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
  27% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  46% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}
.combo-number {
  font-size: 48px;
  font-weight: bold;
  color: var(--theme-accent-light);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.5);
}
.combo-text {
  font-size: 20px;
  font-weight: bold;
  color: #ff8c00;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   十二、星级评价动画
   ========================================== */

.stars-display {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.star-item {
  font-size: 40px;
  opacity: 0;
  transform: scale(0) translateY(24px);
  filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
}
.star-item.show {
  animation: star-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes star-pop {
  0% { opacity: 0; transform: scale(0) translateY(24px); }
  32% { opacity: 1; transform: scale(1.4) translateY(-8px); }
  54% { transform: scale(1) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================
   十三、统一游戏顶栏组件
   结构：[返回] ... [音乐][音效][暂停]
   ========================================== */

.game-top-bar-unified {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 10px;
  flex-shrink: 0;
  z-index: 50;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 80%,
    transparent 100%);
}

.game-top-bar-unified .top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.game-top-bar-unified .top-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.game-top-bar-unified .top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 返回按钮 */
.top-btn-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, 0.4);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  color: var(--theme-text-accent);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}
.top-btn-back:hover {
  background: rgba(180, 40, 40, 0.3);
  border-color: var(--theme-accent-light);
  transform: scale(1.08);
}
.top-btn-back:active { transform: scale(0.92); }

/* 音乐/音效/暂停 小图标按钮 */
.top-btn-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 162, 39, 0.3);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  color: var(--theme-text-accent);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}
.top-btn-icon:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: var(--theme-accent-light);
  transform: scale(1.1);
}
.top-btn-icon:active { transform: scale(0.9); }
.top-btn-icon.muted {
  opacity: 0.45;
  border-color: rgba(201, 162, 39, 0.15);
}

/* 顶栏关卡/分数信息 */
.top-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(201, 162, 39, 0.3);
  border-radius: var(--radius-pill);
  color: var(--theme-text-accent);
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}
.top-info-badge .badge-icon { font-size: 13px; }
.top-info-badge .badge-value {
  color: var(--theme-accent-light);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}
