/* SexBox.Live — Kiosk Demo Frontend */

.demo-body {
  margin: 0;
  min-height: 100vh;
  background: #020408;
  color: #e8eef8;
  font-family: "Share Tech Mono", monospace;
  overflow: hidden;
}

.demo-body.booting { cursor: wait; }

/* boot splash */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #04060f;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.boot-splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-logo {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.55rem, 3vw, 0.85rem);
  background: linear-gradient(90deg, #ec4899, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.8;
}

.boot-slogan {
  display: block;
  font-size: clamp(0.45rem, 2.2vw, 0.65rem);
  color: #ec4899;
  -webkit-text-fill-color: #ec4899;
  text-shadow: 0 0 16px #d946ef66;
}

.boot-log {
  width: min(420px, 88vw);
  font-size: 0.7rem;
  color: #8899b8;
  line-height: 1.8;
  min-height: 8em;
}

.boot-log .ok { color: #22c55e; }
.boot-log .hi { color: #06b6d4; }

.boot-bar-wrap {
  width: min(420px, 88vw);
  height: 4px;
  background: #111d35;
  margin-top: 1.5rem;
  border-radius: 2px;
  overflow: hidden;
}

.boot-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #d946ef, #2563eb);
  transition: width 0.15s linear;
}

/* kiosk shell */
.kiosk {
  display: flex;
  flex-direction: column;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.kiosk.ready { opacity: 1; }

.kiosk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  background: #0a1628;
  border-bottom: 2px solid #2563eb;
  flex-shrink: 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.kiosk-bar a {
  color: #06b6d4;
  text-decoration: none;
}

.kiosk-bar a:hover { color: #ec4899; }

.kiosk-brand {
  font-family: "Press Start 2P", monospace;
  font-size: 0.45rem;
  color: #ec4899;
  letter-spacing: 0.06em;
}

.kiosk-clock {
  color: #8899b8;
}

.kiosk-leds {
  display: flex;
  gap: 6px;
}

.kiosk-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.kiosk-led.mag { background: #d946ef; box-shadow: 0 0 8px #d946ef; }

.kiosk-main {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* launcher */
.launcher {
  width: 280px;
  flex-shrink: 0;
  background: #0a1628;
  border-right: 1px solid #ffffff12;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.launcher-head {
  padding: 0.75rem 1rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: #06b6d4;
  border-bottom: 1px solid #ffffff12;
}

.launcher-tiles {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.tile {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem;
  margin-bottom: 0.35rem;
  background: #111d35;
  border: 1px solid #ffffff12;
  border-radius: 2px;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tile:hover,
.tile.active {
  border-color: #2563eb;
  box-shadow: 0 0 16px #2563eb44;
}

.tile-icon { font-size: 1.25rem; margin-bottom: 0.35rem; }

.tile-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #ec4899;
  margin-bottom: 0.2rem;
}

.tile-blurb {
  display: block;
  font-size: 0.6rem;
  color: #8899b8;
  line-height: 1.4;
}

.launcher-foot {
  padding: 0.65rem 1rem;
  font-size: 0.55rem;
  color: #8899b8;
  border-top: 1px solid #ffffff12;
  letter-spacing: 0.06em;
}

/* viewport — CRT bezel */
.viewport-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background:
    radial-gradient(ellipse at center, #111d35 0%, #04060f 70%);
  min-width: 0;
}

.crt-bezel {
  width: 100%;
  max-width: 960px;
  background: linear-gradient(145deg, #1a1a24, #0d0d14);
  border-radius: 16px;
  border: 4px solid #2a2a38;
  padding: 1rem;
  box-shadow:
    0 16px 48px #00000088,
    inset 0 2px 0 #ffffff10,
    0 0 32px #2563eb33;
}

.crt-screen {
  position: relative;
  aspect-ratio: 4/3;
  background: #020408;
  border-radius: 6px;
  border: 3px solid #000;
  overflow: hidden;
}

.crt-scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px, #00000025 2px, #00000025 4px
  );
}

#viewport-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* home screen */
.home-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #0a1628, #04060f);
}

.home-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.45rem, 2.5vw, 0.65rem);
  color: #ec4899;
  text-shadow: 0 0 16px #d946ef66;
  margin-bottom: 0.75rem;
}

.home-sub {
  font-size: 0.65rem;
  color: #06b6d4;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

.home-prompt {
  font-size: 0.6rem;
  color: #8899b8;
  animation: blink 1.2s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* emulator view */
.emulator-view {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.emulator-view #game {
  width: 100%;
  height: 100%;
}

.emulator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.65rem;
  background: #0a1628;
  border-bottom: 1px solid #2563eb44;
  font-size: 0.6rem;
  flex-shrink: 0;
}

.emulator-bar button {
  background: none;
  border: 1px solid #2563eb;
  color: #06b6d4;
  font-family: inherit;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}

.emulator-bar button:hover {
  background: #2563eb22;
  color: #ec4899;
}

.missing-rom {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  font-size: 0.7rem;
  color: #8899b8;
  line-height: 1.7;
}

.missing-rom a { color: #06b6d4; }

.missing-rom strong { color: #ec4899; }

@media (max-width: 768px) {
  .kiosk-main { flex-direction: column; }

  .launcher {
    width: 100%;
    max-height: 38vh;
    border-right: none;
    border-bottom: 1px solid #ffffff12;
  }

  .launcher-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
  }

  .tile { margin-bottom: 0; }
}
