/* ═══════════════════════════════════════════
   互动生态鱼缸 — CSS
   ═══════════════════════════════════════════ */

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

body {
  overflow: hidden;
  background: #0a1628;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  cursor: none;
  user-select: none;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
}

/* ── 顶部操作栏 ── */
#top-bar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.btn {
  background: rgba(0, 150, 255, 0.25);
  border: 1px solid rgba(100, 200, 255, 0.5);
  color: #afefff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn:hover {
  background: rgba(0, 180, 255, 0.45);
  transform: scale(1.08);
}

.btn.active {
  background: rgba(0, 220, 255, 0.5);
  border-color: #5df;
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.3);
}

/* ── 选中状态提示 ── */
#selected-label {
  position: fixed;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(150, 230, 255, 0.9);
  font-size: 13px;
  z-index: 10;
  pointer-events: none;
  text-align: center;
  background: rgba(5, 15, 35, 0.75);
  padding: 5px 16px;
  border-radius: 12px;
  border: 1px solid rgba(100, 200, 255, 0.2);
  transition: opacity 0.3s;
}

#selected-label.hidden {
  display: none;
}

/* ── 时间显示 ── */
#time-display {
  position: fixed;
  top: 15px;
  left: 15px;
  color: rgba(150, 230, 255, 0.7);
  font-size: 12px;
  z-index: 10;
  pointer-events: none;
}

/* ── 生物信息面板 ── */
#fish-count {
  position: fixed;
  top: 70px;
  right: 20px;
  color: rgba(150, 230, 255, 0.8);
  font-size: 13px;
  z-index: 10;
  text-align: right;
  pointer-events: none;
  line-height: 1.8;
}

/* ── 左侧生物选择面板 ── */
#selector-panel {
  position: fixed;
  top: 70px;
  left: 15px;
  z-index: 10;
}

#selector-panel label {
  color: rgba(150, 230, 255, 0.8);
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
}

#creature-select {
  background: rgba(5, 15, 35, 0.9);
  border: 1px solid rgba(100, 200, 255, 0.3);
  border-radius: 8px;
  color: #afefff;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  width: 155px;
  backdrop-filter: blur(8px);
  outline: none;
  transition: border-color 0.3s;
}

#creature-select:hover {
  border-color: rgba(100, 200, 255, 0.6);
}

#creature-select option {
  background: #0a1628;
  color: #afefff;
}

/* ── 性别切换按钮 ── */
#gender-toggle {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.gender-btn {
  background: rgba(0, 150, 255, 0.15);
  border: 1px solid rgba(100, 200, 255, 0.25);
  color: #afefff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gender-btn:hover {
  background: rgba(0, 180, 255, 0.3);
}

.gender-btn.active {
  background: rgba(0, 200, 255, 0.4);
  border-color: #5df;
  box-shadow: 0 0 8px rgba(0, 200, 255, 0.2);
}

/* ── 底部提示 ── */
#info {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(150, 230, 255, 0.6);
  font-size: 13px;
  z-index: 10;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

/* ── 悬停 tooltip ── */
#tooltip {
  position: fixed;
  z-index: 15;
  pointer-events: none;
  background: rgba(5, 15, 35, 0.9);
  border: 1px solid rgba(100, 200, 255, 0.35);
  border-radius: 10px;
  padding: 8px 12px;
  color: #afefff;
  font-size: 12px;
  line-height: 1.6;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: none;
  max-width: 200px;
}

#tooltip .tt-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

#tooltip .tt-type {
  color: rgba(100, 200, 255, 0.7);
  font-size: 11px;
}

#tooltip .tt-detail {
  margin-top: 4px;
  color: rgba(180, 240, 255, 0.8);
}

/* ── 鼠标光标 ── */
#cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(100, 220, 255, 0.7);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, border-color 0.15s;
  mix-blend-mode: screen;
}

#cursor.feeding {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 200, 50, 0.8);
}

#cursor.cleaning {
  width: 24px;
  height: 24px;
  border-color: rgba(100, 255, 180, 0.8);
}

/* ── 清洁进度条 ── */
#clean-progress {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  z-index: 10;
  overflow: hidden;
  display: none;
}

#clean-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0ff, #0f8);
  border-radius: 3px;
  transition: width 0.1s linear;
}
