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

body {
  background: #0d1421;
  color: #e8e8e8;
  font-family: 'Courier New', 'Microsoft YaHei', monospace;
  min-height: 100vh;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: #2c3e50;
  color: #ffd700;
  border: 2px solid #ffd700;
  padding: 8px 14px;
  font-size: 14px;
  letter-spacing: 1px;
}
button:hover { background: #ffd700; color: #2c3e50; }
button.primary {
  background: #d35400;
  color: #fff;
  border-color: #ffae42;
}
button.primary:hover { background: #ffae42; color: #2c3e50; }
button.primary.big { padding: 14px 30px; font-size: 18px; }

input, select {
  font-family: inherit;
  background: #1a1a2e;
  color: #f0e68c;
  border: 2px solid #ffd700;
  padding: 8px 12px;
  font-size: 14px;
}

.screen { display: none; width: 100vw; height: 100vh; }
.screen.active { display: flex; }

/* 登录 */
#login-screen {
  background: linear-gradient(180deg, #1a3a5c 0%, #0d1421 100%);
  align-items: center;
  justify-content: center;
}
.login-box {
  background: #1a1a2e;
  border: 4px solid #ffd700;
  padding: 40px 60px;
  text-align: center;
  box-shadow: 0 0 0 4px #0d1421, 0 0 0 8px #ffd700;
}
.login-box h1 { color: #ffd700; margin-bottom: 16px; font-size: 32px; }
.login-box p { margin-bottom: 16px; }
.login-box input { display: block; margin: 16px auto; width: 240px; text-align: center; }
.login-box .hint { font-size: 11px; opacity: 0.6; margin-top: 16px; }
.error-msg { color: #ff5722; font-size: 12px; margin-top: 12px; min-height: 16px; }

/* 主游戏 */
#game-screen {
  flex-direction: column;
  align-items: center;
  padding: 12px;
}

.topbar {
  width: 100%;
  max-width: 700px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #1a1a2e;
  border: 2px solid #ffd700;
}
.user-info { display: flex; gap: 20px; font-size: 16px; }
#player-name { color: #4ec9b0; }
#player-money { color: #ffd700; }
.actions { display: flex; gap: 8px; }

#game {
  width: 640px;
  height: 360px;
  background: #87ceeb;
  border: 4px solid #ffd700;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.gamebar {
  width: 100%;
  max-width: 700px;
  margin-top: 8px;
  padding: 12px;
  background: #1a1a2e;
  border: 2px solid #ffd700;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.bait-info { display: flex; gap: 12px; align-items: center; font-size: 14px; }
#status { font-size: 13px; color: #4ec9b0; min-height: 18px; }

/* 覆盖层 */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.overlay.hidden { display: none; }
.modal {
  background: #1a1a2e;
  border: 4px solid #ffd700;
  padding: 24px;
  min-width: 360px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}
.modal.wide { min-width: 600px; }
.modal h2 { color: #ffd700; margin-bottom: 16px; text-align: center; }
.close-x { display: block; margin: 16px auto 0; }

/* 命中条 */
.hitbar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  gap: 20px;
}
.hitbar-overlay.hidden { display: none; }
.hitbar-info { text-align: center; color: #fff; }
#hitbar-msg { font-size: 24px; color: #ffae42; margin-bottom: 8px; }
.hitbar-progress { font-size: 18px; color: #4ec9b0; margin-bottom: 4px; }
#hitbar-timer { font-size: 16px; color: #ff5722; }
.hitbar {
  width: 500px;
  height: 40px;
  background: #2c3e50;
  border: 3px solid #ffd700;
  position: relative;
  overflow: hidden;
}
.hitbar-zone {
  position: absolute;
  top: 0; bottom: 0;
  background: linear-gradient(90deg, #d35400, #ff5722, #d35400);
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
}
.hitbar-cursor {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 4px;
  background: #fff;
  box-shadow: 0 0 8px #fff;
}

/* 商店 */
.shop-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shop-item {
  border: 2px solid #555;
  padding: 12px;
  background: #0d1421;
}
.shop-item h3 { color: #ffd700; margin-bottom: 4px; }
.shop-item .desc { font-size: 12px; opacity: 0.7; margin-bottom: 8px; }
.shop-item .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.shop-item .price { color: #ffd700; }
.shop-item .owned { font-size: 12px; opacity: 0.8; }

/* 图鉴 */
.dex-tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.dex-tabs button { flex: 1; min-width: 80px; }
.dex-tabs button.active { background: #ffd700; color: #1a1a2e; }
.dex-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}
.dex-item {
  border: 2px solid #555;
  padding: 8px;
  text-align: center;
  background: #0d1421;
  font-size: 12px;
}
.dex-item.locked { opacity: 0.5; }
.dex-item .icon { font-size: 28px; display: block; margin-bottom: 4px; filter: grayscale(1); }
.dex-item.unlocked .icon { filter: none; }
.dex-item .name { font-weight: bold; }
.dex-item .info { font-size: 10px; opacity: 0.8; margin-top: 4px; }
.dex-stats { margin-top: 12px; padding: 8px; background: #0d1421; border: 1px solid #555; font-size: 13px; }

/* 结果 */
.result-fish {
  text-align: center;
  padding: 20px;
}
.result-fish .icon { font-size: 64px; display: block; margin-bottom: 12px; }
.result-fish .name { font-size: 22px; margin-bottom: 4px; }
.result-fish .rarity { font-size: 14px; margin-bottom: 12px; letter-spacing: 2px; }
.result-fish .stats { font-size: 14px; line-height: 1.8; }
.result-fish .value { color: #ffd700; font-size: 18px; margin-top: 8px; }
.result-fish.miss { color: #ff5722; }
.result-fish.miss .icon { font-size: 48px; }
