* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Arial, Helvetica, sans-serif; }
body {
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(rgba(2,14,25,.45), rgba(1,7,14,.75)),
    url("assets/backround.png") center center / cover fixed no-repeat;
}

.game {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 22px;
  border-radius: 30px;
  background: rgba(2, 18, 30, .72);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 70px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 18px;
}

.label {
  margin: 0 0 7px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .75rem;
  color: #8ff1ff;
  font-weight: 900;
}

h1 {
  margin: 0;
  color: #fff1a8;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: .95;
  text-shadow: 0 0 28px rgba(255, 208, 83, .25);
}

.subtitle {
  margin: 10px 0 0;
  max-width: 720px;
  color: rgba(255,255,255,.9);
}

.score-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.score, .fish-legend, .rules {
  padding: 13px;
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

.score {
  text-align: center;
}

.score span {
  display: block;
  color: rgba(255,255,255,.80);
  font-size: .9rem;
}

.score strong {
  display: block;
  color: #fff1a8;
  font-size: 2rem;
  margin-top: 3px;
}

.score.high strong {
  color: #8ff1ff;
}

.fish-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
  font-weight: 800;
}

.fish-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  border-radius: 14px;
  background: rgba(0,0,0,.24);
  padding: 7px 10px;
}

.fish-legend img {
  width: 54px;
  height: auto;
  filter: drop-shadow(0 4px 7px rgba(0,0,0,.35));
}

.stage {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    linear-gradient(rgba(0, 28, 50, .12), rgba(0, 20, 35, .28)),
    url("assets/backround.png") center center / cover no-repeat;
  border: 2px solid rgba(142, 241, 255, .35);
  box-shadow: 0 18px 44px rgba(0,0,0,.32);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 5%, rgba(255,255,255,.18), transparent 26%),
    radial-gradient(circle at 20% 80%, rgba(255,215,92,.10), transparent 18%),
    radial-gradient(circle at 80% 75%, rgba(122,255,209,.10), transparent 18%);
  pointer-events: none;
}

canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.catch-panel {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 20px;
  background: rgba(0,0,0,.48);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(7px);
}

.catch-panel.success { background: rgba(20,88,46,.72); }
.catch-panel.fail { background: rgba(112,40,30,.72); }
.catch-panel.computer { background: rgba(36,52,114,.72); }
.catch-panel.record { background: rgba(143,103,16,.78); }

.catch-preview {
  display: grid;
  place-items: center;
  width: 62px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255,255,255,.16);
  font-size: 1.8rem;
  overflow: hidden;
}

.catch-preview img {
  max-width: 72px;
  max-height: 52px;
  filter: drop-shadow(0 5px 7px rgba(0,0,0,.38));
}

.catch-panel strong {
  display: block;
  font-size: 1.07rem;
  color: #fff8c7;
}

.catch-panel p {
  margin: 3px 0 0;
  color: rgba(255,255,255,.92);
  line-height: 1.35;
}

.controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0 12px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  color: #06111b;
  font-weight: 900;
  font-size: 1rem;
  cursor: pointer;
  background: linear-gradient(180deg, #e8fbff, #7de5ff);
  box-shadow: 0 12px 24px rgba(0,0,0,.25);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, #fff2a4, #ffb42e); }
.btn.small { padding: 12px 18px; font-size: .92rem; }

.rules {
  margin-top: 4px;
}

.rules h2 {
  margin: 0 0 8px;
  color: #fff1a8;
}

.rules p {
  margin: 0;
  color: rgba(255,255,255,.88);
  line-height: 1.55;
}

@media (max-width: 850px) {
  .score-row { grid-template-columns: 1fr 1fr; }
  .fish-legend { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { padding: 8px; }
  .game { padding: 12px; border-radius: 20px; }
  .top { flex-direction: column; align-items: flex-start; }
  .score strong { font-size: 1.45rem; }
  .catch-panel { position: static; border-radius: 0; }
  .fish-legend { grid-template-columns: 1fr; }
}
