:root {
  color-scheme: dark;
  --blue: #15b8ff;
  --green: #19ff42;
  --red: #ff1e1e;
  --white: #fff9ee;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  overflow: auto;
  background: #000;
  color: var(--white);
  font-family: "Comic Sans MS", "Segoe Print", "Bradley Hand ITC", cursive;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: url("images/img.png") left center / contain no-repeat;
  opacity: 0.34;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0 31%, rgba(0, 0, 0, 0.82) 48%, #000 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), #000 100%);
}

.soundboard {
  display: grid;
  grid-template-columns: minmax(120px, 25vw) 1fr;
  grid-template-rows: 1fr auto;
  gap: clamp(8px, 1.5vw, 20px);
  width: 100vw;
  min-height: 100vh;
  padding: clamp(10px, 2vw, 24px);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  padding-top: clamp(54px, 16vh, 132px);
  text-shadow: 0 2px 0 #001b23, 0 0 8px #000;
}

h1 {
  margin: 0 0 10px;
  color: var(--green);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 0.96;
  letter-spacing: 4px;
}

h1 span {
  color: var(--red);
}

.stop-button {
  min-height: 40px;
  padding: 7px 12px;
  border: 2px solid rgba(21, 184, 255, 0.9);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
  font: 700 clamp(0.9rem, 1.4vw, 1.05rem) Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(21, 184, 255, 0.28);
}

.hint {
  margin: 8px 0 0;
  max-width: 130px;
  color: var(--white);
  font: 800 clamp(0.72rem, 1.4vw, 1rem) Arial, sans-serif;
  line-height: 1.08;
  text-align: center;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-content: center;
  gap: clamp(4px, 1.1vh, 12px) clamp(8px, 1.8vw, 24px);
  min-width: 0;
}

.sound {
  min-width: 0;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  line-height: 1.08;
  text-shadow: 0 2px 0 var(--blue), 0 0 9px #000;
  white-space: normal;
  cursor: pointer;
  transition: color 140ms ease, text-shadow 140ms ease, transform 140ms ease;
}

.sound:hover,
.sound:focus-visible {
  color: #ffe58b;
  outline: 0;
  text-shadow: 0 2px 0 #ff3a3a, 0 0 13px rgba(255, 255, 255, 0.5);
}

.sound:active,
.sound.playing {
  color: var(--green);
  transform: translateY(2px) scale(0.98);
}

.sound-sm {
  grid-column: span 2;
  font-size: clamp(1.12rem, 2.75vw, 2rem);
}

.sound-xs {
  grid-column: span 1;
  font-size: clamp(1rem, 2.5vw, 1.85rem);
}

.sound-wide {
  grid-column: 1 / -1;
  font-size: clamp(1.08rem, 2.45vw, 1.8rem);
}

.sound-lg {
  grid-column: span 3;
  font-size: clamp(1.35rem, 3.6vw, 2.6rem);
  font-weight: 700;
}

.credits {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--green);
  font-size: clamp(1.5rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 0.95;
  text-align: center;
  text-shadow: 0 2px 0 #004b13, 0 0 12px #000;
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  body::before {
    background-position: center top;
    background-size: cover;
    opacity: 0.24;
  }

  body::after {
    background: rgba(0, 0, 0, 0.74);
  }

  .soundboard {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    height: auto;
  }

  .brand {
    align-items: center;
    padding-top: 0;
    text-align: center;
  }

  h1 {
    font-size: 1.35rem;
  }

  .hint {
    max-width: none;
  }

  .buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 8px 12px;
  }

  .sound,
  .sound-sm,
  .sound-xs,
  .sound-lg,
  .sound-wide {
    grid-column: span 1;
    min-height: 48px;
    font-size: clamp(1rem, 7vw, 1.65rem);
  }

  .sound-wide {
    grid-column: 1 / -1;
  }

  .credits {
    font-size: clamp(1.5rem, 9vw, 2.6rem);
  }
}
