:root {
  --shot-navy: #12314a;
  --shot-teal: #23aeb3;
  --shot-coral: #f06c50;
  --shot-gold: #f4b62f;
  --shot-cream: #fff8e8;
  --shot-line: #dce9e9;
}

html,
body {
  background: #fff;
  color: var(--shot-navy);
}

body {
  min-width: 320px;
}

.basketball-app {
  width: min(calc(100% - 28px), 1280px);
  padding: 14px 0 24px;
}

.basketball-header {
  min-height: 58px;
  margin-bottom: 10px;
}

.basketball-brand small {
  color: var(--shot-teal);
}

.basketball-brand h1 {
  color: var(--shot-navy);
}

.basketball-brand h1 b {
  color: var(--shot-coral);
}

.brand-ball {
  border-color: #a74625;
  box-shadow: 0 8px 24px rgba(224, 104, 49, .23);
}

.basketball-header nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--shot-line);
  color: var(--shot-navy);
  background: #fff;
  box-shadow: 0 5px 15px rgba(24, 72, 86, .07);
}

.basketball-header nav a:hover,
.basketball-header nav a:focus-visible {
  border-color: var(--shot-coral);
  color: var(--shot-coral);
}

.arcade-machine {
  overflow: hidden;
  border: 1px solid #cadfe0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 74px rgba(29, 71, 83, .16);
}

.machine-top {
  min-height: 92px;
  grid-template-columns: 170px 1fr 170px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
  background: linear-gradient(135deg, #163c56, #102d45);
  box-shadow: none;
}

.marquee-lights {
  opacity: .72;
  background: radial-gradient(circle, #ffd45d 0 2px, transparent 3px);
  filter: drop-shadow(0 0 3px rgba(255, 190, 44, .9));
}

.led-panel {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(4, 23, 36, .58);
  box-shadow: inset 0 0 20px rgba(50, 216, 221, .06);
}

.led-panel strong {
  color: #ffd25f;
  text-shadow: 0 0 11px rgba(255, 195, 46, .42);
}

.machine-title strong {
  color: #fff;
  text-shadow: 3px 3px rgba(240, 108, 80, .75);
}

.machine-title small {
  color: #ffd25f;
}

.machine-title b {
  color: #69e1df;
}

.round-hud {
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--shot-line);
  background: #fff;
  box-shadow: 0 5px 20px rgba(21, 68, 82, .08);
}

.round-hud span,
.word-monitor small {
  color: #79909c;
}

.round-hud > div > strong {
  color: var(--shot-coral);
}

.word-monitor {
  border-color: var(--shot-line);
}

.word-monitor > strong i {
  color: var(--shot-navy);
}

.word-monitor > strong i:last-child {
  color: var(--shot-coral);
}

.word-monitor > strong b {
  color: #9bb2b9;
}

.court {
  min-height: 630px;
  overflow: hidden;
  isolation: isolate;
  background-color: #f8f3eb;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, .04), rgba(5, 47, 58, .08)), url("./assets/word-arcade-commercial-v2/runtime/background-basketball.webp");
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 15px 35px rgba(55, 83, 86, .08), inset 0 -20px 32px rgba(56, 83, 82, .08);
}

.hoop {
  z-index: 13;
  top: 6.2%;
  width: clamp(222px, 22%, 278px);
  height: auto;
  aspect-ratio: 245 / 252;
  transform: translateX(-50%);
}

.hoop > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 13px rgba(54, 61, 58, .2));
}

.rim {
  top: 41%;
  left: 17%;
  width: 66%;
  height: 9%;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}

.hoop.scored,
.hoop.rim-hit {
  animation: none;
}

.game-ball {
  z-index: 22;
  width: 150px;
  height: 214px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  touch-action: none;
  cursor: grab;
  will-change: left, top, transform, opacity;
}

.game-ball::before,
.game-ball::after,
.game-ball .ball-line {
  display: none;
  content: none;
}

.game-ball:focus-visible {
  outline: 4px solid rgba(35, 174, 179, .6);
  outline-offset: 5px;
}

.game-ball > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 12px 11px rgba(36, 64, 65, .18));
}

.game-ball b {
  top: 33.5%;
  width: 69%;
  min-width: 0;
  padding: 0 3px;
  overflow: hidden;
  border-radius: 0;
  color: #173247;
  background: transparent;
  box-shadow: none;
  font-size: clamp(13px, 1.45vw, 18px);
  line-height: 1;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-ball.ready {
  animation: shot-ready 1.25s ease-in-out infinite alternate;
}

.game-ball.in-flight,
.game-ball.scored-ball,
.game-ball.missed-ball {
  width: 98px;
  height: 104px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
  pointer-events: none;
}

.game-ball.in-flight b,
.game-ball.scored-ball b,
.game-ball.missed-ball b {
  top: 49%;
  width: 77%;
  font-size: 12px;
}

.game-ball.launching {
  opacity: 0;
}

.game-ball.scored-ball {
  z-index: 12;
  animation: shot-through-net 620ms ease forwards;
}

.game-ball.missed-ball {
  animation: shot-roll-away 570ms ease forwards;
}

.game-ball.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes shot-ready {
  from { transform: translate(-50%, -50%) translateY(2px); }
  to { transform: translate(-50%, -50%) translateY(-5px); }
}

@keyframes shot-through-net {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  55% { opacity: .95; transform: translate(-50%, 36px) scale(.78); }
  100% { opacity: 0; transform: translate(-50%, 110px) scale(.58); }
}

@keyframes shot-roll-away {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(105px, 95px) scale(.7); }
}

.shooting-hand {
  position: absolute;
  z-index: 20;
  bottom: -8px;
  left: 50%;
  display: block;
  width: 146px;
  height: auto;
  opacity: 0;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 13px 12px rgba(42, 68, 68, .18));
  pointer-events: none;
}

.shooting-hand.release,
.shooting-hand.followthrough {
  opacity: 1;
}

.shooting-hand.release {
  width: 136px;
  animation: hand-release .15s ease-out both;
}

.shooting-hand.followthrough {
  width: 128px;
  animation: hand-follow .36s ease-out both;
}

@keyframes hand-release {
  from { transform: translateX(-50%) translateY(16px) scale(.96); }
  to { transform: translateX(-50%) translateY(-2px) scale(1); }
}

@keyframes hand-follow {
  0% { transform: translateX(-50%) translateY(9px); }
  55% { transform: translateX(-50%) translateY(-9px); }
  100% { transform: translateX(-50%) translateY(0); }
}

.shot-impact {
  position: absolute;
  z-index: 27;
  top: 15%;
  left: 50%;
  width: 130px;
  height: 130px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.4);
  pointer-events: none;
}

.shot-impact.show {
  animation: shot-impact .64s ease-out both;
}

@keyframes shot-impact {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(-12deg); }
  32% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(4deg); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(.84); }
}

.trajectory {
  z-index: 17;
}

.trajectory i {
  width: 9px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, .9);
  background: var(--shot-teal);
  box-shadow: 0 0 0 3px rgba(35, 174, 179, .2);
}

.shot-callout {
  z-index: 25;
  top: 18px;
  left: 18px;
  min-width: 222px;
  border: 1px solid rgba(255, 255, 255, .86);
  color: var(--shot-navy);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 28px rgba(30, 68, 76, .12);
}

.shot-callout small {
  color: var(--shot-coral);
}

.pair-flash {
  top: 52%;
  min-width: 310px;
  border: 2px solid rgba(35, 174, 179, .6);
  color: var(--shot-navy);
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 15px 40px rgba(31, 77, 84, .18);
}

.pair-flash small {
  color: var(--shot-gold);
}

.pair-flash strong i {
  color: var(--shot-teal);
}

.pair-flash strong i:last-child {
  color: var(--shot-coral);
}

.pair-flash strong b {
  color: #91a8ae;
}

.score-burst {
  top: 30%;
  left: 62%;
  color: #d58a07;
  text-shadow: 0 3px 13px rgba(255, 171, 26, .34);
}

.last-ten {
  color: rgba(226, 79, 61, .13);
  text-shadow: none;
}

.basket-start,
.basket-result {
  padding: 18px;
  color: var(--shot-navy);
  background: rgba(240, 248, 247, .82);
  backdrop-filter: blur(9px);
}

.basket-start-panel,
.basket-result > div {
  width: min(100%, 700px);
  border: 1px solid rgba(35, 174, 179, .28);
  color: var(--shot-navy);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 24px 68px rgba(31, 70, 79, .19);
}

.basket-start-panel > p:first-child,
.basket-result p {
  color: var(--shot-teal);
}

.basket-start-panel h2,
.basket-result h2 {
  color: var(--shot-navy);
  overflow-wrap: anywhere;
  word-break: keep-all;
  line-height: 1.23;
}

.rule-flow span {
  border-color: var(--shot-line);
  background: #f7fbfa;
}

.rule-flow span b {
  color: #fff;
  background: var(--shot-coral);
}

.rule-flow span i {
  color: #728992;
}

.rule-flow span strong {
  color: var(--shot-navy);
}

.rule-flow em {
  color: #9fb2b7;
}

.start-guide {
  color: #627b85;
}

.start-guide kbd {
  border-color: #cadbdc;
  color: var(--shot-navy);
  background: #f3f8f7;
}

.basket-start-panel > button,
.basket-result button {
  color: #fff;
  background: linear-gradient(135deg, var(--shot-coral), #ee8a4f);
  box-shadow: 0 11px 26px rgba(235, 108, 69, .25);
}

.basket-start-panel > button span {
  background: rgba(128, 47, 30, .46);
}

.basket-start-panel > small {
  color: #91a4aa;
}

.basket-result > div > strong {
  color: var(--shot-coral);
  text-shadow: none;
}

.basket-result section span {
  border-color: var(--shot-line);
  color: #78909a;
  background: #f7fbfa;
}

.basket-result section b {
  color: var(--shot-navy);
}

.control-deck {
  border: 0;
  border-top: 1px solid var(--shot-line);
  color: var(--shot-navy);
  background: #fff;
  box-shadow: none;
}

.aim-control,
.power-control {
  border-color: var(--shot-line);
  background: #f7faf9;
}

.aim-control > span,
.power-control > span {
  color: #718995;
}

.aim-control button {
  border-color: #cee0e1;
  color: var(--shot-navy);
  background: #fff;
}

.aim-control button:hover,
.aim-control button:focus-visible {
  border-color: var(--shot-teal);
  color: var(--shot-teal);
}

.aim-track,
.power-track {
  background: #dbe7e6;
}

.aim-track::before {
  background: #9ab0b4;
}

.aim-track i {
  border-color: var(--shot-coral);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(240, 108, 80, .14);
}

.power-track {
  border-color: #c9dcdd;
}

.power-track > i {
  background: linear-gradient(90deg, var(--shot-teal), #9ed456 54%, #f2bf38 72%, var(--shot-coral));
}

.power-track > b {
  color: #789099;
}

.power-track > b::before {
  background: var(--shot-navy);
}

.shoot-button {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, #f58558, #e85348);
  box-shadow: 0 7px 0 #b93b35, 0 12px 25px rgba(221, 74, 59, .2), inset 0 2px 8px rgba(255, 255, 255, .28);
}

.shoot-button:active,
.shoot-button.charging {
  box-shadow: 0 2px 0 #b93b35, 0 7px 18px rgba(221, 74, 59, .26), inset 0 2px 8px rgba(255, 255, 255, .2);
}

.arcade-button {
  border-color: #cee0e1;
  color: var(--shot-navy);
  background: #f7faf9;
}

.basket-footer {
  color: #6f8690;
}

.basket-footer b {
  color: var(--shot-coral);
}

.basketball-app.paused .court::after {
  color: #fff;
  background: rgba(17, 49, 72, .66);
}

@media (max-width: 760px) {
  .basketball-app {
    width: min(calc(100% - 8px), 1280px);
    padding-top: 6px;
  }

  .basketball-header {
    min-height: 48px;
    margin-bottom: 6px;
  }

  .basketball-header nav a {
    min-height: 32px;
  }

  .arcade-machine {
    border-radius: 16px;
  }

  .machine-top {
    min-height: 82px;
    grid-template-columns: 76px 1fr 76px;
  }

  .round-hud {
    min-height: 60px;
  }

  .court {
    min-height: 560px;
    background-position: center;
  }

  .hoop {
    top: 7.5%;
    width: 190px;
  }

  .game-ball {
    width: 124px;
    height: 177px;
  }

  .game-ball b {
    font-size: 12px;
  }

  .game-ball.in-flight,
  .game-ball.scored-ball,
  .game-ball.missed-ball {
    width: 78px;
    height: 83px;
  }

  .game-ball.in-flight b,
  .game-ball.scored-ball b,
  .game-ball.missed-ball b {
    font-size: 9px;
  }

  .shooting-hand.release {
    width: 116px;
  }

  .shooting-hand.followthrough {
    width: 108px;
  }

  .shot-impact {
    top: 18%;
    width: 100px;
    height: 100px;
  }

  .shot-callout {
    min-width: 168px;
  }

  .pair-flash {
    top: 50%;
    min-width: 236px;
  }

  .control-deck {
    grid-template-columns: 1fr 1fr 46px 46px;
  }

  .basket-start,
  .basket-result {
    padding: 8px;
  }

  .basket-start-panel,
  .basket-result > div {
    padding: 20px 10px;
  }

  .basket-start-panel h2 {
    max-width: 410px;
    margin-right: auto;
    margin-left: auto;
    font-size: 20px;
  }

  .rule-flow span {
    min-width: 85px;
  }
}

@media (max-width: 430px) {
  .basketball-brand small {
    display: none;
  }

  .basketball-brand h1 {
    font-size: 21px;
  }

  .brand-ball {
    width: 36px;
    height: 36px;
  }

  .machine-title strong {
    font-size: 16px;
  }

  .machine-title small,
  .machine-title b {
    display: none;
  }

  .word-monitor > strong i {
    min-width: 58px;
    font-size: 12px;
  }

  .court {
    min-height: 540px;
  }

  .rule-flow span {
    min-width: 0;
    flex: 1 1 0;
  }

  .rule-flow em {
    display: none;
  }

}
