/* Open Liberty — landing + game-shell styling.
   GTA III key-art palette: crimson red, steel blue, near-black, cream. No frameworks. */

:root {
  --ol-bg: #0a0a0c;
  --ol-bg2: #121319;
  --ol-ink: #0c0c0e; /* black gutters, like the banner grid */
  --ol-panel: rgba(15, 15, 19, 0.9);
  --ol-red: #c5241d; /* banner crimson */
  --ol-red2: #e23b2f;
  --ol-blue: #356596; /* banner steel blue */
  --ol-blue2: #4f86bd;
  --ol-cream: #ece3d2; /* logo wordmark cream */
  --ol-text: #e9e2d4;
  --ol-muted: #9d978a;
  --ol-border: rgba(236, 227, 210, 0.14);
  --ol-radius: 10px;
  --ol-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  --ol-font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--ol-font);
  color: var(--ol-text);
  background:
    radial-gradient(1100px 640px at 82% -8%, rgba(197, 36, 29, 0.16), transparent 58%),
    radial-gradient(900px 620px at 10% 112%, rgba(53, 101, 150, 0.18), transparent 56%),
    linear-gradient(180deg, var(--ol-bg) 0%, #050506 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.ol-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- top / footer bar --- */
.ol-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
}
.ol-bar.top {
  border-bottom: 1px solid var(--ol-border);
  background: rgba(8, 8, 10, 0.55);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ol-bar .ol-spacer {
  flex: 1;
}
.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ol-cream);
}
.brandmark .brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--ol-border);
  object-fit: cover;
}
.brandmark .brand-word {
  font-weight: 800;
  letter-spacing: 3px;
  font-size: 15px;
  text-transform: uppercase;
}

.ol-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--ol-border);
  background: rgba(236, 227, 210, 0.05);
  color: var(--ol-cream);
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.4px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.ol-link-btn:hover {
  background: rgba(236, 227, 210, 0.1);
  border-color: rgba(236, 227, 210, 0.3);
  transform: translateY(-1px);
}
.ol-link-btn.coin {
  background: var(--ol-cream);
  color: #141210;
  border-color: transparent;
  font-weight: 800;
}
.ol-link-btn.coin:hover {
  filter: brightness(1.06);
  background: #fff;
}

/* --- layout --- */
.ol-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 20px 56px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 56px);
}

/* --- hero: banner key-art + circular logo emblem --- */
.ol-hero {
  margin-top: 4px;
}
.ol-hero-art {
  position: relative;
  width: 100%;
  height: clamp(250px, 40vw, 430px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--ol-ink);
  box-shadow: var(--ol-shadow), 0 0 0 1px rgba(236, 227, 210, 0.06);
}
.ol-hero-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}
.ol-hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 30%, transparent 38%, rgba(8, 8, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(10, 10, 12, 0.1) 0%, rgba(10, 10, 12, 0.5) 56%, rgba(10, 10, 12, 0.94) 100%);
}
.ol-hero-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 20px 26px;
  text-align: center;
}
.ol-logo {
  width: clamp(116px, 19vw, 188px);
  height: clamp(116px, 19vw, 188px);
  border-radius: 50%;
  border: 3px solid var(--ol-cream);
  background: var(--ol-ink);
  object-fit: cover;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.7);
}
.ol-tagline {
  margin: 0;
  max-width: 560px;
  color: var(--ol-cream);
  font-size: clamp(15px, 2.3vw, 20px);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

/* --- center panel (comic-panel feel) --- */
.ol-panel {
  position: relative;
  margin: 22px auto 0;
  width: 100%;
  max-width: 470px;
  background: var(--ol-panel);
  border: 1px solid var(--ol-border);
  border-top: 3px solid var(--ol-red);
  border-radius: var(--ol-radius);
  box-shadow: var(--ol-shadow);
  backdrop-filter: blur(10px);
  padding: 22px;
}

.ol-row {
  margin-bottom: 14px;
}
.ol-label {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--ol-muted);
  margin-bottom: 6px;
}

.ol-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--ol-border);
  background: rgba(0, 0, 0, 0.32);
  color: var(--ol-text);
  font-size: 15px;
  outline: none;
}
.ol-input:focus {
  border-color: var(--ol-red);
}

.ol-btn {
  width: 100%;
  padding: 14px 16px;
  border-radius: 9px;
  border: 1px solid var(--ol-border);
  background: rgba(236, 227, 210, 0.05);
  color: var(--ol-text);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease, filter 0.15s ease;
}
.ol-btn:hover {
  transform: translateY(-1px);
}
.ol-btn:active {
  transform: translateY(0);
}
.ol-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.ol-btn.primary {
  background: linear-gradient(135deg, var(--ol-red2), var(--ol-red) 55%, #9e1a14);
  border-color: transparent;
  color: var(--ol-cream);
}
.ol-btn.spectate {
  background: rgba(53, 101, 150, 0.16);
  border-color: rgba(79, 134, 189, 0.55);
  color: var(--ol-blue2);
}
.ol-btn.spectate:hover {
  background: rgba(53, 101, 150, 0.3);
}
.ol-btn.wallet {
  background: var(--ol-cream);
  border-color: transparent;
  color: #141210;
}
.ol-btn.wallet:hover {
  background: #fff;
}

.ol-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

/* wallet status pill */
.ol-wallet-info {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--ol-border);
  margin-bottom: 14px;
}
.ol-wallet-info.show {
  display: flex;
}
.ol-wallet-key {
  font-weight: 700;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  color: var(--ol-cream);
}
.ol-wallet-bal {
  color: var(--ol-red2);
  font-weight: 800;
}
.ol-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px #4caf50;
}

.ol-hint {
  font-size: 12.5px;
  color: var(--ol-muted);
  margin-top: 10px;
  line-height: 1.5;
}
.ol-hint a {
  color: var(--ol-blue2);
}

.ol-color-strip {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.ol-color-strip .label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ol-muted);
  margin-right: 4px;
}
.ol-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.ol-swatch:hover {
  transform: scale(1.12);
}
.ol-swatch.sel {
  border-color: var(--ol-cream);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5);
}

.ol-footnote {
  margin-top: auto;
  padding-top: 26px;
  text-align: center;
  color: var(--ol-muted);
  font-size: 12px;
  line-height: 1.7;
}

/* --- rotate-device overlay (portrait mobile) --- */
.ol-rotate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  background: #050506;
  color: var(--ol-text);
  text-align: center;
  padding: 30px;
}
.ol-rotate .phone {
  width: 52px;
  height: 86px;
  border: 3px solid var(--ol-red);
  border-radius: 12px;
  animation: ol-rot 1.6s ease-in-out infinite;
}
@keyframes ol-rot {
  0%, 40% { transform: rotate(0deg); }
  60%, 100% { transform: rotate(90deg); }
}
@media (orientation: portrait) and (pointer: coarse) {
  .ol-rotate.armed {
    display: flex;
  }
}

/* --- game shell overlays --- */
.ol-game-status {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #0a0a0c, #050506);
  color: var(--ol-text);
  transition: opacity 0.4s ease;
}
.ol-game-status.hidden {
  opacity: 0;
  pointer-events: none;
}
.ol-game-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--ol-cream);
  margin-bottom: 4px;
}
.ol-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(236, 227, 210, 0.16);
  border-top-color: var(--ol-red);
  border-radius: 50%;
  animation: ol-spin 0.9s linear infinite;
}
@keyframes ol-spin {
  to { transform: rotate(360deg); }
}
.ol-status-text {
  color: var(--ol-muted);
  font-size: 14px;
}
.ol-reconnect {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5001;
  display: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(197, 36, 29, 0.92);
  color: var(--ol-cream);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--ol-shadow);
}
.ol-reconnect.show {
  display: block;
}

#ol-canvas-host,
#canvas {
  width: 100vw;
  height: 100vh;
  display: block;
  border: 0;
  background: #050506;
}

@media (max-width: 520px) {
  .ol-actions {
    grid-template-columns: 1fr;
  }
  .ol-bar {
    padding: 10px 14px;
  }
  .brandmark .brand-word {
    display: none;
  }
}
