.rainbow {
  /*font-family: monospace;*/
  animation: colorRotate .5s linear 0s infinite;
}

.parallel-image-background,
.parallel-background-video,
#parallel-background-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.parallel-image-background {
  z-index: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.parallel-background-video {
  z-index: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

#parallel-background-overlay {
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
}

body.parallel-image-background-enabled .parallel-image-background,
body.parallel-image-background-enabled #parallel-background-overlay,
body.parallel-video-background-enabled .parallel-background-video,
body.parallel-video-background-enabled #parallel-background-overlay {
  opacity: 1;
}

body.parallel-video-background-enabled .parallel-image-background {
  opacity: 0;
}

body.parallel-image-background-enabled > header,
body.parallel-image-background-enabled > main,
body.parallel-video-background-enabled > header,
body.parallel-video-background-enabled > main {
  position: relative;
  z-index: 2;
}

body.parallel-image-background-enabled:not(.parallel-video-background-enabled)
  > header
  .parallels-menu {
  background: transparent;
  text-shadow:
    -0.67px -0.67px 0 rgba(255, 255, 255, 0.96),
    0 -0.67px 0 rgba(255, 255, 255, 0.96),
    0.67px -0.67px 0 rgba(255, 255, 255, 0.96),
    -0.67px 0 0 rgba(255, 255, 255, 0.96),
    0.67px 0 0 rgba(255, 255, 255, 0.96),
    -0.67px 0.67px 0 rgba(255, 255, 255, 0.96),
    0 0.67px 0 rgba(255, 255, 255, 0.96),
    0.67px 0.67px 0 rgba(255, 255, 255, 0.96),
    0 0 2.7px rgba(255, 255, 255, 0.9);
}

body.parallel-image-background-enabled:not(.parallel-video-background-enabled)
  > main {
  text-shadow:
    -0.67px -0.67px 0 rgba(255, 255, 255, 0.96),
    0 -0.67px 0 rgba(255, 255, 255, 0.96),
    0.67px -0.67px 0 rgba(255, 255, 255, 0.96),
    -0.67px 0 0 rgba(255, 255, 255, 0.96),
    0.67px 0 0 rgba(255, 255, 255, 0.96),
    -0.67px 0.67px 0 rgba(255, 255, 255, 0.96),
    0 0.67px 0 rgba(255, 255, 255, 0.96),
    0.67px 0.67px 0 rgba(255, 255, 255, 0.96),
    0 0 2.7px rgba(255, 255, 255, 0.9);
}

body.parallel-image-background-enabled:not(.parallel-video-background-enabled)
  :is(
    button,
    input,
    select,
    textarea,
    .reaction-game__body,
    .roulette-game__body,
    .teachers__teacher__info--no-page-outline
  ) {
  text-shadow: none;
}

.parallel-background-controls {
  position: fixed;
  top: 11px;
  right: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.parallel-background-change,
.parallel-background-visibility {
  padding: 8px 14px;
  color: #111;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
}

.parallel-background-visibility {
  min-width: 48px;
  padding: 7px 9px;
  font-size: 13px;
}

.parallel-background-visibility[aria-pressed="true"] {
  color: #fff;
  background: rgba(34, 112, 54, 0.94);
  border-color: rgba(255, 255, 255, 0.55);
}

.parallel-background-change:hover,
.parallel-background-visibility:hover {
  background: #fff;
}

.parallel-background-visibility[aria-pressed="true"]:hover {
  background: rgba(27, 92, 43, 0.98);
}

.parallel-background-change:disabled,
.parallel-background-visibility:disabled {
  cursor: wait;
  opacity: 0.62;
}

.parallel-background-change:focus-visible,
.parallel-background-visibility:focus-visible {
  outline: 3px solid #faa41a;
  outline-offset: 3px;
}

.parallel-background-status {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.parallel-background-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  color: #fff;
  background: rgba(0, 0, 0, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  font-size: 15px;
  font-weight: 400;
}

.parallel-background-toggle:hover {
  background: #000;
}

.parallel-background-toggle:focus-visible {
  outline: 3px solid #faa41a;
  outline-offset: 3px;
}

.parallel-background-toggle__track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  background: #747474;
  border-radius: 999px;
  transition: background-color 180ms ease;
}

.parallel-background-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 180ms ease;
}

.parallel-background-toggle[aria-pressed="true"] .parallel-background-toggle__track {
  background: #2eae4f;
}

.parallel-background-toggle[aria-pressed="true"] .parallel-background-toggle__thumb {
  transform: translateX(16px);
}

@media (max-width: 620px) {
  .parallel-background-controls {
    top: 58px;
    right: 10px;
  }

  .parallel-background-change {
    padding: 7px 11px;
    font-size: 14px;
  }

  .parallel-background-toggle {
    right: 10px;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parallel-image-background,
  .parallel-background-video,
  #parallel-background-overlay,
  .parallel-background-toggle__track,
  .parallel-background-toggle__thumb {
    transition: none;
  }
}

.reaction-game {
  position: relative;
  margin-bottom: 34px;
}

.reaction-game__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid #ddd;
}

.reaction-game__heading h1 {
  margin: 0;
}

.reaction-game__heading a {
  white-space: nowrap;
  font-size: 16px;
}

.reaction-game__body {
  position: relative;
  min-height: 205px;
  padding: 18px;
  overflow: hidden;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dedede;
  border-radius: 12px;
}

.reaction-game__lights {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.reaction-game__light {
  width: 34px;
  height: 34px;
  background: #3c3c3c;
  border: 3px solid #222;
  border-radius: 50%;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.18);
  transition:
    background-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.reaction-game__light.is-red {
  background: #e32222;
  box-shadow:
    0 0 13px rgba(227, 34, 34, 0.88),
    inset 0 2px 5px rgba(255, 255, 255, 0.4);
}

.reaction-game__light.is-green {
  background: #20c85a;
  box-shadow:
    0 0 18px rgba(32, 200, 90, 0.95),
    inset 0 2px 5px rgba(255, 255, 255, 0.45);
  transform: scale(1.06);
}

.reaction-game__status {
  min-height: 48px;
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.3;
}

.reaction-game__status strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
}

.reaction-game__start,
.reaction-game__press {
  min-width: 145px;
  padding: 10px 20px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
}

.reaction-game__start {
  color: #fff;
  background: #2121b3;
}

.reaction-game__start:hover {
  background: #3b3bd1;
}

.reaction-game__press {
  color: #08170d;
  background: #35dc70;
  box-shadow: 0 0 20px rgba(53, 220, 112, 0.55);
  font-size: 24px;
}

.reaction-game__press:hover {
  background: #5bea8e;
}

.reaction-game__start:focus-visible,
.reaction-game__press:focus-visible {
  outline: 3px solid #faa41a;
  outline-offset: 3px;
}

.reaction-game.is-false-start .reaction-game__body {
  animation: reactionFalseStart 260ms ease 2;
}

.reaction-game__fire {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.reaction-game__flame {
  --flame-x: 0px;
  --flame-y: -100px;
  position: absolute;
  left: 50%;
  bottom: 40px;
  font-size: 24px;
  animation: reactionFlame 720ms ease-out forwards;
}

@keyframes reactionFalseStart {
  50% {
    background: rgba(255, 100, 100, 0.42);
  }
}

@keyframes reactionFlame {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.4) rotate(0);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform:
      translate(
        calc(-50% + var(--flame-x)),
        var(--flame-y)
      )
      scale(1.4)
      rotate(25deg);
  }
}

@media (max-width: 620px) {
  .reaction-game__light {
    width: 29px;
    height: 29px;
  }

  .reaction-game__body {
    padding-right: 10px;
    padding-left: 10px;
  }
}

.roulette-game {
  position: relative;
  margin-bottom: 34px;
}

.roulette-game [hidden] {
  display: none !important;
}

.roulette-game__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid #ddd;
}

.roulette-game__heading h1 {
  margin: 0;
}

.roulette-game__heading a {
  white-space: nowrap;
  font-size: 16px;
}

.roulette-game__body {
  overflow: hidden;
  color: #f7f0dd;
  background:
    radial-gradient(circle at 50% 10%, rgba(36, 126, 84, 0.9), transparent 45%),
    linear-gradient(145deg, #0d3f2a, #071e16 78%);
  border: 1px solid #d1b15f;
  border-radius: 12px;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.32),
    0 7px 20px rgba(0, 0, 0, 0.12);
}

.roulette-game__account {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 11px 16px;
  color: #fff9e8;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(229, 196, 108, 0.55);
  font-size: 15px;
}

#roulette-player {
  flex: 1 1 100%;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roulette-game__account strong {
  color: #ffd76f;
  font-size: 19px;
}

.roulette-game__layout {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(210px, 0.8fr);
  align-items: center;
  gap: 20px;
  padding: 18px;
}

.roulette-game__wheel-stage {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1;
  justify-self: center;
  filter: drop-shadow(0 10px 13px rgba(0, 0, 0, 0.45));
}

.roulette-game__wheel {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
  will-change: transform;
}

.roulette-game__pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 5;
  width: 0;
  height: 0;
  border-right: 13px solid transparent;
  border-left: 13px solid transparent;
  border-top: 28px solid #ffe69a;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
  transform: translateX(-50%);
}

.roulette-game__ball-orbit {
  position: absolute;
  inset: 7.5%;
  z-index: 4;
  border-radius: 50%;
  pointer-events: none;
  transform: rotate(0deg);
  will-change: transform;
}

.roulette-game__ball {
  position: absolute;
  top: -1px;
  left: 50%;
  width: 15px;
  height: 15px;
  background:
    radial-gradient(circle at 35% 30%, #fff 0 22%, #dedede 36%, #888 100%);
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.8),
    0 0 7px rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
}

.roulette-game__hub {
  position: absolute;
  inset: 41%;
  z-index: 3;
  background:
    radial-gradient(circle at 34% 30%, #ffe9a1, #b58527 48%, #56370d 100%);
  border: 3px solid #f1d07a;
  border-radius: 50%;
  box-shadow:
    inset 0 0 9px rgba(255, 255, 255, 0.45),
    0 3px 7px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.roulette-game__controls {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.roulette-game__status {
  min-height: 46px;
  margin: 0;
  color: #fff9e8;
  line-height: 1.35;
}

.roulette-game__status strong {
  display: block;
  color: #ffd76f;
  font-size: 20px;
}

.roulette-game__choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.roulette-game__choices button,
.roulette-game__spin,
.roulette-game__teacher button {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}

.roulette-game__choices button {
  min-height: 42px;
  padding: 7px 5px;
  color: #fff;
  opacity: 0.72;
  transition:
    opacity 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.roulette-game__choices button[data-roulette-choice="red"] {
  background: #c82028;
}

.roulette-game__choices button[data-roulette-choice="black"] {
  background: #171717;
}

.roulette-game__choices button[data-roulette-choice="zero"] {
  background: #148447;
}

.roulette-game__choices button.is-selected {
  opacity: 1;
  box-shadow:
    0 0 0 2px #ffe69a,
    0 0 14px rgba(255, 230, 154, 0.48);
  transform: translateY(-1px);
}

.roulette-game__amount,
.roulette-game__teacher label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.roulette-game__amount input,
.roulette-game__teacher input {
  min-width: 0;
  width: 105px;
  padding: 7px 8px;
  color: #151515;
  background: #fffdf6;
  border: 1px solid #cdbb89;
  border-radius: 6px;
  font: inherit;
}

.roulette-game__spin {
  min-height: 46px;
  padding: 9px 16px;
  color: #201700;
  background: linear-gradient(#ffe28a, #d9ac39);
  border-color: #ffe69a;
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.25);
  font-weight: 600;
}

.roulette-game__spin:hover:not(:disabled) {
  background: linear-gradient(#fff0b5, #e7bd50);
}

.roulette-game button:disabled,
.roulette-game input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.roulette-game__teacher {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.roulette-game__teacher label {
  grid-column: 1 / -1;
}

.roulette-game__teacher button {
  grid-column: 1 / -1;
  padding: 8px 13px;
  color: #fff;
  background: #315aa8;
}

.roulette-game button:focus-visible,
.roulette-game input:focus-visible {
  outline: 3px solid #ffdf73;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .roulette-game__layout {
    grid-template-columns: 1fr;
  }

  .roulette-game__wheel-stage {
    width: min(86vw, 330px);
  }
}

@media (max-width: 420px) {
  .roulette-game__layout {
    padding: 13px 10px 17px;
  }

  .roulette-game__choices {
    grid-template-columns: 1fr;
  }

  .roulette-game__heading {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .roulette-game__choices button {
    transition: none;
  }
}

@keyframes colorRotate {
  from {
    color: #6666ff;
  }
  10% {
    color: #0099ff;
  }
  50% {
    color: #00ff00;
  }
  75% {
    color: #ff3399;
  }
  100% {
    color: #6666ff;
  }
}
