/* ============================================
   养蛊大作战 — 深海主题样式
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  /* 深海色调 */
  --bg-deep: #060e1a;
  --bg-mid: #0a1628;
  --bg-surface: #0d2847;
  --bg-light: #1a3a5c;

  /* 区域色 */
  --zone-shallow: rgba(0, 200, 180, 0.12);
  --zone-deep: rgba(0, 80, 200, 0.15);
  --zone-abyss: rgba(100, 20, 180, 0.2);
  --zone-dragon: rgba(220, 160, 0, 0.25);

  /* 强调色 */
  --gold: #ffd700;
  --gold-dim: #b8960f;
  --exp-blue: #00ccff;
  --hp-red: #ff4444;
  --hp-green: #44ff88;
  --text-primary: #e8edf5;
  --text-secondary: #8899bb;
  --text-dim: #556688;

  /* 毛玻璃 */
  --glass-bg: rgba(10, 22, 48, 0.75);
  --glass-border: rgba(100, 160, 255, 0.15);
  --glass-blur: 12px;

  /* 字体 */
  --font: 'Noto Sans SC', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  cursor: default;
  user-select: none;
}

/* ============================================
   开始界面
   ============================================ */
#startScreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #061124 0%, #020612 100%);
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#startScreen::before,
#startScreen::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.25;
  mix-blend-mode: screen;
  animation: orbFloat 20s infinite alternate ease-in-out;
}

#startScreen::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.6) 0%, rgba(124, 58, 237, 0) 70%);
  top: -10%;
  left: 10%;
}

#startScreen::after {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 204, 255, 0.5) 0%, rgba(0, 102, 204, 0) 70%);
  bottom: -15%;
  right: 5%;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, -60px) scale(1.15); }
  100% { transform: translate(-50px, 40px) scale(0.9); }
}

#startScreen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.05);
}

.title-section {
  text-align: center;
  margin-bottom: 36px;
  animation: titleFloat 6s ease-in-out infinite;
}

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

.game-title {
  font-size: 60px;
  font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, #ffd700 35%, #ff8c00 70%, #ffd700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.4));
  letter-spacing: 8px;
  animation: titleGlow 3s ease-in-out infinite;
}

.game-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 10px;
  letter-spacing: 6px;
  opacity: 0.85;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

@keyframes titleGlow {
  0%, 100% { filter: brightness(1) drop-shadow(0 4px 15px rgba(255, 215, 0, 0.4)); }
  50% { filter: brightness(1.2) drop-shadow(0 4px 25px rgba(255, 215, 0, 0.6)); }
}

/* 模式选择 */
.mode-selection {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 820px;
}

.mode-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(var(--glass-blur));
  text-align: center;
  min-width: 140px;
}

.mode-card:hover:not(.locked) {
  transform: translateY(-2px);
  border-color: rgba(100, 180, 255, 0.4);
}

.mode-card.selected {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.mode-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
}

.mode-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.mode-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.mode-desc {
  font-size: 10px;
  color: var(--text-secondary);
}

/* 鱼类选择 */
.fish-selection {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  max-width: 820px;
  padding: 0 20px;
  margin-bottom: 32px;
}

.fish-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 14px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(var(--glass-blur));
  text-align: center;
  min-width: 180px;
}

.fish-card:hover {
  transform: translateY(-4px);
  border-color: rgba(100, 180, 255, 0.35);
  box-shadow: 0 8px 30px rgba(0, 120, 255, 0.15);
}

.fish-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 0 20px rgba(255, 215, 0, 0.05);
}

.fish-card-icon {
  font-size: 36px;
  margin-bottom: 6px;
  display: block;
}

.fish-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.fish-card-quality {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.quality-jia {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a0800;
}

.quality-yi {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
}

.quality-bing {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.fish-card-ability {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 6px;
  font-weight: 500;
}

.fish-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  font-size: 10px;
  color: var(--text-secondary);
}

.fish-card-stats span {
  text-align: left;
  padding-left: 4px;
}

/* 开始按钮 */
#startBtn {
  padding: 14px 56px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font);
  color: #1a0800;
  background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  letter-spacing: 4px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

#startBtn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 30px rgba(255, 215, 0, 0.45);
}

#startBtn:active {
  transform: translateY(0) scale(0.98);
}

#startBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.controls-hint {
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.8;
}

.controls-hint kbd {
  display: inline-block;
  padding: 2px 7px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 11px;
  color: var(--text-secondary);
}

/* ============================================
   游戏画布
   ============================================ */
#gameCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  background: var(--bg-deep);
}

/* ============================================
   HUD 叠加层
   ============================================ */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#hud.visible {
  opacity: 1;
}

#hud > * {
  pointer-events: auto;
}

/* 玩家信息面板（左上） */
.panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
}

#playerPanel {
  position: absolute;
  top: 16px;
  left: 16px;
  min-width: 220px;
}

/* 天赋面板（左中） */
#talentPanel {
  position: absolute;
  top: 135px;
  left: 16px;
  min-width: 220px;
  max-width: 250px;
}

.talent-title {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.talent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.talent-name-text {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-primary);
}

.talent-badge {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

#talentDesc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 天赋等级配色 */
.talent-badge.bing { background: #7f8c8d; border: 1px solid #95a5a6; }
.talent-badge.shi { background: #2980b9; border: 1px solid #3498db; }
.talent-badge.xiang { background: #8e44ad; border: 1px solid #9b59b6; }
.talent-badge.jiang { background: #d35400; border: 1px solid #e67e22; }
.talent-badge.shenbing {
  background: linear-gradient(135deg, #f1c40f, #e74c3c);
  border: 1px solid #f39c12;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
  animation: pulseGold 2s infinite alternate;
}

@keyframes pulseGold {
  0% { box-shadow: 0 0 4px rgba(241, 196, 15, 0.4); }
  100% { box-shadow: 0 0 14px rgba(241, 196, 15, 0.8); }
}

.player-fish-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.quality-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.cultivation-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

.exp-bar-container {
  position: relative;
  width: 100%;
  height: 16px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}

.exp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0066cc, #00ccff, #66eeff);
  border-radius: 8px;
  transition: width 0.4s ease;
  position: relative;
}

.exp-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.25), transparent);
  border-radius: 8px 8px 0 0;
}

.exp-text {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: right;
}

/* 属性面板（左下） */
#statsPanel {
  position: absolute;
  bottom: 16px;
  left: 16px;
  min-width: 180px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}

.stat-label {
  color: var(--text-secondary);
}

.stat-value {
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.atk { color: #ff6b6b; }
.stat-value.def { color: #4ecdc4; }
.stat-value.spd { color: #ffe66d; }
.stat-value.hp { color: #44ff88; }

/* HP 条 */
.hp-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 8px;
}

.hp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4444, #ff6b6b);
  border-radius: 5px;
  transition: width 0.3s ease;
}

/* 道心条 */
.dao-bar-container {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 4px;
}

.dao-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #d8b4fe);
  border-radius: 5px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.dao-bar-fill.wasted {
  background: linear-gradient(90deg, #4b5563, #dc2626) !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.8) !important;
  animation: wastedPulse 1s infinite alternate;
}

@keyframes wastedPulse {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* 迷你地图（右上） */
#minimapContainer {
  position: absolute;
  top: 16px;
  right: 16px;
}

#minimapCanvas {
  width: 180px;
  height: 135px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(10, 22, 48, 0.8);
}

/* 击杀/时间面板（右下） */
#infoPanel {
  position: absolute;
  bottom: 16px;
  right: 16px;
  min-width: 160px;
  text-align: center;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 13px;
}

.info-label {
  color: var(--text-secondary);
}

.info-value {
  font-weight: 700;
}

/* 技能按钮（底部中央） */
.skill-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.skill-btn {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 2px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.skill-btn:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.skill-btn:active {
  transform: translateY(0) scale(0.95);
}

.skill-btn .icon {
  font-size: 20px;
  line-height: 1;
}

.skill-btn .key {
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 2px;
}

.skill-btn .cooldown-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  transition: height 0.1s linear;
  pointer-events: none;
}

/* ============================================
   突破动画叠加层
   ============================================ */
#breakthroughOverlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#breakthroughOverlay.active {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
  animation: screenShake 0.6s ease-out;
}

.breakthrough-text {
  font-size: 60px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: breakthroughPulse 1.5s ease-out;
  text-shadow: 0 0 60px rgba(255, 215, 0, 0.5);
}

.breakthrough-sub {
  font-size: 20px;
  color: var(--gold);
  margin-top: 8px;
  opacity: 0;
  animation: fadeInUp 0.5s ease 0.5s forwards;
}

@keyframes screenShake {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-8px, 4px); }
  20% { transform: translate(6px, -6px); }
  30% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  50% { transform: translate(-2px, 4px); }
  60% { transform: translate(2px, -2px); }
  70% { transform: translate(-1px, 1px); }
}

@keyframes breakthroughPulse {
  0% { transform: scale(0.3); opacity: 0; }
  40% { transform: scale(1.15); opacity: 1; }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   死亡/重新开始界面
   ============================================ */
#deathOverlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 15, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#deathOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

.death-title {
  font-size: 42px;
  font-weight: 900;
  color: #ff4444;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(255, 68, 68, 0.4);
}

.death-stats {
  text-align: center;
  margin-bottom: 28px;
  line-height: 2;
  font-size: 15px;
  color: var(--text-secondary);
}

.death-stats span {
  color: var(--text-primary);
  font-weight: 700;
}

#restartBtn {
  padding: 12px 44px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--text-primary);
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 26px;
  cursor: pointer;
  letter-spacing: 3px;
  transition: all 0.25s ease;
}

#restartBtn:hover {
  background: var(--gold);
  color: #1a0800;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

/* ============================================
   突破条件提示
   ============================================ */
.breakthrough-req {
  position: absolute;
  top: 90px;
  left: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: left;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.breakthrough-req.visible {
  opacity: 1;
}

.breakthrough-req h3 {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 12px;
}

.breakthrough-req p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.breakthrough-req .met {
  color: var(--hp-green);
}

.breakthrough-req .unmet {
  color: var(--hp-red);
}

/* ============================================
   区域提示
   ============================================ */
.zone-indicator {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.4s ease, color 0.4s ease;
  pointer-events: none;
}

.zone-indicator.visible {
  opacity: 1;
}

/* ============================================
   事件提示 (机缘粮)
   ============================================ */
.event-alert {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  font-size: 24px;
  font-weight: 900;
  color: var(--exp-blue);
  text-shadow: 0 0 20px rgba(0, 204, 255, 0.5);
  padding: 10px 30px;
  background: rgba(0, 50, 100, 0.6);
  border: 2px solid var(--exp-blue);
  border-radius: 30px;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-alert.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ============================================
   水面光影叠加（CSS装饰层）
   ============================================ */
.water-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 120% 40% at 50% 0%, rgba(0, 160, 255, 0.04) 0%, transparent 70%);
  animation: waterShimmer 8s ease-in-out infinite;
}

@keyframes waterShimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

#victoryOverlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 15, 0, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

#victoryOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

#victoryRestartBtn {
  margin-top: 30px;
  padding: 12px 30px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}
/* ============================================
   成就系统 UI
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: var(--text-secondary);
  cursor: pointer;
}
.close-btn:hover { color: #fff; }

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.ach-card {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  transition: all 0.3s ease;
}

.ach-card.locked {
  filter: grayscale(100%);
  opacity: 0.5;
}

.ach-card.unlocked {
  border-color: var(--gold);
  background: rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.ach-icon {
  font-size: 32px;
  margin-right: 15px;
}

.ach-info h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: var(--text-primary);
}

.ach-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.toast {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(255,215,0,0.9), rgba(255,140,0,0.9));
  color: #000;
  padding: 12px 24px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 10px 30px rgba(255,215,0,0.4);
  z-index: 1001;
  transition: top 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.visible {
  top: 40px;
}

.toast-icon { font-size: 28px; }
.toast-title { font-size: 12px; font-weight: bold; opacity: 0.8; margin-bottom: 2px;}
.toast-name { font-size: 18px; font-weight: 900; }

/* ============================================
   响应式调整
   ============================================ */
@media (max-width: 860px) {
  .fish-selection {
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
  }
  .game-title { font-size: 36px; }
  .fish-card { min-width: 150px; padding: 12px 10px; }
}

@media (max-width: 500px) {
  .fish-selection {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 340px;
  }
  .game-title { font-size: 28px; letter-spacing: 3px; }
  .fish-card { min-width: 0; padding: 10px 8px; }
  .fish-card-icon { font-size: 28px; }
  .fish-card-stats { display: none; }
  #playerPanel, #statsPanel { min-width: 160px; }
  .skill-btn { width: 48px; height: 48px; }
}

/* ============================================
   环境事件滤镜与效果
   ============================================ */
.event-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: background 1.0s ease, opacity 1.0s ease;
}

.event-overlay.active {
  opacity: 1;
}

/* 红月降临 */
.event-overlay.blood-moon {
  background: rgba(180, 0, 0, 0.18);
  box-shadow: inset 0 0 120px rgba(120, 0, 0, 0.65);
  mix-blend-mode: color-burn;
}

/* 九天雷劫 */
.event-overlay.tribulation {
  background: rgba(0, 0, 30, 0.25);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.8);
  animation: lightningFlash 7s infinite;
}

/* 灵气复苏 */
.event-overlay.aura-awakening {
  background: rgba(255, 215, 0, 0.07);
  box-shadow: inset 0 0 80px rgba(255, 215, 0, 0.15);
  mix-blend-mode: soft-light;
}

/* 深海暗流 */
.event-overlay.abyssal-torrent {
  background: rgba(0, 120, 240, 0.07);
  box-shadow: inset 0 0 80px rgba(0, 80, 160, 0.25);
}

/* 仙丹降世 */
.event-overlay.pill-rain {
  background: rgba(168, 85, 247, 0.12);
  box-shadow: inset 0 0 100px rgba(168, 85, 247, 0.35);
  animation: pillRainPulse 4s infinite alternate;
}

/* 万蛊暴走 */
.event-overlay.frenzy-beasts {
  background: rgba(220, 38, 38, 0.22);
  box-shadow: inset 0 0 140px rgba(153, 27, 27, 0.7);
  mix-blend-mode: color-burn;
}

/* 静心禅域 */
.event-overlay.dao-zen-domain {
  background: rgba(234, 179, 8, 0.1);
  box-shadow: inset 0 0 100px rgba(234, 179, 8, 0.3);
  mix-blend-mode: soft-light;
}

/* 迷雾降临 */
.event-overlay.abyssal-fog {
  background: rgba(0, 0, 0, 0.75);
  box-shadow: inset 0 0 180px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(2px);
}

/* 海龙风暴 */
.event-overlay.dragon-whirlwind {
  background: rgba(2, 132, 199, 0.15);
  box-shadow: inset 0 0 120px rgba(3, 105, 161, 0.5);
}

@keyframes pillRainPulse {
  0% { background: rgba(168, 85, 247, 0.1); }
  100% { background: rgba(236, 72, 153, 0.2); }
}

@keyframes lightningFlash {
  0%, 93%, 95%, 97%, 100% { background: rgba(0, 0, 30, 0.25); }
  94%, 96% { background: rgba(220, 235, 255, 0.65); filter: brightness(1.6); }
}

/* 开局天赋预览与洗炼框 */
.talent-preview-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 14px 20px;
  margin: 15px auto 5px auto;
  max-width: 520px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.3s ease;
}

.talent-preview-box:hover {
  border-color: rgba(0, 204, 255, 0.4);
  transform: translateY(-2px);
}

.talent-preview-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.preview-title {
  font-size: 13px;
  color: #94a3b8;
  letter-spacing: 1px;
}

.preview-name {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
}

.preview-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.4;
  margin-bottom: 10px;
}

.reroll-btn {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
}

.reroll-btn:hover {
  background: linear-gradient(135deg, #10b981, #34d399);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.reroll-btn:active {
  transform: scale(0.95);
}

/* ============================================
   洞天演武沙盒控制台 (Top-Right Corner Position)
   ============================================ */
.sandbox-panel {
  position: absolute;
  top: 16px;
  right: 206px;
  width: 230px;
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(168, 85, 247, 0.6);
  backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 12px;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(168, 85, 247, 0.3);
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sandbox-panel.hidden {
  display: none !important;
}

.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #c084fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.sandbox-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: none;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.sandbox-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sandbox-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  margin: 10px 0 6px 0;
  letter-spacing: 0.5px;
}

.sandbox-btn-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.sandbox-btn-group button {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sandbox-btn-group button:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(168, 85, 247, 0.6);
  transform: translateY(-1px);
}

.sandbox-btn-group button:active {
  transform: translateY(1px);
}
