.detective-interface .audio-card {
  --sound-amber: #f6a82d;
  --sound-amber-dim: rgba(196, 116, 26, 0.52);
  --sound-ink: #080806;
  --sound-paper: #16130e;
  --sound-teal: #9da99b;
  height: 520px;
  min-height: 520px;
  padding: 18px;
}

.detective-interface .sound-game {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 112px auto auto 1fr auto 13px;
  gap: 7px;
  height: 484px;
  padding: 14px 18px 10px;
  overflow: hidden;
  border: 1px solid rgba(224, 139, 38, 0.44);
  border-radius: 9px;
  background:
    radial-gradient(circle at 20% 9%, rgba(88, 54, 24, 0.23), transparent 32%),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(239, 192, 115, 0.016) 5px),
    linear-gradient(180deg, #151008 0%, #090806 54%, #070706 100%);
  box-shadow:
    inset 0 0 0 5px rgba(6, 6, 5, 0.68),
    inset 0 0 0 6px rgba(193, 112, 25, 0.25),
    inset 0 0 38px rgba(0, 0, 0, 0.7),
    0 18px 42px rgba(0, 0, 0, 0.48);
  color: #e8e4d8;
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  font-stretch: condensed;
}

.detective-interface .sound-game::after {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: -1;
  border: 1px solid rgba(202, 121, 29, 0.2);
  border-radius: 6px;
  pointer-events: none;
}

.detective-interface .sound-game h3,
.detective-interface .sound-game h4,
.detective-interface .sound-game p {
  margin: 0;
}

.detective-interface .sound-game__header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.detective-interface .sound-game h3 {
  padding-left: 8px;
  color: #a7b0a2;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(164, 180, 163, 0.2);
}

.detective-interface .sound-game__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 32px;
  border: 1px solid rgba(143, 153, 140, 0.3);
  background: rgba(2, 4, 3, 0.24);
  color: #8e998c;
  font-family: "Bahnschrift SemiCondensed", "Arial Narrow", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detective-interface .sound-game__stats span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.detective-interface .sound-game__stats span + span {
  border-left: 1px solid rgba(143, 153, 140, 0.28);
}

.detective-interface .sound-game__stats span:first-child::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("assets/audio-game/controls/round.png") center / contain no-repeat;
}

.detective-interface .sound-game__stats span:last-child::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("assets/audio-game/controls/score.png") center / contain no-repeat;
}

.detective-interface .sound-game__stats strong {
  color: var(--sound-amber);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.07em;
}

.detective-interface .sound-console {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid rgba(137, 151, 138, 0.23);
  border-radius: 3px;
  background:
    linear-gradient(90deg, rgba(95, 62, 28, 0.1), transparent 23%),
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(159, 176, 162, 0.018) 7px),
    #090b09;
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.32),
    inset 0 0 24px rgba(0, 0, 0, 0.55),
    0 2px 5px rgba(0, 0, 0, 0.55);
}

.detective-interface .sound-console__play,
.detective-interface .sound-console__replay,
.detective-interface .sound-pagination button {
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.detective-interface .sound-console__play {
  position: relative;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: url("assets/audio-game/controls/play.png") center / contain no-repeat;
  color: transparent;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
  box-shadow: none;
}

.detective-interface .sound-console__play.is-playing {
  background-image: url("assets/audio-game/controls/pause.png");
  color: transparent;
}

.detective-interface .sound-console__play:hover,
.detective-interface .sound-console__play:focus-visible {
  filter: brightness(1.12);
  transform: scale(1.03);
  box-shadow: 0 0 24px rgba(246, 168, 45, 0.42);
}

.detective-interface .sound-console__play span {
  opacity: 0;
}

.detective-interface .sound-console__display {
  align-self: stretch;
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  padding: 7px 8px 6px;
  border: 1px solid rgba(129, 145, 133, 0.21);
  background:
    repeating-linear-gradient(90deg, rgba(136, 154, 140, 0.025) 0 1px, transparent 1px 25px),
    repeating-linear-gradient(0deg, rgba(136, 154, 140, 0.025) 0 1px, transparent 1px 14px),
    #090d0b;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.58);
}

.detective-interface .sound-wave {
  display: flex;
  align-items: center;
  gap: 1px;
  min-height: 46px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(135, 155, 139, 0.13);
}

.detective-interface .sound-wave i {
  flex: 1;
  width: 2px;
  height: 32%;
  min-height: 3px;
  background: #718477;
  opacity: 0.67;
  transform-origin: center;
  box-shadow: 0 0 4px rgba(116, 143, 124, 0.15);
}

.detective-interface .sound-wave i:nth-child(3n + 1) { height: 18%; }
.detective-interface .sound-wave i:nth-child(3n + 2) { height: 64%; }
.detective-interface .sound-wave i:nth-child(4n) { height: 46%; }
.detective-interface .sound-wave i:nth-child(5n) { height: 78%; }

.detective-interface .audio-card.is-playing .sound-wave i {
  animation: soundWave 480ms ease-in-out infinite alternate;
}

.detective-interface .audio-card.is-playing .sound-wave i:nth-child(2n) { animation-delay: -140ms; }
.detective-interface .audio-card.is-playing .sound-wave i:nth-child(3n) { animation-delay: -280ms; }

.detective-interface .sound-console__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 5px;
  color: #69756b;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detective-interface .sound-console__meta time {
  color: #879789;
  font-size: 10px;
}

.detective-interface .sound-console__replay {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 50%;
  background: url("assets/audio-game/controls/replay.png") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  box-shadow: none;
}

.detective-interface .sound-console__replay:hover,
.detective-interface .sound-console__replay:focus-visible {
  filter: brightness(1.25);
  transform: rotate(-24deg);
}

.detective-interface .sound-game__instruction {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #899489;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-align: center;
  text-transform: uppercase;
}

.detective-interface .sound-game__instruction::before,
.detective-interface .sound-game__instruction::after,
.detective-interface .sound-game h4::before,
.detective-interface .sound-game h4::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(211, 128, 31, 0.43));
}

.detective-interface .sound-game__instruction::after,
.detective-interface .sound-game h4::after {
  transform: scaleX(-1);
}

.detective-interface .sound-game h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #aeb6a9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.detective-interface .sound-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 0;
}

.detective-interface .sound-answer {
  position: relative;
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 5px 12px 5px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: url("assets/audio-game/evidence-card.png") center / 100% 100% no-repeat;
  color: #9fa28e;
  text-align: left;
  cursor: pointer;
  clip-path: none;
  box-shadow: none;
  transition: filter 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.detective-interface .sound-answer__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
}

.detective-interface .sound-answer__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detective-interface .sound-answer strong {
  min-width: 0;
  color: #a9aa98;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.11em;
  line-height: 1.23;
  text-transform: uppercase;
  text-shadow: 0 1px 1px #000;
}

.detective-interface .sound-answer:hover:not(:disabled),
.detective-interface .sound-answer:focus-visible {
  filter: brightness(1.3) drop-shadow(0 0 5px rgba(241, 155, 48, 0.24));
  transform: translateY(-1px);
}

.detective-interface .sound-answer.is-correct {
  filter: brightness(1.25) sepia(0.2) hue-rotate(65deg);
}

.detective-interface .sound-answer.is-wrong {
  filter: brightness(0.9) sepia(0.4) hue-rotate(320deg);
}

.detective-interface .sound-pagination {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 10px;
}

.detective-interface .sound-pagination button {
  width: 38px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: url("assets/audio-game/controls/previous.png") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  box-shadow: none;
}

.detective-interface .sound-pagination button:last-child {
  background-image: url("assets/audio-game/controls/next.png");
}

.detective-interface .sound-pagination button:hover:not(:disabled),
.detective-interface .sound-pagination button:focus-visible {
  filter: brightness(1.3);
  transform: translateY(-1px);
}

.detective-interface .sound-pagination button:disabled {
  opacity: 0.34;
  cursor: default;
  transform: none;
}

.detective-interface .sound-pagination__position {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #55594f;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.detective-interface .sound-pagination__position strong {
  color: #777c70;
  font-size: 9px;
}

.detective-interface .sound-pagination__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 92px;
  height: 20px;
}

.detective-interface .sound-pagination__dots i {
  display: block;
  width: 15px;
  height: 15px;
  background: url("assets/audio-game/controls/lamp-2.png?v=2") center / contain no-repeat;
  filter: brightness(0.72);
}

.detective-interface .sound-pagination__dots i.is-active {
  background-image: url("assets/audio-game/controls/lamp-1.png?v=2");
  filter: none;
}

.detective-interface .sound-game__feedback {
  min-height: 13px;
  color: #b6a476;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

@keyframes soundWave {
  from { transform: scaleY(0.42); opacity: 0.44; }
  to { transform: scaleY(1.16); opacity: 0.9; }
}

@media (max-width: 600px) {
  .detective-interface .sound-game {
    padding-inline: 12px;
  }

  .detective-interface .sound-game h3 {
    font-size: 15px;
  }

  .detective-interface .sound-game__stats {
    font-size: 8px;
  }

  .detective-interface .sound-answer {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 5px;
    padding-inline: 5px;
  }

  .detective-interface .sound-answer__icon {
    height: 34px;
  }

  .detective-interface .sound-answer__icon,
  .detective-interface .sound-answer__icon img {
    width: 33px;
    height: 33px;
  }

  .detective-interface .sound-answer strong {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detective-interface .audio-card.is-playing .sound-wave i {
    animation: none;
  }
}
