* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #e8f4f8 0%, #cfe6ee 100%);
  color: #2b3d46;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

header, main, footer {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

h1 {
  margin: 8px 0 4px;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
}

.sub {
  margin: 0 0 16px;
  color: #567080;
  font-size: 0.95rem;
}

.tank {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  border: 6px solid #8fb3c2;
  background:
    radial-gradient(ellipse at top, rgba(255,255,255,0.45), transparent 60%),
    linear-gradient(180deg, #7ec8e3 0%, #2f7fa3 70%, #d9c58f 100%);
  box-shadow: 0 10px 24px rgba(30, 70, 90, 0.25), inset 0 0 30px rgba(255,255,255,0.2);
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.bubble {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  pointer-events: none;
  animation: rise linear forwards;
}

@keyframes rise {
  to { transform: translateY(-120%); }
}

.food {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5b041;
  box-shadow: 0 0 4px rgba(245,176,65,0.8);
  pointer-events: none;
  transition: top 0.4s ease-in;
}

.fish {
  position: absolute;
  font-size: 2rem;
  line-height: 1;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

.fish span {
  display: inline-block;
  transform-origin: center;
}

.controls {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  font: inherit;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: #3a8fb7;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

button:hover { background: #2f7aa0; }
button:active { transform: translateY(1px); }

.count {
  color: #456;
  font-size: 0.95rem;
}

.hint {
  margin: 12px 0 0;
  color: #567080;
  font-size: 0.9rem;
}

footer {
  margin-top: 24px;
  padding-bottom: 12px;
  color: #6a8290;
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .fish { font-size: 1.6rem; }
  h1 { font-size: 1.35rem; }
}
