/* Retained CB's Entertainment and Rental terminal.
   Pre-Yume, old service-terminal styling. */

html,
body {
  background: #080807 !important;
}

body {
  background-image: none !important;
}

#title,
#animatronic,
.launcher-text,
.glitch,
.vignette {
  display: none !important;
}

#selection.cb-terminal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 46%, #252318 0, #12110d 44%, #050504 78%) !important;
  color: #d7c98c;
  font-family: "Courier New", Courier, monospace;
}

#selection.cb-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .37;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 2px,
      rgba(255,255,255,.035) 3px,
      transparent 4px
    );
  animation: cbScan 9s linear infinite;
}

#selection.cb-terminal::after {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 31;
  pointer-events: none;
  box-shadow: inset 0 0 190px 110px #000;
}

.cb-set {
  position: relative;
  z-index: 5;
  width: min(88vw, 900px);
  min-height: 560px;
  padding: 38px;
  border: 18px solid #a89d7c;
  border-color: #a89d7c #81785f #6e674f #b7aa87;
  border-radius: 14px;
  background: #4c493b;
  box-shadow:
    0 16px 55px rgba(0,0,0,.72),
    inset 0 0 0 3px #29271f;
  opacity: 0;
  transform: scale(.985);
  animation: cbSetPower .34s ease-out .08s forwards;
}

.cb-set::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -33px;
  width: 190px;
  height: 16px;
  border-radius: 0 0 10px 10px;
  background: #5d5746;
  transform: translateX(-50%);
}

.cb-screen {
  position: relative;
  min-height: 484px;
  overflow: hidden;
  border: 4px solid #171711;
  border-radius: 35px / 24px;
  background:
    radial-gradient(ellipse at center, rgba(125,112,55,.13), transparent 62%),
    #070805;
  box-shadow:
    inset 0 0 70px #000,
    inset 0 0 18px rgba(202,185,107,.08);
}

.cb-screen::before {
  content: "";
  position: absolute;
  z-index: 18;
  left: 50%;
  top: 50%;
  width: 0;
  height: 2px;
  background: #f3df89;
  box-shadow: 0 0 10px #f3df89;
  transform: translate(-50%,-50%);
  animation: cbPowerLine .8s ease-out forwards;
}

.cb-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 17;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,80,80,.012), rgba(80,255,170,.008), rgba(100,120,255,.012));
  animation: cbTrack .18s steps(2,end) infinite;
}

.cb-content {
  position: relative;
  z-index: 10;
  min-height: 484px;
  padding: 28px 34px 92px;
  opacity: 0;
  animation: cbContentOn .12s steps(1,end) .68s forwards;
}

.cb-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(215,201,140,.32);
  color: rgba(215,201,140,.62);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.cb-brand {
  margin-top: 54px;
  color: #e7d790;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 4vw, 48px);
  line-height: .95;
  letter-spacing: -.02em;
  text-align: center;
  text-shadow: 0 0 8px rgba(231,215,144,.12);
}

.cb-brand small {
  display: block;
  margin-top: 12px;
  color: rgba(215,201,140,.53);
  font-family: "Courier New", Courier, monospace;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .18em;
}

.cb-status-list {
  width: min(100%, 580px);
  margin: 40px auto 0;
  color: rgba(215,201,140,.66);
  font-size: 9px;
  line-height: 1.8;
}

.cb-status-line {
  opacity: 0;
}

.cb-status-line:nth-child(1) { animation: cbType .08s steps(1,end) .9s forwards; }
.cb-status-line:nth-child(2) { animation: cbType .08s steps(1,end) 1.05s forwards; }
.cb-status-line:nth-child(3) { animation: cbType .08s steps(1,end) 1.2s forwards; }
.cb-status-line:nth-child(4) { animation: cbType .08s steps(1,end) 1.35s forwards; }

.cb-status-line b {
  color: #a54545;
  font-weight: 400;
}

.cb-loader {
  position: absolute !important;
  left: 34px !important;
  right: 34px !important;
  bottom: 25px !important;
  width: auto !important;
  transform: none !important;
  z-index: 14 !important;
  display: grid !important;
  grid-template-columns: 64px 1fr !important;
  grid-template-rows: auto 10px !important;
  gap: 6px 12px !important;
  align-items: center !important;
  color: #d7c98c !important;
  text-align: left !important;
  font-family: "Courier New", Courier, monospace !important;
  opacity: 0;
  animation: cbType .08s steps(1,end) 1.5s forwards;
}

#selection .cb-loader h1 {
  grid-row: 1 / 3;
  margin: 0 !important;
  color: #c9b86e !important;
  font-size: 21px !important;
  font-weight: 400 !important;
}

#selection .cb-loader h2 {
  margin: 0 !important;
  color: rgba(215,201,140,.58) !important;
  font-size: 8px !important;
  font-weight: 400 !important;
  letter-spacing: .08em !important;
}

#selection .cb-loader hr {
  width: 0;
  height: 6px;
  margin: 0 !important;
  border: 1px solid rgba(215,201,140,.38) !important;
  background: #8d3539 !important;
  box-shadow: none !important;
  transition: width .12s linear !important;
}

.cb-code {
  position: absolute;
  right: 34px;
  top: 68px;
  color: rgba(215,201,140,.25);
  font-size: 8px;
  letter-spacing: .1em;
}

.cb-terminal.cb-late .cb-screen {
  animation: cbLateJitter 1.6s steps(1,end) infinite;
}

.cb-terminal.cb-finishing {
  background: #000 !important;
}

.cb-terminal.cb-finishing .cb-screen {
  animation: cbSwitchOff .5s ease-in forwards !important;
}

@keyframes cbSetPower {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes cbPowerLine {
  0% { width: 0; opacity: 0; }
  18% { width: 6%; opacity: 1; }
  55% { width: 88%; opacity: .95; }
  76% { width: 100%; height: 3px; opacity: .65; }
  88% { width: 100%; height: 82%; opacity: .08; }
  100% { width: 100%; height: 100%; opacity: 0; }
}

@keyframes cbContentOn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cbType {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cbScan {
  from { transform: translateY(-14px); }
  to { transform: translateY(14px); }
}

@keyframes cbTrack {
  0% { transform: translateX(0); }
  50% { transform: translateX(1px); }
  100% { transform: translateX(-1px); }
}

@keyframes cbLateJitter {
  0%, 91%, 100% { transform: translate(0,0); filter: none; }
  92% { transform: translate(-2px,0); filter: brightness(1.12); }
  93% { transform: translate(2px,1px); }
  94% { transform: translate(0,0); }
}

@keyframes cbSwitchOff {
  0% { opacity: 1; transform: scale(1); }
  52% { opacity: 1; transform: scaleY(.025) scaleX(1); filter: brightness(4); }
  76% { opacity: .92; transform: scaleY(.006) scaleX(.48); filter: brightness(6); }
  100% { opacity: 0; transform: scaleY(.002) scaleX(.015); filter: brightness(8); }
}

@media (max-width: 680px) {
  .cb-set {
    width: 95vw;
    min-height: 500px;
    padding: 20px;
    border-width: 11px;
  }

  .cb-screen,
  .cb-content {
    min-height: 458px;
  }

  .cb-content {
    padding: 20px 20px 92px;
  }

  .cb-head {
    font-size: 7px;
  }

  .cb-head span:last-child {
    display: none;
  }

  .cb-brand {
    margin-top: 62px;
    font-size: 30px;
  }

  .cb-status-list {
    font-size: 7px;
  }

  .cb-loader {
    left: 20px !important;
    right: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #selection.cb-terminal *,
  #selection.cb-terminal::before,
  #selection.cb-terminal::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
