/* ==================== 基础样式 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
  font-family: 'Press Start 2P', 'Courier New', monospace;
  padding: 20px;
}

#app {
  text-align: center;
  max-width: 1280px;
  width: 100%;
}

/* ==================== 标题 ==================== */
h1 {
  color: #58a6ff;
  margin-bottom: 10px;
  font-size: 22px;
  text-shadow: 
    3px 3px 0 #1f6feb,
    -1px -1px 0 #ffffff;
  letter-spacing: 2px;
  font-weight: bold;
  background: linear-gradient(90deg, #58a6ff, #79c0ff, #58a6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { filter: drop-shadow(0 0 5px rgba(88, 166, 255, 0.5)); }
  to { filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.8)); }
}

/* ==================== 控制区域 ==================== */
#controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px;
  background: rgba(22, 27, 34, 0.8);
  border: 2px solid #30363d;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==================== 按钮样式 ==================== */
button {
  padding: 12px 20px;
  background: linear-gradient(145deg, #238660, #2ea043);
  color: #ffffff;
  border: 3px solid #26a641;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  transition: all 0.15s ease;
  box-shadow: 
    0 4px 0 #1a7f37,
    0 6px 10px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 140px;
}

button:hover {
  background: linear-gradient(145deg, #2ea043, #39d353);
  transform: translateY(-3px);
  box-shadow: 
    0 7px 0 #1a7f37,
    0 10px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

button:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #1a7f37,
    0 4px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ==================== 特殊颜色按钮 ==================== */
#btn-feed {
  background: linear-gradient(145deg, #da3633, #f85149);
  border-color: #f85149;
  box-shadow: 0 4px 0 #b62324, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-feed:hover {
  background: linear-gradient(145deg, #f85149, #ff7b72);
  box-shadow: 0 7px 0 #b62324, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-water {
  background: linear-gradient(145deg, #1f6feb, #58a6ff);
  border-color: #58a6ff;
  box-shadow: 0 4px 0 #0969da, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-water:hover {
  background: linear-gradient(145deg, #58a6ff, #79c0ff);
  box-shadow: 0 7px 0 #0969da, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-scene {
  background: linear-gradient(145deg, #8957e5, #a371f7);
  border-color: #a371f7;
  box-shadow: 0 4px 0 #6e5494, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-scene:hover {
  background: linear-gradient(145deg, #a371f7, #c292ff);
  box-shadow: 0 7px 0 #6e5494, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-fish {
  background: linear-gradient(145deg, #d29922, #f2cc60);
  border-color: #f2cc60;
  box-shadow: 0 4px 0 #9a6700, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-fish:hover {
  background: linear-gradient(145deg, #f2cc60, #ffd33d);
  box-shadow: 0 7px 0 #9a6700, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-ai-fish {
  background: linear-gradient(145deg, #00bcd4, #4dd0e1);
  border-color: #4dd0e1;
  box-shadow: 0 4px 0 #0097a7, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-ai-fish:hover {
  background: linear-gradient(145deg, #4dd0e1, #80deea);
  box-shadow: 0 7px 0 #0097a7, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-fish-manager {
  background: linear-gradient(145deg, #ff7043, #ffab91);
  border-color: #ffab91;
  box-shadow: 0 4px 0 #d84315, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-fish-manager:hover {
  background: linear-gradient(145deg, #ffab91, #ffccbc);
  box-shadow: 0 7px 0 #d84315, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-ai-config {
  background: linear-gradient(145deg, #e91e63, #f06292);
  border-color: #f06292;
  box-shadow: 0 4px 0 #c2185b, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-ai-config:hover {
  background: linear-gradient(145deg, #f06292, #f8bbd0);
  box-shadow: 0 7px 0 #c2185b, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#btn-scene-manager {
  background: linear-gradient(145deg, #5c6bc0, #7986cb);
  border-color: #7986cb;
  box-shadow: 0 4px 0 #3949ab, 0 6px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-scene-manager:hover {
  background: linear-gradient(145deg, #7986cb, #9fa8da);
  box-shadow: 0 7px 0 #3949ab, 0 10px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ==================== 画布容器 ==================== */
#canvas-container {
  position: relative;
  display: inline-block;
  margin: 15px 0;
  padding: 15px;
  background: linear-gradient(135deg, 
    rgba(48, 54, 61, 0.8) 0%, 
    rgba(22, 27, 34, 0.9) 50%,
    rgba(48, 54, 61, 0.8) 100%);
  border-radius: 16px;
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3),
    0 15px 40px rgba(0, 0, 0, 0.6),
    0 5px 15px rgba(0, 0, 0, 0.8);
}

#canvas-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 3px solid rgba(88, 166, 255, 0.3);
  border-radius: 16px;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 1;
}

#canvas-container::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 45%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 100%
  );
  border-radius: 12px 12px 50% 50%;
  pointer-events: none;
  z-index: 2;
}

.tank-3d-effect {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(48, 54, 61, 0.6) 100%
  );
  border-radius: 0 12px 0 0;
  pointer-events: none;
  z-index: 0;
}

/* ==================== 鱼缸边框 ==================== */
.tank-frame {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}

.tank-frame.top {
  top: 8px;
  left: 8px;
  right: 8px;
  height: 20px;
  background: linear-gradient(
    180deg,
    #5a6376 0%,
    #4a5568 50%,
    #3d4452 100%
  );
  border-radius: 12px 12px 04px 0;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

.tank-frame.bottom {
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 20px;
  background: linear-gradient(
    0deg,
    #5a6378 0%,
    #4a5568 50%,
    #3d4452 100%
  );
  border-radius: 0 0 12px 12px;
  box-shadow: 
    0 -4px 8px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

.tank-frame.left {
  top: 8px;
  left: 8px;
  bottom: 8px;
  width: 20px;
  background: linear-gradient(
    90deg,
    #5a6378 0%,
    #4a5568 50%,
    #3d4452 100%
  );
  border-radius: 12px 0 0 12px;
  box-shadow: 
    4px 0 8px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

.tank-frame.right {
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: 20px;
  background: linear-gradient(
    270deg,
    #5a6378 0%,
    #4a5568 50%,
    #3d4452 100%
  );
  border-radius: 0 12px 12px 0;
  box-shadow: 
    -4px 0 8px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
}

/* ==================== 鱼缸边角 ==================== */
.tank-corner {
  position: absolute;
  width: 25px;
  height: 25px;
  background: linear-gradient(
    135deg,
    #6b7280 0%,
    #5a6378 50%,
    #4a5568 100%
  );
  pointer-events: none;
  z-index: 4;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.tank-corner.top-left {
  top: 5px;
  left: 5px;
  border-radius: 12px 0 0 0;
}

.tank-corner.top-right {
  top: 5px;
  right: 5px;
  border-radius: 0 12px 0 0;
}

.tank-corner.bottom-left {
  bottom: 5px;
  left: 5px;
  border-radius: 0 0 0 12px;
}

.tank-corner.bottom-right {
  bottom: 5px;
  right: 5px;
  border-radius: 0 0 12px 0;
}

/* ==================== 玻璃高光 ==================== */
.glass-reflection {
  position: absolute;
  top: 30px;
  left: 30px;
  right: 30px;
  height: 50%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.08) 40%,
    transparent 100%
  );
  border-radius: 12px 12px 40% 40%;
  pointer-events: none;
  z-index: 5;
  opacity: 0.8;
}

/* ==================== Canvas ==================== */
canvas {
  border: 3px solid #3d4452;
  border-radius: 12px;
  image-rendering: pixelated;
  background: #000;
  display: block;
  cursor: pointer;
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.9),
    0 8px 20px rgba(0, 0, 0, 0.7),
    inset 0 3px 6px rgba(255, 255, 255, 0.1),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    0 0 0 1px #2d3748,
    0 0 0 2px #1a202c;
  position: relative;
  z-index: 1;
}

canvas:hover {
  border-color: #4a5568;
  box-shadow: 
    0 0 50px rgba(88, 166, 255, 0.5),
    0 15px 40px rgba(0, 0, 0, 0.9),
    0 8px 20px rgba(0, 0, 0, 0.7),
    inset 0 3px 6px rgba(88, 166, 255, 0.2),
    inset 0 -3px 6px rgba(0, 0, 0, 0.4),
    0 0 0 1px #1f6feb,
    0 0 0 2px #0d1117;
}

/* ==================== 场景信息 ==================== */
#scene-name {
  margin-top: 15px;
  color: #79c0ff;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(121, 192, 255, 0.5);
  background: rgba(22, 27, 34, 0.8);
  padding: 8px 20px;
  border-radius: 8px;
  display: inline-block;
  border: 2px solid #30363d;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#stats {
  margin-top: 10px;
  color: #8b949e;
  font-size: 14px;
  background: rgba(22, 27, 34, 0.9);
  padding: 10px 20px;
  border-radius: 8px;
  display: inline-block;
  border: 2px solid #30363d;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  min-width: 200px;
}

#stats::before {
  content: '📊 ';
  margin-right: 5px;
}

/* ==================== 鱼种管理面板 ==================== */
#fish-manager-panel {
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
}

.fish-list {
  display: grid;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(13, 17, 23, 0.5);
  border: 2px solid #30363d;
  border-radius: 8px;
}

.fish-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: rgba(22, 27, 34, 0.8);
  border: 2px solid #30363d;
  border-radius: 6px;
  transition: all 0.2s;
}

.fish-item:hover {
  border-color: #58a6ff;
  box-shadow: 0 4px 10px rgba(88, 166, 255, 0.2);
}

.fish-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.fish-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  image-rendering: pixelated;
  object-fit: contain;
  background: rgba(22, 27, 34, 0.5);
}

.fish-name {
  color: #e94560;
  font-weight: bold;
  font-size: 14px;
}

.fish-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fish-count {
  min-width: 60px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #58a6ff;
  font-family: 'Courier New', monospace;
  padding: 8px 12px;
  background: rgba(13, 17, 23, 0.8);
  border: 2px solid #30363d;
  border-radius: 6px;
}

.btn-counter {
  width: 40px;
  height: 40px;
  padding: 0;
  min-width: 40px;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-minus {
  background: linear-gradient(145deg, #da3633, #f85149);
  border-color: #f85149;
  box-shadow: 0 4px 0 #b62324, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-minus:hover {
  background: linear-gradient(145deg, #f85149, #ff7b72);
  box-shadow: 0 7px 0 #b62324, 0 10px 15px rgba(0, 0, 0, 0.4);
}

.btn-plus {
  background: linear-gradient(145deg, #238636, #2ea043);
  border-color: #26a641;
  box-shadow: 0 4px 0 #1a7f37, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-plus:hover {
  background: linear-gradient(145deg, #2ea043, #39d353);
  box-shadow: 0 7px 0 #1a7f37, 0 10px 15px rgba(0, 0, 0, 0.4);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.panel-title {
  color: #58a6ff;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.fish-summary {
  margin-top: 15px;
  padding: 12px;
  background: rgba(13, 17, 23, 0.6);
  border: 2px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  font-size: 13px;
}

.fish-summary .highlight {
  color: #58a6ff;
  font-weight: bold;
}

/* ==================== 市场链接 ==================== */
.market-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  padding: 10px 20px;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #58a6ff 0%, #1f6feb 100%);
  border: none;
  border-radius: 8px;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(88, 166, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.market-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.market-link:hover::before {
  left: 100%;
}

.market-link:hover {
  background: linear-gradient(135deg, #79c0ff 0%, #58a6ff 100%);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(88, 166, 255, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.market-link:active {
  transform: translateY(1px);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(88, 166, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.market-link span {
  position: relative;
  z-index: 1;
}

/* ==================== 右键菜单 ==================== */
.context-menu {
  position: fixed;
  background: rgba(22, 27, 34, 0.95);
  border: 2px solid #e94560;
  border-radius: 8px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(233, 69, 96, 0.3);
  min-width: 180px;
  backdrop-filter: blur(10px);
}

.context-menu button {
  background: transparent;
  color: #e94560;
  border: none;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  box-shadow: none;
  font-weight: bold;
  transition: all 0.15s;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: auto;
}

.context-menu button:hover {
  background: rgba(233, 69, 96, 0.2);
  box-shadow: none;
  transform: none;
  color: #ff7b72;
}

/* ==================== 通用面板 ==================== */
.panel {
  margin: 15px 0;
  padding: 20px;
  background: rgba(22, 27, 34, 0.95);
  border: 2px solid #30363d;
  border-radius: 12px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  max-width: 800px;
  margin: 15px auto;
}

.panel.hidden {
  display: none;
}

.floating-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  margin: 0;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
}

.panel-overlay.active {
  display: block;
}

.panel h3 {
  color: #58a6ff;
  margin-bottom: 15px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================== 配置行 ==================== */
.config-row {
  margin-bottom: 15px;
  text-align: left;
}

.config-row label {
  display: block;
  color: #8b949e;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: bold;
  text-align: left;
}

.config-row input,
.config-row textarea {
  width: 100%;
  padding: 10px;
  background: rgba(13, 17, 23, 0.8);
  border: 2px solid #30363d;
  border-radius: 6px;
  color: #e94560;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  transition: all 0.2s;
}

.config-row input:focus,
.config-row textarea:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
}

.config-row textarea {
  resize: vertical;
  min-height: 80px;
}

.upload-hint {
  display: block;
  font-size: 11px;
  color: #8b9bb4;
  margin-top: 6px;
  line-height: 1.4;
  text-align: left;
  font-style: italic;
  background: linear-gradient(90deg, rgba(139, 155, 180, 0.08) 0%, rgba(139, 155, 180, 0.02) 100%);
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #a371f7;
}

.panel-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #30363d;
}

/* ==================== 场景列表 ==================== */
#scene-list {
  display: block;
  overflow-y: auto;
  max-height: 400px;
  margin-bottom: 15px;
}

.scene-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: rgba(13, 17, 23, 0.6);
  border: 2px solid #30363d;
  border-radius: 8px;
  transition: all 0.2s;
}

.scene-item:hover {
  border-color: #58a6ff;
  box-shadow: 0 4px 10px rgba(88, 166, 255, 0.2);
}

.scene-item.built-in {
  border-left: 4px solid #238636;
}

.scene-item.ai-generated {
  border-left: 4px solid #a371f7;
}

.scene-info {
  flex: 1;
}

.scene-name {
  color: #e94560;
  font-weight: bold;
  margin-bottom: 3px;
}

.scene-type {
  color: #8b949e;
  font-size: 12px;
}

.scene-prompt {
  color: #6c757d;
  font-size: 11px;
  margin-top: 3px;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-actions {
  display: flex;
  gap: 8px;
}

.scene-actions button {
  padding: 6px 12px;
  font-size: 11px;
  min-width: auto;
}

.btn-delete {
  background: linear-gradient(145deg, #da3633, #f85149);
  border-color: #f85149;
  box-shadow: 0 4px 0 #b62324, 0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-delete:hover {
  background: linear-gradient(145deg, #f85149, #ff7b72);
  box-shadow: 0 7px 0 #b.b62324, 0 10px 15px rgba(0, 0, 0, 0.4);
}

/* ==================== 加载动画 ==================== */
.loading {
  display: inline-block;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== AI Fish 面板 ==================== */
.ai-fish-panel {
  width: 600px;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.ai-fish-panel h3 {
  margin-bottom: 15px;
  color: #a371f7;
  text-align: center;
  font-size: 18px;
}

.ai-fish-panel .config-row {
  margin-bottom: 12px;
}

.ai-fish-panel .config-row label {
  font-size: 12px;
  margin-bottom: 4px;
  color: #8b949e;
  text-align: left;
}

.ai-fish-panel .config-row input[type="text"],
.ai-fish-panel .config-row input[type="number"] {
  padding: 6px 10px;
  font-size: 13px;
}

.ai-fish-preview-box {
  width: 100%;
  max-width: 550px;
  height: 250px;
  background: rgba(13, 17, 23, 0.9);
  border: 2px solid #30363d;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all 0.3s;
  margin: 0 auto;
}

.ai-fish-preview-box:hover {
  border: 2px solid #a371f7;
  box-shadow: 0 0 15px rgba(163, 113, 247, 0.3);
}

.ai-fish-preview-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview-placeholder {
  color: #6c757d;
  font-size: 13px;
}

.preview-controls {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
  margin-bottom: 8px;
}

.preview.buttons-left {
  display: flex;
  gap: 25px;
}

#btn-preview-original {
  background: transparent;
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 5px 10px;
  font-size: 10px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  min-width: auto;
  box-shadow: none;
  border-radius: 4px;
}

#btn-preview-removed {
  background: transparent;
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 5px 10px;
  font-size: 10px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  min-width: auto;
  box-shadow: none;
  border-radius: 4px;
}

#btn-preview-original:hover,
#btn-preview-removed:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: #58a6ff;
  color: #58a6ff;
}

#btn-preview-original.selected,
#btn-preview-removed.selected {
  background: rgba(88, 166, 255, 0.2);
  border-color: #58a6ff;
  color: #58a6ff;
  box-shadow: 0 0 8px rgba(88, 166, 255, 0.3);
}

#btn-flip-horizontal {
  background: transparent;
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 5px 10px;
  font-size: 10px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s;
  min-width: auto;
  box-shadow: none;
  border-radius: 4px;
}

#btn-flip-horizontal:hover {
  background: rgba(88, 166, 255, 0.1);
  border-color: #58a6ff;
  color: #58a6ff;
}

.preview-image {
  width: 100%;
  height: calc(100% - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ai-fish-panel .checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ai-fish-panel .checkbox-row label {
  margin-bottom: 0;
  flex: 1;
  text-align: left;
}

.ai-fish-panel .checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ai-fish-panel .panel-actions {
  margin-top: 15px;
}

/* ==================== 版权信息 ==================== */
.copyright {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  z-index: 10;
  opacity: 0;
  animation: fadeIn 1.5s ease-out 2s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.3; }
}

/* ==================== 导航栏 ==================== */
#navbar {
  position: fixed;
  top: 10px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(22, 27, 34, 0.95);
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 6px 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  gap: 15px;
}

.nav-menu-btn {
  color: #8b949e;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 27, 34, 0.5);
  border: 1px solid #30363d;
}

.nav-menu-btn:hover {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
  border-color: #58a6ff;
}

.nav-menu-btn .menu-text {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
}

.nav-menu-btn .menu-icon {
  font-size: 14px;
}

.nav-dropdown {
  position: fixed;
  top: 65px;
  right: 20px;
  background: rgba(22, 27, 34, 0.98);
  border: 2px solid #30363d;
  border-radius: 12px;
  padding: 8px 0;
  display: none;
  z-index: 9999;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  min-width: 150px;
  animation: dropdownFadeIn 0.2s ease;
}

.nav-dropdown.active {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown .nav-link {
  color: #8b949e;
  text-decoration: none;
  font-size: 11px;
  padding: 10px 20px;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid transparent;
  pointer-events: auto;
  cursor: pointer;
}

.nav-dropdown .nav-link:hover {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
  border-left-color: #58a6ff;
  text-shadow: 0 0 5px rgba(88, 166, 255, 0.3);
}

.nav-user-section {
  display: flex;
  align-items: center;
}

#navbar .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(35, 134, 54, 0.1);
  border: 2px solid #238636;
  border-radius: 10px;
}

#navbar .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #238636, #2ea044);
  border: 2px solid #30363d;
  flex-shrink: 0;
}

#navbar .user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

#navbar .username {
  color: #c9d1d9;
  font-size: 9px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

#navbar .points {
  color: #f0a500;
  font-size: 8px;
  white-space: nowrap;
}

/* ==================== 积分确认模态框 ==================== */
.points-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.points-confirm-modal.active {
  display: flex;
}

.points-confirm-content {
  background: rgba(22, 27, 34, 0.98);
  border: 3px solid #30363d;
  border-radius: 16px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
  animation: modalFadeIn 0.3s ease;
;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.points-confirm-header {
  font-size: 18px;
  color: #58a6ff;
  margin-bottom: 20px;
  font-weight: bold;
}

.points-confirm-body {
  margin-bottom: 25px;
  color: #c9d1d9;
  font-size: 14px;
  line-height: 1.6;
}

.points-confirm-body .points-info {
  background: rgba(13, 17, 23, 0.6);
  border: 2px solid #30363d;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
}

.points-confirm-body .points-info .current-points {
  font-size: 24px;
  color: #f0a500;
  font-weight: bold;
  margin: 10px 0;
}

.points-confirm-body .points-info .required-points {
  font-size: 20px;
  color: #da3633;
  font-weight: bold;
  margin: 10px 0;
}

.points-confirm-body .points-info .remaining-points {
  font-size: 18px;
  color: #238636;
  font-weight: bold;
  margin: 10px 0;
}

.points-confirm-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 640px) {
  h1 {
    font-size: 20px;
  }
  
  canvas {
    width: 100%;
    max-width: 320px;
    height: auto;
  }
  
  button {
    padding: 10px 15px;
    font-size: 11px;
    min-width: 80px;
  }

  #controls {
    gap: 6px;
  }
}