:root {
  --ink: #0b0c13;
  --paper: #fffaf0;
  --coral: #e9472e;
  --mint: #72f58a;
  --gold: #f6c744;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  min-width: 280px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

.player-bar {
  display: flex;
  width: 100%;
  height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid #2f3039;
  background: var(--ink);
}

.player-wordmark {
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
}

.runtime-status {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: #b9b8c1;
  font-size: 12px;
  font-weight: 750;
}

#build-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hle-badge {
  flex: none;
  border: 1px solid #4c4e59;
  border-radius: 4px;
  padding: 5px 7px;
  color: var(--mint);
  text-transform: uppercase;
}

.audio-state {
  flex: none;
  color: var(--gold);
  text-transform: uppercase;
}

.audio-state[data-state="running"] {
  color: var(--mint);
}

.audio-state[data-state="failed"] {
  color: #ff8d79;
}

.player-shell {
  position: relative;
  width: 100%;
  height: calc(100% - 54px);
  background: #000;
}

.game-surface {
  display: none;
  width: 100%;
  height: 100%;
  background: #000;
}

.game-surface.is-active {
  display: block;
}

.launch-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #292a58;
}

.launch-stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.launch-shade {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 12, 0.58);
}

.launch-copy {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding-bottom: 52px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: 48px;
  line-height: 1.02;
}

button {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 11px 18px;
  background: var(--mint);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

button:hover,
button:focus-visible,
.player-wordmark:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.launch-status {
  min-height: 18px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 700;
}

.error-stage {
  position: absolute;
  inset: 0;
  padding: 56px max(24px, calc((100% - 1180px) / 2));
  background: var(--coral);
  color: var(--ink);
}

.error-stage .eyebrow {
  color: var(--ink);
}

.error-stage p:not(.eyebrow) {
  max-width: 680px;
  line-height: 1.5;
}

.error-stage button {
  background: var(--ink);
  color: #fff;
}

.audio-gate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 12, 0.72);
}

.audio-gate button {
  min-width: 180px;
  min-height: 52px;
  font-size: 16px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .player-bar {
    height: 50px;
    padding: 0 12px;
  }

  .player-shell {
    height: calc(100% - 50px);
  }

  #build-label {
    display: none;
  }

  .hle-badge {
    display: none;
  }

  .launch-copy {
    width: calc(100% - 32px);
    padding-bottom: 30px;
  }

  h1 {
    font-size: 34px;
  }
}

/* --- Johnny controls footer --- */
.player-notes {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px 32px;
  color: #aab0c4;
  font-size: 0.9rem;
}
.player-notes summary {
  cursor: pointer;
  color: #e6e9f5;
  font-weight: 600;
}
.player-notes table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}
.player-notes th,
.player-notes td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid #23263a;
}
.player-notes th { color: #e6e9f5; }
