* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #1c2a2b;
  color: #eef3ee;
  font-family: "Segoe UI", "Avenir", system-ui, sans-serif;
  display: grid;
  place-items: center;
}

#app {
  width: 940px;
  max-width: 98vw;
}

/* ---------- HUD ---------- */
#hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  flex-wrap: wrap;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill {
  background: #2c3f40;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.hud-label { font-size: 13px; opacity: 0.8; }

.bar {
  width: 160px;
  height: 12px;
  background: #142021;
  border-radius: 999px;
  overflow: hidden;
}

.bar.small { width: 110px; height: 9px; }

.bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #49b6a0, #7fd6a8);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bar-fill.hunger { background: linear-gradient(90deg, #e0a23f, #e2572b); }

/* ---------- Stage ---------- */
#stage { position: relative; }

canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

canvas.feed-mode { cursor: crosshair; }

/* ---------- Fish card ---------- */
#fishCard {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 220px;
  background: rgba(20, 32, 33, 0.92);
  border: 1px solid #3b5455;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  gap: 8px;
}

#fcClose {
  background: none;
  border: none;
  color: #eef3ee;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Controls ---------- */
#controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.btn {
  background: #2c3f40;
  color: #eef3ee;
  border: 1px solid #3b5455;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn:hover { background: #38504f; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: #49b6a0; border-color: #49b6a0; color: #10201d; font-weight: bold; }
.btn.primary:hover { background: #5fcbb4; }
.btn.danger { border-color: #8c4a3f; color: #f0b0a0; }
.btn.active { background: #49b6a0; color: #10201d; font-weight: bold; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 18, 0.82);
  display: grid;
  place-items: center;
  z-index: 20;
}

.panel {
  background: #1e3132;
  border: 1px solid #3b5455;
  border-radius: 20px;
  padding: 28px 34px;
  width: min(440px, 92vw);
  text-align: center;
}

.panel h1 { margin: 0 0 6px; }
.panel h2 { margin: 0 0 14px; }

.subtle { opacity: 0.65; font-size: 13px; }

#seasonPick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}

#continueBtn { width: 100%; margin-top: 6px; }

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid #2c4344;
}

#closeShop { margin-top: 16px; width: 100%; }

/* ---------- Predator alert ---------- */
#shooAlert {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 15;
}

.shoo-timer {
  width: 90px;
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
}

#shooTimerFill {
  height: 100%;
  width: 100%;
  background: #e2572b;
}

/* ---------- Toast ---------- */
#toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 32, 33, 0.94);
  border: 1px solid #3b5455;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  pointer-events: none;
  transition: opacity 0.3s;
}

.hidden { display: none !important; }
