:root {
  color-scheme: dark;
  --bg: #070b14;
  --bg-2: #111527;
  --panel: rgba(18, 24, 38, 0.9);
  --panel-soft: rgba(28, 38, 58, 0.78);
  --text: #fff9e8;
  --muted: #c9d5e7;
  --line: rgba(144, 231, 255, 0.22);
  --line-hot: rgba(255, 208, 104, 0.64);
  --gold: #ffd05f;
  --cyan: #7ee8ff;
  --mint: #7df3be;
  --pink: #ff6fae;
  --coral: #ff8a66;
  --ink: #11121a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18px 24px, rgba(255, 249, 232, 0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle at 92px 76px, rgba(126, 232, 255, 0.85) 0 1px, transparent 1.5px),
    radial-gradient(circle at 160px 32px, rgba(255, 111, 174, 0.78) 0 1px, transparent 1.5px),
    linear-gradient(135deg, #06121d 0%, #121429 44%, #271b1c 100%);
  background-size: 180px 140px, 220px 180px, 260px 200px, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 96%, rgba(126, 232, 255, 0.08) 96% 100%),
    linear-gradient(0deg, transparent 0 96%, rgba(255, 208, 95, 0.08) 96% 100%);
  background-size: 86px 86px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 78%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.shell {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 56px;
}

.hero {
  position: relative;
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10px;
  width: 236px;
  height: 92px;
  border: 1px solid rgba(126, 232, 255, 0.28);
  border-radius: 50%;
  transform: rotate(-12deg);
  opacity: 0.8;
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  background:
    linear-gradient(135deg, rgba(255, 208, 95, 0.16), rgba(126, 232, 255, 0.18)),
    #1b2032;
  color: var(--gold);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(255, 208, 95, 0.24), inset 0 0 18px rgba(126, 232, 255, 0.14);
  font-size: 2rem;
  font-weight: 950;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 6.4rem;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 0 28px rgba(126, 232, 255, 0.22);
}

.hero-copy {
  max-width: 680px;
  margin: 0;
  color: #eff7ff;
  font-size: 1.22rem;
  line-height: 1.45;
}

.game-surface {
  position: relative;
  display: grid;
  gap: 16px;
}

.game-surface::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border: 1px solid rgba(255, 208, 95, 0.14);
  border-radius: 8px;
  transform: rotate(0.4deg);
}

.round-panel,
.guess-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.round-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.round-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(126, 232, 255, 0.12), transparent 38%, rgba(255, 111, 174, 0.12));
}

.round-panel > * {
  position: relative;
}

.status-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.snippet-readout {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 2.85rem;
  font-weight: 950;
  line-height: 1;
}

.song-count {
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid rgba(126, 232, 255, 0.28);
  border-radius: 8px;
  color: #f7fbff;
  background: rgba(7, 11, 20, 0.68);
  text-align: right;
  font-size: 0.92rem;
}

.scrubber-wrap {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.scrubber-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.snippet-scrubber {
  width: 100%;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--gold);
  cursor: pointer;
  appearance: none;
}

.snippet-scrubber::-webkit-slider-runnable-track {
  height: 12px;
  border: 1px solid rgba(126, 232, 255, 0.3);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 232, 255, 0.28), rgba(255, 208, 95, 0.42), rgba(255, 111, 174, 0.34));
}

.snippet-scrubber::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -7px;
  border: 2px solid #fff9e8;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 20px rgba(255, 208, 95, 0.7);
  appearance: none;
}

.snippet-scrubber::-moz-range-track {
  height: 12px;
  border: 1px solid rgba(126, 232, 255, 0.3);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 232, 255, 0.28), rgba(255, 208, 95, 0.42), rgba(255, 111, 174, 0.34));
}

.snippet-scrubber::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid #fff9e8;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 20px rgba(255, 208, 95, 0.7);
}

.controls,
.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--gold), var(--coral));
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(255, 138, 102, 0.22);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid rgba(126, 232, 255, 0.35);
  background: rgba(25, 35, 54, 0.88);
  color: var(--text);
}

.secondary-button:hover:not(:disabled) {
  background: rgba(43, 59, 87, 0.92);
  box-shadow: 0 10px 26px rgba(126, 232, 255, 0.12);
}

.guess-panel {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.guess-panel label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.guess-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(126, 232, 255, 0.34);
  border-radius: 8px;
  background: rgba(5, 9, 17, 0.78);
  color: var(--text);
  padding: 0 14px;
  outline: 0;
}

input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 208, 95, 0.2), 0 0 28px rgba(126, 232, 255, 0.16);
}

.suggestions {
  display: grid;
  max-height: 278px;
  overflow: auto;
  border: 1px solid transparent;
  border-radius: 8px;
}

.suggestions:not(:empty) {
  border-color: rgba(126, 232, 255, 0.24);
  background: rgba(5, 9, 17, 0.82);
}

.suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.suggestion:hover,
.suggestion.is-active {
  background: linear-gradient(90deg, rgba(126, 232, 255, 0.16), rgba(255, 208, 95, 0.12));
}

.suggestion small {
  flex: 0 0 auto;
  max-width: 38%;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attempts {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.attempt {
  min-height: 58px;
  border: 1px solid rgba(126, 232, 255, 0.22);
  border-radius: 8px;
  background: rgba(16, 23, 37, 0.72);
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
  overflow: hidden;
}

.attempt.is-miss {
  color: #ffd8e5;
  border-color: rgba(255, 111, 174, 0.62);
  background: rgba(255, 111, 174, 0.13);
}

.attempt.is-close {
  color: #fff4be;
  border-color: rgba(255, 208, 95, 0.78);
  background: linear-gradient(135deg, rgba(255, 208, 95, 0.18), rgba(126, 232, 255, 0.1));
}

.attempt.is-hit {
  color: #dcfff0;
  border-color: rgba(125, 243, 190, 0.78);
  background: rgba(125, 243, 190, 0.16);
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 18px;
  padding: 18px;
}

.result-panel.is-hidden {
  display: none;
}

.cover-wrap {
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(126, 232, 255, 0.28);
  background: #080d17;
  aspect-ratio: 1;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.cover-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.result-copy h2 {
  margin: 0;
  font-size: 2.8rem;
  line-height: 1;
  letter-spacing: 0;
}

.result-copy p {
  margin: 0;
  color: #e8f1ff;
  line-height: 1.45;
}

.message {
  min-height: 24px;
  margin: 0;
  color: #f0f6ff;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 22px, 1000px);
    padding-top: 30px;
  }

  .hero::after {
    width: 150px;
    height: 58px;
    top: 24px;
  }

  .brand-mark {
    width: 54px;
    font-size: 1.7rem;
  }

  h1 {
    font-size: 4rem;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .status-row,
  .guess-row,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .status-row,
  .scrubber-label {
    display: grid;
  }

  .song-count {
    max-width: none;
    text-align: left;
  }

  .snippet-readout {
    font-size: 2.15rem;
  }

  .attempts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cover-wrap {
    width: min(210px, 100%);
  }

  .result-copy h2 {
    font-size: 2rem;
  }
}
