:root {
  --panel: rgba(248, 251, 255, 0.92);
  --ink: #12202b;
  --muted: #5d6e7c;
  --line: rgba(20, 42, 58, 0.14);
  --accent: #006d77;
  --accent-2: #e55638;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-family:
    Inter, "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: #0b1c23;
}

button,
input {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: minmax(300px, 360px) 1fr;
  width: 100vw;
  height: 100vh;
}

.panel {
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  height: 100%;
  padding: 24px;
  overflow: auto;
  background: var(--panel);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 8px 0 28px rgba(5, 18, 27, 0.18);
  backdrop-filter: blur(18px);
}

.brand p,
.topbar p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: 0;
}

.control-group {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.group-title {
  margin-bottom: 10px;
  color: #2f4351;
  font-size: 13px;
  font-weight: 800;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.option,
.fish-card,
.actions button,
.topbar button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.option {
  min-height: 52px;
  padding: 10px 11px;
  border-radius: 8px;
  text-align: left;
}

.option span,
.fish-meta strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.option small,
.fish-meta small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.28;
}

.option:hover,
.fish-card:hover,
.actions button:hover,
.topbar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(19, 48, 64, 0.12);
}

.option.active,
.fish-card.active {
  border-color: rgba(0, 109, 119, 0.8);
  background: rgba(219, 247, 247, 0.92);
}

.fish-list {
  display: grid;
  gap: 9px;
}

.fish-card {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  min-height: 68px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
}

.fish-card img {
  width: 68px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(8, 24, 35, 0.18));
}

.count {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.compact {
  display: grid;
  gap: 12px;
}

.range-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 12px;
  color: #314958;
  font-size: 13px;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.actions button,
.topbar button {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
}

#showcaseButton {
  border-color: rgba(229, 86, 56, 0.42);
  background: var(--accent-2);
  color: white;
}

#musicButton.audio-on {
  border-color: rgba(0, 109, 119, 0.62);
  background: var(--accent);
  color: white;
}

.stage {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #07151b;
}

#aquarium {
  display: block;
  width: 100%;
  height: 100%;
}

.topbar {
  position: absolute;
  top: 22px;
  right: 26px;
  left: 26px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  color: white;
  pointer-events: none;
}

.topbar strong {
  display: block;
  max-width: min(520px, 64vw);
  font-size: 18px;
  line-height: 1.25;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.topbar p {
  color: rgba(255, 255, 255, 0.78);
}

.topbar button {
  min-width: 104px;
  pointer-events: auto;
}

.showcase .panel {
  transform: translateX(-100%);
}

.showcase.app {
  grid-template-columns: 0 1fr;
}

.showcase .topbar {
  left: 34px;
}

@media (max-width: 880px) {
  body {
    overflow: auto;
  }

  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(540px, 1fr);
    min-height: 100vh;
    height: auto;
  }

  .panel {
    height: auto;
    max-height: none;
    border-right: 0;
  }

  .stage {
    height: 68vh;
    min-height: 540px;
  }

  .actions {
    margin-top: 0;
  }

  .stage {
    height: 72vh;
    min-height: 560px;
  }

  .topbar {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .topbar strong {
    font-size: 15px;
  }
}
