:root {
  color-scheme: dark;
  --bg: #071329;
  --panel: #101923;
  --panel-2: #162334;
  --line: #344056;
  --ink: #fff7ec;
  --muted: #bec8d4;
  --cyan: #35d8c8;
  --petrol: #e53e38;
  --diesel: #f2c84b;
  --kerosene: #3aa0ff;
  --green: #76d66b;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 60% 0%, rgba(238, 90, 86, 0.22), transparent 330px),
    linear-gradient(180deg, #071329 0%, #0d1020 44%, #090d12 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
canvas {
  font: inherit;
}

button {
  border: 0;
}

.runner-shell {
  width: min(1320px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 14px 0 28px;
}

.runner-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
}

.runner-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.runner-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(53, 216, 200, 0.55);
  border-radius: 8px;
  background: #10243a;
  color: var(--cyan);
  font-weight: 800;
}

.runner-brand strong,
.runner-brand small {
  display: block;
}

.runner-brand strong {
  font-size: 0.98rem;
}

.runner-brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.78rem;
}

.runner-actions {
  display: flex;
  gap: 8px;
}

.runner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(11, 16, 24, 0.78);
  cursor: pointer;
  text-decoration: none;
}

.runner-button.primary {
  border-color: rgba(53, 216, 200, 0.58);
  color: #021110;
  background: var(--cyan);
  font-weight: 800;
}

.runner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.runner-stage-panel,
.runner-control-panel {
  border: 1px solid rgba(120, 142, 174, 0.36);
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.92);
  box-shadow: var(--shadow);
}

.runner-stage-panel,
.runner-control-panel {
  overflow: hidden;
}

.runner-stage-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  grid-template-areas:
    "fuel stats"
    "stage stage";
  gap: 10px;
  padding: 10px;
  background: rgba(8, 12, 18, 0.92);
}

.runner-hud {
  grid-area: stats;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 3px solid rgba(124, 134, 156, 0.74);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(11, 13, 20, 0.98), rgba(3, 5, 9, 0.94));
  box-shadow: inset 0 0 0 2px #07090e, 0 10px 24px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.runner-hud div {
  min-width: 0;
  padding: 11px 18px 10px;
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.runner-hud div:first-child {
  border-left: 0;
}

.runner-hud div:nth-child(4) {
  display: none;
}

.runner-hud span,
.runner-hud strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runner-hud span {
  color: #c7c6ca;
  font-size: clamp(0.64rem, 0.9vw, 0.86rem);
  font-weight: 800;
  text-transform: uppercase;
}

.runner-hud strong {
  margin-top: 1px;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.2vw, 2.08rem);
  line-height: 0.95;
  text-shadow: 0 2px 0 #000;
}

.runner-frame {
  grid-area: stage;
  overflow: hidden;
  border-radius: 10px;
  background: #071329;
}

.game-mount {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #071329;
}

.game-mount canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.fuel-readout {
  grid-area: fuel;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 3px solid rgba(124, 134, 156, 0.74);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(11, 13, 20, 0.98), rgba(3, 5, 9, 0.94));
  box-shadow: inset 0 0 0 2px #07090e, 0 10px 24px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.fuel-meter {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 5px 10px;
  align-items: center;
  min-width: 0;
  padding: 9px 13px;
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.fuel-meter:first-child {
  border-left: 0;
}

.fuel-meter::before {
  content: "";
  grid-row: 1 / span 2;
  width: 34px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px 8px 10px 10px;
  background: var(--petrol);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.18), 0 2px 0 #06070b;
}

.fuel-meter span,
.fuel-meter strong {
  font-size: clamp(0.62rem, 0.9vw, 0.8rem);
  font-weight: 850;
}

.fuel-meter span {
  grid-column: 2;
  color: var(--ink);
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
}

.fuel-meter strong {
  display: none;
}

.meter-track {
  grid-column: 2;
  height: 13px;
  overflow: hidden;
  background: #05070b;
  border: 3px solid rgba(145, 151, 166, 0.78);
  border-radius: 999px;
}

.meter-track i {
  display: block;
  width: 70%;
  height: 100%;
  border-radius: inherit;
  transition: width 120ms linear;
}

.fuel-meter.petrol i,
.can-row.petrol span {
  background: var(--petrol);
}

.fuel-meter.diesel i,
.can-row.diesel span {
  background: var(--diesel);
}

.fuel-meter.diesel::before {
  background: var(--diesel);
}

.fuel-meter.kerosene i,
.can-row.kerosene span {
  background: var(--kerosene);
}

.fuel-meter.kerosene::before {
  background: var(--kerosene);
}

.runner-control-panel {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.panel-section {
  padding: 16px;
  background: var(--panel);
}

.panel-section h1,
.panel-section h2,
.panel-section p,
.panel-section ul {
  margin: 0;
}

.panel-section h1 {
  font-size: 1.55rem;
  line-height: 1.08;
}

.panel-section h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-section p,
.panel-section li {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.panel-section p {
  margin-top: 10px;
}

.panel-section ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.can-guide {
  display: grid;
  gap: 10px;
}

.can-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 0.54fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 36px;
}

.can-row span {
  width: 22px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 5px 5px 7px 7px;
}

.can-row strong {
  color: var(--ink);
}

.can-row small {
  color: var(--muted);
  line-height: 1.3;
}

@media (max-width: 1020px) {
  .runner-layout,
  .runner-control-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .runner-stage-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "fuel"
      "stats"
      "stage";
  }
}

@media (max-width: 640px) {
  .runner-shell {
    width: min(100vw - 20px, 1480px);
    padding-top: 10px;
  }

  .runner-topbar,
  .runner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .runner-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .runner-actions .primary {
    grid-column: 1 / -1;
  }

  .runner-hud {
    min-height: 54px;
    border-radius: 18px;
    border-width: 2px;
  }

  .runner-hud div {
    padding: 8px 10px;
  }

  .fuel-readout {
    min-height: 64px;
    border-radius: 18px;
    border-width: 2px;
  }

  .fuel-meter {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 8px 7px;
    gap: 4px 6px;
  }

  .fuel-meter::before {
    width: 25px;
    height: 34px;
    border-width: 2px;
  }

  .meter-track {
    height: 10px;
    border-width: 2px;
  }
}
