/* Sobat Flight. Every rule starts with #sobat-flight so the site theme and the game keep out of each other's way. */
#sobat-flight {
  --sf-deep: #191127;
  --sf-panel: #22172f;
  --sf-raised: #302043;
  --sf-line: #806194;
  --sf-soft-line: #4b3666;
  --sf-pink: #ff85c7;
  --sf-lavender: #ccb0fa;
  --sf-paper: #fff3df;
  --sf-body: #e0d4ed;
  --sf-muted: #a993c0;
  box-sizing: border-box;
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid var(--sf-line);
  background: var(--sf-deep);
  color: var(--sf-paper);
  font: 400 16px/1.6 Rubik, system-ui, sans-serif;
  text-align: left;
  overflow: hidden;
}
#sobat-flight *,
#sobat-flight *::before,
#sobat-flight *::after {
  box-sizing: inherit;
}
/* WordPress themes style buttons, inputs, paragraphs and code globally. Put them back to neutral
   inside the game; the game's own rules below are more specific and win over these. */
#sobat-flight :is(button, input, p, h3, dl, dt, dd, code, details, summary, a, svg, span, strong, small, label, fieldset) {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: normal;
  line-height: inherit;
  color: inherit;
  text-decoration: none;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: none;
  float: none;
  opacity: 1;
}
#sobat-flight svg {
  overflow: hidden;
}
#sobat-flight [hidden] {
  display: none !important;
}
#sobat-flight :is(button, input, summary, a):focus-visible {
  outline: 3px solid var(--sf-pink);
  outline-offset: 3px;
}
#sobat-flight p {
  margin: 0;
}

/* Header, recent results and wallet */
#sobat-flight .sf-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--sf-line);
}
#sobat-flight .sf-kicker,
#sobat-flight .sf-phase {
  font: 600 13px/1.6 "IBM Plex Mono", monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#sobat-flight .sf-kicker {
  color: var(--sf-lavender);
}
#sobat-flight .sf-phase {
  color: var(--sf-pink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#sobat-flight .sf-phase::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}
#sobat-flight.sf-active .sf-phase::before {
  opacity: 1;
  animation: sf-blink 0.9s steps(2) infinite;
}
#sobat-flight .sf-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 24px 0;
  min-height: 42px;
  scrollbar-width: none;
}
#sobat-flight .sf-strip::-webkit-scrollbar {
  display: none;
}
#sobat-flight .sf-strip:empty::before {
  content: "No flights yet";
  color: var(--sf-muted);
  font: 500 13px/30px "IBM Plex Mono", monospace;
}
#sobat-flight .sf-pill {
  flex: none;
  padding: 2px 10px;
  border: 1px solid var(--sf-soft-line);
  background: #24183a;
  color: var(--sf-lavender);
  font: 600 13px/1.9 "IBM Plex Mono", monospace;
}
#sobat-flight .sf-pill.sf-hot {
  color: var(--sf-pink);
  border-color: #7d416e;
}
#sobat-flight .sf-pill.sf-new {
  animation: sf-pop 0.45s ease-out;
}
#sobat-flight .sf-wallet {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 14px 24px 0;
  color: var(--sf-lavender);
  font-size: 15px;
}
#sobat-flight .sf-balance strong {
  color: var(--sf-paper);
  font: 600 24px "IBM Plex Mono", monospace;
  margin-left: 8px;
}
#sobat-flight .sf-balance strong.sf-bump {
  animation: sf-bump 0.5s ease-out;
}

/* Flight scene */
#sobat-flight .sf-scene {
  position: relative;
  margin-top: 4px;
}
#sobat-flight .sf-scene svg {
  display: block;
  width: 100%;
  height: auto;
}
#sobat-flight .sf-readout {
  position: absolute;
  left: 12%;
  top: 9%;
  display: grid;
  pointer-events: none;
}
#sobat-flight .sf-readout strong {
  font: 600 clamp(34px, 6vw, 68px)/1.15 "IBM Plex Mono", monospace;
  color: var(--sf-paper);
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}
#sobat-flight .sf-readout small {
  font-size: 0.6em;
  color: var(--sf-pink);
}
#sobat-flight .sf-sub {
  color: var(--sf-lavender);
  font-size: 15px;
}
#sobat-flight.sf-crashed .sf-readout strong {
  color: var(--sf-pink);
}
#sobat-flight .sf-countdown {
  position: absolute;
  left: 7.2%;
  right: 5.3%;
  bottom: 10.6%;
  height: 3px;
}
#sobat-flight .sf-countdown i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--sf-pink);
}
#sobat-flight .sf-star {
  animation: sf-twinkle 3.2s ease-in-out infinite;
}
#sobat-flight .sf-flame {
  transform-box: fill-box;
  transform-origin: 100% 50%;
  animation: sf-flicker 0.11s linear infinite alternate;
}
#sobat-flight .sf-boom {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  opacity: 0;
}
#sobat-flight .sf-boom.sf-go {
  animation: sf-boom 0.9s ease-out forwards;
}
#sobat-flight .sf-ring {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
#sobat-flight .sf-ring.sf-go {
  animation: sf-ring 0.7s ease-out;
}
#sobat-flight .sf-gain {
  font: 700 30px "IBM Plex Mono", monospace;
  fill: var(--sf-paper);
  opacity: 0;
}
#sobat-flight .sf-gain.sf-go {
  animation: sf-gain 1.6s ease-out forwards;
}

/* Controls */
#sobat-flight .sf-controls {
  padding: 4px 24px 24px;
}
#sobat-flight .sf-inputs {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 15px;
  min-width: 0;
}
#sobat-flight .sf-inputs label {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--sf-body);
}
#sobat-flight .sf-inputs input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #a482bc;
  border-radius: 0;
  background: var(--sf-panel);
  color: var(--sf-paper);
  padding: 11px 13px;
  font: 500 16px/1.4 "IBM Plex Mono", monospace;
}
#sobat-flight .sf-inputs input:invalid {
  border-color: var(--sf-pink);
}
#sobat-flight .sf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#sobat-flight .sf-chips button {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--sf-soft-line);
  background: var(--sf-raised);
  color: var(--sf-paper);
  font: 500 14px Rubik, system-ui, sans-serif;
  cursor: pointer;
}
#sobat-flight .sf-chips button:hover:not(:disabled) {
  border-color: var(--sf-pink);
}
#sobat-flight .sf-chips button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#sobat-flight .sf-active-stake {
  margin-bottom: 18px !important;
  font-weight: 600;
}
#sobat-flight .sf-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
#sobat-flight .sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 22px;
  background: var(--sf-paper);
  border: 2px solid var(--sf-paper);
  color: #1f1633;
  font: 600 15px/1.4 Rubik, system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 4px 4px 0 #79519c;
  cursor: pointer;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
#sobat-flight .sf-btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #ad70bc;
}
#sobat-flight .sf-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
#sobat-flight .sf-btn.sf-cash {
  background: var(--sf-pink);
  border-color: var(--sf-pink);
  min-width: 230px;
  font-variant-numeric: tabular-nums;
}
#sobat-flight .sf-btn.sf-outline {
  background: #281b3e;
  color: var(--sf-paper);
  border-color: var(--sf-pink);
  box-shadow: none;
}
#sobat-flight .sf-text {
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--sf-paper);
  font: 600 15px/1.6 Rubik, system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
}
#sobat-flight .sf-text:hover {
  color: var(--sf-pink);
}
#sobat-flight .sf-status {
  margin-top: 20px !important;
  font-size: 17px;
}
#sobat-flight .sf-note {
  margin-top: 10px !important;
  font-size: 14px;
  color: var(--sf-body);
}
#sobat-flight .sf-commit {
  margin-top: 20px;
  border-top: 1px solid var(--sf-line);
  padding-top: 16px;
}
#sobat-flight .sf-commit summary {
  font-weight: 600;
  cursor: pointer;
}
#sobat-flight .sf-commit p {
  margin-top: 12px !important;
  font-size: 15px;
  color: var(--sf-body);
}
#sobat-flight code {
  font: 400 14px/1.8 "IBM Plex Mono", monospace;
  overflow-wrap: anywhere;
  color: var(--sf-paper);
}

/* History and record */
#sobat-flight .sf-history {
  padding: 20px 24px;
  border-top: 1px solid var(--sf-line);
}
#sobat-flight .sf-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
#sobat-flight .sf-history-list button {
  display: grid;
  gap: 2px;
  min-width: 100px;
  padding: 10px 12px;
  background: var(--sf-raised);
  border: 1px solid var(--sf-line);
  color: var(--sf-paper);
  text-align: left;
  cursor: pointer;
}
#sobat-flight .sf-history-list button:hover {
  border-color: var(--sf-pink);
}
#sobat-flight .sf-history-list strong {
  color: var(--sf-pink);
  font: 600 18px "IBM Plex Mono", monospace;
}
#sobat-flight .sf-history-list span {
  font-size: 13px;
  color: var(--sf-body);
}
#sobat-flight .sf-record {
  padding: 26px 24px;
  border-top: 1px solid var(--sf-line);
  background: #1d1430;
}
#sobat-flight .sf-record h3 {
  margin: 0 0 6px;
  font: 700 22px/1.3 "Bricolage Grotesque", Rubik, system-ui, sans-serif;
}
#sobat-flight .sf-verify {
  color: var(--sf-pink);
  font-weight: 600;
}
#sobat-flight .sf-record dl {
  margin: 18px 0;
}
#sobat-flight .sf-record dt {
  color: var(--sf-lavender);
  font-weight: 600;
  margin-top: 14px;
  font-size: 15px;
}
#sobat-flight .sf-record dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font: 400 14px/1.7 "IBM Plex Mono", monospace;
}
#sobat-flight .sf-record > p {
  font-size: 15px;
  color: var(--sf-body);
}
#sobat-flight .sf-record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 14px;
}
#sobat-flight .sf-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--sf-line);
  font-size: 14px;
  color: var(--sf-body);
}

/* Motion */
@keyframes sf-blink {
  50% {
    opacity: 0.25;
  }
}
@keyframes sf-twinkle {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.85;
  }
}
@keyframes sf-flicker {
  from {
    transform: scaleX(0.75);
    opacity: 0.8;
  }
  to {
    transform: scaleX(1.15);
    opacity: 1;
  }
}
@keyframes sf-boom {
  0% {
    transform: scale(0.2);
    opacity: 1;
  }
  70% {
    opacity: 0.9;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
@keyframes sf-ring {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes sf-gain {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  15% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-34px);
  }
}
@keyframes sf-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes sf-bump {
  40% {
    color: var(--sf-pink);
  }
}
@media (prefers-reduced-motion: reduce) {
  #sobat-flight .sf-star,
  #sobat-flight .sf-flame,
  #sobat-flight.sf-active .sf-phase::before,
  #sobat-flight .sf-pill.sf-new,
  #sobat-flight .sf-balance strong.sf-bump {
    animation: none;
  }
  #sobat-flight .sf-boom.sf-go,
  #sobat-flight .sf-ring.sf-go,
  #sobat-flight .sf-gain.sf-go {
    animation-duration: 0.01s;
  }
  #sobat-flight .sf-btn {
    transition: none;
  }
}

/* Phones */
@media (max-width: 640px) {
  #sobat-flight .sf-top,
  #sobat-flight .sf-controls,
  #sobat-flight .sf-record {
    padding-inline: 16px;
  }
  #sobat-flight .sf-strip,
  #sobat-flight .sf-wallet,
  #sobat-flight .sf-history,
  #sobat-flight .sf-foot {
    padding-inline: 16px;
  }
  #sobat-flight .sf-kicker {
    font-size: 12px;
  }
  #sobat-flight .sf-readout {
    top: 6%;
  }
  #sobat-flight .sf-sub {
    font-size: 12px;
  }
  #sobat-flight .sf-inputs {
    grid-template-columns: 1fr;
  }
  #sobat-flight .sf-actions {
    gap: 14px;
  }
  #sobat-flight .sf-actions .sf-btn {
    width: 100%;
  }
  /* Keep the plane in view while the cash-out button is under your thumb. */
  #sobat-flight.sf-active .sf-scene {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--sf-deep);
  }
}
