@font-face {
  font-family: Alien;
  src: url("assets/AlienLeagueRegular.ttf");
  font-display: swap;
}
@font-face {
  font-family: LED;
  src: url("assets/TEXASLED.TTF");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --gold: #ffb337;
  --muted: #d8ccba;
  --u: calc(1vw + 1vh);
  --backdrop-shade: linear-gradient(#171512ad, #141210d1);
  --parallax-x: 0px;
  --parallax-y: 0px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  font-family: Arial, sans-serif;
  color: white;
  background: #211d18;
}
.backdrop {
  position: fixed;
  inset: -24px;
  z-index: -2;
  background-image:
    var(--backdrop-shade), url("assets/blockbuster_counter.jpg");
  background-position: center;
  background-size: cover;
  translate: var(--parallax-x) var(--parallax-y);
  will-change: translate;
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #0002 3px 4px);
  pointer-events: none;
}
.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
button,
select,
input {
  font: inherit;
}
button,
select {
  color: white;
  background: #24211eee;
  border: 2px solid #655749;
  border-radius: 7px;
  padding: 10px 16px;
}
button {
  cursor: pointer;
}
button:hover:not(:disabled) {
  border-color: var(--gold);
  background: #3c3022;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
.screen-controls {
  position: fixed;
  right: max(1.3%, env(safe-area-inset-right));
  top: max(1.5%, env(safe-area-inset-top));
  z-index: 30;
  display: flex;
  gap: 8px;
}
.screen-controls button {
  width: 46px;
  height: 44px;
  padding: 6px;
  display: grid;
  place-items: center;
}
.screen-controls svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#fullscreen-toggle .restore-icon,
#fullscreen-toggle.is-fullscreen .expand-icon {
  display: none;
}
#fullscreen-toggle.is-fullscreen .restore-icon {
  display: block;
}
.shmotime-credit {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eee;
  text-decoration: none;
  font-size: 12px;
  min-height: 44px;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}
.shmotime-credit:hover {
  opacity: 1;
}
.shmotime-credit img {
  width: 142px;
  height: auto;
}
@media (max-width: 600px) {
  .shmotime-credit {
    right: 16px;
    bottom: 14px;
  }
  .shmotime-credit img {
    width: 118px;
  }
}
h1,
h2,
h3,
.round,
.scoreboard,
.hints,
.countdown,
.results-title,
#result-title,
#activity-label {
  font-family: Alien, Arial, sans-serif;
  font-weight: normal;
  letter-spacing: 2px;
}
.start-screen,
.results-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.start-screen h1 {
  font-size: clamp(35px, 5.8vw, 90px);
  margin: 0 0 15px;
  text-shadow: 0 4px 12px black;
}
.start-screen {
  background: transparent;
}
.start-screen h1 {
  color: #eee;
}
.show-credit {
  font: clamp(14px, 1.5vw, 23px) Alien;
  letter-spacing: 4px;
  color: var(--gold);
  margin: 0;
}
.start-screen #start {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10vh;
  padding: 25px;
  color: white;
  animation: pulse 2s infinite;
}
.start-screen #start strong {
  font: clamp(34px, 4.8vw, 72px) Alien;
  letter-spacing: 4px;
}
.start-screen #start span {
  font: clamp(18px, 2vw, 30px) Alien;
  letter-spacing: 3px;
}
.countdown {
  position: absolute;
  top: 5%;
  left: 6%;
  text-align: center;
  font-size: clamp(19px, 2.4vw, 34px);
}
#clock {
  font:
    clamp(48px, 7vw, 98px) LED,
    monospace;
  background: #111e;
  border: 1px solid #60482e;
  border-radius: 12px;
  padding: 18px 22px;
  color: #ffd7aa;
  text-shadow: 0 0 16px #ff9f4570;
  min-width: 1.8em;
}
.scoreboard {
  position: absolute;
  top: 3%;
  left: 60%;
  transform: translateX(-50%);
  font-size: clamp(28px, 3vw, 48px);
  white-space: nowrap;
}
#score {
  color: var(--gold);
}
.host {
  position: absolute;
  bottom: -20px;
  translate: calc(-1 * var(--parallax-x)) var(--parallax-y);
  will-change: translate;
  left: -2%;
  width: 38%;
  height: 67%;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(3px 4px 6px #000a);
  pointer-events: none;
}
.movies {
  position: absolute;
  top: 32%;
  left: 62%;
  transform: translate(-50%, -50%);
  width: 61%;
  display: flex;
  justify-content: center;
  gap: 2.2vw;
  visibility: hidden;
}
.movies.revealed {
  visibility: visible;
}
.movie {
  position: relative;
  width: 27%;
  padding: 0;
  border: 5px solid transparent;
  border-radius: 15px;
  background: #161616aa;
  opacity: 0;
  transform: rotate(-5deg) skewY(-10deg);
  box-shadow: 0 5px 15px #0008;
  transition: border-color 0.15s ease;
}
.revealed .movie {
  animation: tapeIn 0.32s ease forwards;
}
.revealed .movie:nth-child(2) {
  animation-delay: 0.06s;
}
.revealed .movie:nth-child(3) {
  animation-delay: 0.12s;
}
.movie:hover:not(:disabled),
.movie.chosen,
.movie.locked {
  border-color: var(--gold);
}
.movie.correct {
  border-color: #94c67a;
}
.movie img {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 10px;
}
.movie .title {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 7px 3px;
  font-size: clamp(10px, 1vw, 15px);
  background: #111d;
  border-radius: 0 0 9px 9px;
  opacity: 0;
  transition: opacity 0.15s;
}
.movie:hover .title,
.movie:focus-visible .title,
.movie.locked .title,
.movie.no-poster .title {
  opacity: 1;
}
.movie.no-poster {
  aspect-ratio: 2/3;
}
.movie.no-poster .title {
  position: static;
}
.key {
  position: absolute;
  left: 6px;
  top: 6px;
  padding: 3px 7px;
  background: #000b;
  border-radius: 4px;
  font:
    12px Arial,
    sans-serif;
  letter-spacing: normal;
  color: var(--gold);
}
.speech {
  position: absolute;
  left: 36%;
  right: 5%;
  top: 59%;
  min-height: 17%;
  max-height: 28%;
  overflow: auto;
  border: 5px solid var(--gold);
  border-radius: 22px;
  padding: 16px 22px;
  background: #090909df;
  text-align: center;
  box-shadow: 0 10px 25px #0007;
}
.speaker-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.speaker-row strong {
  font: clamp(20px, 2vw, 30px) Alien;
  letter-spacing: 2px;
  color: var(--gold);
}
.caption {
  font-family: "Comic Sans MS", Arial, sans-serif;
  font-size: clamp(18px, 2.1vw, 32px);
  line-height: 1.25;
  overflow-wrap: break-word;
  min-height: 1.3em;
}
.caption-word {
  display: inline-block;
  white-space: nowrap;
}
.caption-letter {
  display: inline-block;
  opacity: 0.35;
  transform-origin: 50% 80%;
}
.caption-letter.revealed {
  opacity: 1;
  animation: captionLetterIn 0.2s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.round {
  position: absolute;
  bottom: 5%;
  left: 65%;
  transform: translateX(-50%);
  font-size: clamp(27px, 3.3vw, 50px);
  white-space: nowrap;
}
.hints {
  position: absolute;
  left: 2%;
  bottom: 2%;
  font-size: clamp(18px, 1.9vw, 30px);
  background: #222e;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
}
.hint-list {
  display: flex;
  gap: 8px;
  margin-top: 5px;
}
.hint {
  width: clamp(40px, 4.8vw, 70px);
  height: clamp(40px, 4.8vw, 70px);
  padding: 0;
  border: 2px solid #ddd;
  background: #242424;
  font: clamp(20px, 2vw, 30px) Alien;
}
.hint.used {
  opacity: 0.4;
  font-size: 16px;
}
.hint:not(.used):disabled {
  border-color: #766855;
}
#activity {
  position: fixed;
  bottom: 2%;
  right: 2%;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #191715ee;
  border: 1px solid #ae7f38;
  border-radius: 8px;
  pointer-events: none;
}
#activity-label {
  font-size: clamp(17px, 2vw, 28px);
}
.eq {
  display: flex;
  gap: 3px;
  height: 24px;
  align-items: center;
}
.eq i {
  width: 4px;
  height: 24px;
  background: var(--gold);
  animation: eq 0.7s ease infinite alternate;
}
.eq i:nth-child(2) {
  animation-delay: 0.15s;
}
.eq i:nth-child(3) {
  animation-delay: 0.3s;
}
.eq i:nth-child(4) {
  animation-delay: 0.45s;
}
#status {
  position: fixed;
  bottom: 0;
  left: 35%;
  right: 20%;
  margin: 3px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
body.menu-paused * {
  animation-play-state: paused !important;
}
.results-screen {
  background: linear-gradient(332deg, #202020f2, #3b3b3bea);
  gap: 10px;
}
.results-title {
  font-size: clamp(28px, 3vw, 46px);
  margin: 0;
}
#total-score {
  font: clamp(48px, 7vw, 110px) LED;
  color: var(--gold);
  margin: 15px 0;
}
#result-details {
  height: 2em;
  font: clamp(20px, 2.3vw, 34px) Alien;
  color: var(--muted);
}
#result-title {
  font-size: clamp(35px, 4vw, 60px);
  margin: 20px 0;
  animation: pulse 2s infinite;
}
#again,
#result-exit {
  font: 25px Alien;
  letter-spacing: 2px;
}
dialog {
  width: min(700px, 94vw);
  max-height: 92svh;
  overflow: auto;
  background: radial-gradient(#3a3631, #171615);
  border: 2px solid #887458;
  border-radius: 12px;
  color: white;
  padding: 25px;
}
dialog::backdrop {
  background: #000b;
}
.menu-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
#menu-close {
  width: 44px;
  height: 44px;
  padding: 0;
  font:
    30px Arial,
    sans-serif;
}
dialog h2 {
  text-align: center;
  color: var(--gold);
  font-size: 36px;
  margin: 0;
}
dialog nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 25px;
}
dialog nav button,
.menu-actions button {
  font: 24px Alien;
  letter-spacing: 1px;
}
dialog [aria-selected="true"] {
  border-color: var(--gold);
  color: var(--gold);
}
dialog p,
dialog li {
  font: 15px/1.6 Arial;
}
a {
  color: var(--gold);
}
.settings {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.settings input[type="checkbox"] {
  width: 23px;
  height: 23px;
  accent-color: var(--gold);
}
.settings input[type="range"] {
  accent-color: var(--gold);
}
.menu-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}
.host.speaking {
  animation: talk 0.2s alternate infinite;
}
@keyframes talk {
  to {
    transform: translateY(-2px);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.6;
  }
}
@keyframes tapeIn {
  to {
    opacity: 1;
    transform: rotate(0) skewY(0);
  }
}
@keyframes captionLetterIn {
  0% {
    transform: translateY(8px) scale(0.5);
    opacity: 0.35;
  }
  60% {
    transform: translateY(-2px) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
@keyframes eq {
  to {
    transform: scaleY(0.2);
  }
}
@media (orientation: portrait) {
  .countdown {
    top: 3%;
    left: 4%;
    font-size: 18px;
  }
  #clock {
    font-size: 44px;
    padding: 12px 18px;
  }
  .scoreboard {
    top: 5%;
    left: 60%;
    font-size: 30px;
  }
  .movies {
    top: 30%;
    left: 50%;
    width: 96%;
    gap: 8px;
  }
  .movie {
    width: 30%;
    border-width: 3px;
    border-radius: 10px;
  }
  .speech {
    left: 5%;
    right: 5%;
    top: 49%;
    min-height: 17%;
    max-height: 23%;
    padding: 12px 15px;
    border-width: 3px;
  }
  .caption {
    font-size: clamp(17px, 4.5vw, 25px);
  }
  .host {
    width: 58%;
    height: 33%;
    left: -2%;
  }
  .round {
    left: auto;
    right: 4%;
    transform: none;
    bottom: 20%;
    font-size: 32px;
  }
  .hints {
    left: auto;
    right: 4%;
    bottom: 6%;
    padding: 6px;
  }
  .hint {
    width: 45px;
    height: 45px;
  }
  .start-screen h1 {
    font-size: 10vw;
    max-width: 90%;
  }
  #activity {
    bottom: 1%;
    right: 2%;
    padding: 6px 8px;
  }
  #activity-label {
    font-size: 17px;
  }
  #status {
    left: 5%;
    right: 5%;
    bottom: 0;
    font-size: 10px;
  }
  .show-credit {
    font-size: 17px;
  }
  .results-screen {
    padding: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .movie {
    opacity: 1;
    transform: none;
  }
  .caption-letter {
    transform: none;
  }
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
@media (max-width: 520px) {
  dialog {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
    padding: 20px 16px;
  }
  dialog h2 {
    font-size: 27px;
    letter-spacing: 1px;
    margin-bottom: 0;
  }
  dialog nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 24px;
  }
  dialog nav button {
    font-size: 20px;
    padding: 10px 4px;
    min-height: 44px;
  }
  .settings {
    gap: 0;
  }
  .settings label {
    min-height: 64px;
    padding: 12px 0;
    gap: 12px;
    border-bottom: 1px solid #655749;
  }
  .settings select {
    width: 58%;
    min-width: 0;
    min-height: 44px;
    padding: 8px;
  }
  .settings input[type="range"] {
    width: 58%;
    min-width: 0;
    min-height: 44px;
  }
  .settings input[type="checkbox"] {
    flex-shrink: 0;
    margin: 10px;
  }
  .menu-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
  }
  .menu-actions button {
    font-size: 20px;
    padding: 12px 8px;
    min-height: 44px;
  }
  .result-actions {
    flex-direction: column;
  }
}

.start-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: startContentIn 0.7s ease-out both;
}
@keyframes startContentIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
#activity-glow {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: radial-gradient(
    ellipse min(420px, 72vw) min(190px, 24vh) at 100% 100%,
    #ffb337dc 0%,
    #ffb33766 35%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
#activity-glow.active {
  opacity: 1;
}
.host.entering {
  animation: hostIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.host.leaving {
  animation: hostOut 0.25s ease-in both;
}
@keyframes hostIn {
  from {
    transform: translateX(-105%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes hostOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-105%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop,
  .host {
    translate: none;
    will-change: auto;
  }
}

.score-award {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 18px;
  animation: awardIn 0.3s ease-out both;
}
.score-award strong {
  font: inherit;
  color: var(--gold);
}
@keyframes awardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.movie-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    var(--backdrop-shade),
    var(--movie-backdrop, url("assets/blockbuster_counter.jpg"));
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.22s ease-out;
}
.movie-backdrop.visible {
  opacity: 1;
}

@media (max-width: 600px) {
  .scoreboard {
    top: 72px;
    right: 5%;
    left: auto;
    transform: none;
  }
}

#max-popup {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 10;
  color: var(--gold);
  pointer-events: none;
  text-align: center;
  text-shadow:
    0 2px 3px #000,
    0 0 18px #ffb337a0;
  transform: translateX(-50%);
}
#max-popup strong {
  display: block;
  font:
    bold 46px/1 Alien,
    sans-serif;
  letter-spacing: 4px;
}
#max-combo {
  display: block;
  font:
    bold 12px/1.6 Arial,
    sans-serif;
  white-space: nowrap;
  letter-spacing: 1px;
}
#max-popup.active {
  animation: maxFloat 1.3s ease-out both;
}
@keyframes maxFloat {
  0% {
    opacity: 0;
    transform: translate(-50%, 4px) scale(0.75);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -8px) scale(1.1);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -65px) scale(1);
  }
}
#perfect-result {
  margin: 0 0 16px;
  color: var(--gold);
  text-align: center;
}
#perfect-result strong {
  display: block;
  font:
    32px Alien,
    sans-serif;
  letter-spacing: 4px;
}
#perfect-result span {
  display: block;
  font:
    bold 12px Arial,
    sans-serif;
  letter-spacing: 2px;
  margin-top: 5px;
}
@media (prefers-reduced-motion: reduce) {
  #max-popup.active {
    animation: maxFade 1.3s ease-out both;
    animation-duration: 1.3s !important;
  }
}
@keyframes maxFade {
  0%,
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
