/* THE RING — one 480x270 pixel frame, letterboxed and scaled without smoothing; overlays on top. */
* { margin: 0; padding: 0; box-sizing: border-box }
html, body { height: 100%; background: #050507; overflow: hidden }
body {
  font-family: "Courier New", monospace; color: #f4f1ea;
  text-transform: uppercase; user-select: none; -webkit-user-select: none;
}

#app { position: absolute; inset: 0 }
#view, #hud { position: absolute; left: 0; top: 0 }
#hud { pointer-events: none }

/* ---- overlays */
.ov {
  position: absolute; inset: 0; display: none; z-index: 10;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(5, 5, 7, 0.88); text-align: center;
}
.ov.on { display: flex }
#menu.ov { align-items: flex-start; text-align: left; padding-left: 7vw; background: linear-gradient(rgba(5, 5, 7, 0.72), rgba(5, 5, 7, 0.32) 45%, rgba(5, 5, 7, 0.78)) }

.logo {
  font-size: 72px; font-weight: bold; letter-spacing: 8px; line-height: 0.95;
  color: #f4f1ea; text-shadow: 4px 4px 0 #7a1a14;
}
.logo span { display: block; color: #d8341f; text-shadow: 4px 4px 0 #3a0f0a }
.tag { font-size: 12px; letter-spacing: 3px; color: #b8b2a4 }
.dim { color: #6d6a62; font-size: 10px; letter-spacing: 2px }
.dim2 { opacity: 0.6 }
.keys { margin-top: 18px; font-size: 11px; letter-spacing: 2px; line-height: 2; color: #b8b2a4 }

.ptitle { font-size: 40px; letter-spacing: 6px; color: #d8341f; text-shadow: 3px 3px 0 #3a0f0a }
.ptitle.gold { color: #f2c14a }
#resSub { margin-top: -6px }

button {
  font: inherit; text-transform: inherit; letter-spacing: 3px;
  min-width: 260px; padding: 12px 20px; cursor: pointer;
  color: #f4f1ea; background: #14090a; border: 2px solid #d8341f;
}
button:hover { background: #d8341f; color: #0b0b0f }
button.big { font-size: 18px }
.off { display: none !important }
.logo-img { max-height: 36vh; max-width: 82vw; image-rendering: pixelated }

/* ---- the top bar (above the canvas, below the menu overlays) */
.tb {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; gap: 10px;
  background: rgba(11, 11, 15, 0.92); border-bottom: 2px solid #7a1a14;
  transition: opacity 0.2s;
}
.tb-fight { opacity: 0.45 }
.tb-hidden { display: none }
.tb-left, .tb-right { display: flex; align-items: center; gap: 8px; min-width: 0 }
.tb-logo { display: flex; align-items: center; gap: 8px }
.tb-mark { width: 14px; height: 10px; background: #d8341f; box-shadow: 2px 2px 0 #3a0f0a }
.tb-title { font-weight: bold; letter-spacing: 3px; font-size: 14px }
.tb-btn {
  min-width: 0; padding: 5px 10px; font-size: 11px; letter-spacing: 2px;
  background: #14090a; border: 1px solid #d8341f;
}
.tb-x { text-decoration: none; display: inline-block }
.tb-soon { border-color: #4a4a52; color: #6d6a62; cursor: default }
.tb-soon:hover { background: #14090a; color: #6d6a62 }
.tb-online { border-color: #4a4a52; background: rgba(20, 20, 26, 0.6) }
.tb-online:hover { background: rgba(20, 20, 26, 0.6); color: #f4f1ea }
.tb-wd { border-color: #f2c14a }

/* ---- full screens (customize / rings): panels over the live 3D view */
.screen {
  position: absolute; inset: 0; display: none; z-index: 10;
}
.screen.on { display: block }
.cz-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(430px, 92vw);
  display: flex; flex-direction: column; gap: 7px;
  padding: 14px; overflow-y: auto;
  background: rgba(11, 11, 15, 0.9); border-right: 2px solid #7a1a14;
}
.cz-head, .rg-title { font-size: 20px; font-weight: bold; letter-spacing: 4px; color: #d8341f; text-shadow: 2px 2px 0 #3a0f0a }
.cz-label { font-size: 10px; letter-spacing: 3px; color: #b8b2a4; margin-top: 4px }
.cz-name {
  font: inherit; text-transform: uppercase; letter-spacing: 2px;
  padding: 8px 10px; color: #f4f1ea; background: #0b0b0f; border: 1px solid #d8341f; width: 100%;
}
.cz-name:focus { outline: none; border-color: #f2c14a }
.cz-styles { display: flex; flex-direction: column; gap: 3px; max-height: 168px; overflow-y: auto }
.cz-style {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-width: 0; padding: 5px 9px; font-size: 11px; letter-spacing: 1px; text-align: left;
  border-left: 3px solid var(--rar, #9fb0bd);
}
.cz-style.sel { background: #d8341f; color: #0b0b0f }
.cz-style.sel:hover { background: #d8341f; color: #0b0b0f }
.cz-style.locked { opacity: 0.45; cursor: default }
.cz-style.locked:hover { background: #14090a; color: #f4f1ea }
.cz-style-rar { font-size: 9px; letter-spacing: 2px; opacity: 0.75 }
.cz-style-lock { font-size: 9px; letter-spacing: 2px; color: var(--rar, #9fb0bd) }
.cz-stats { display: flex; flex-direction: column; gap: 3px; padding: 6px 0 2px }
.cz-stat { display: flex; align-items: center; gap: 8px; font-size: 10px }
.cz-stat-l { width: 34px; letter-spacing: 2px; color: #b8b2a4 }
.cz-stat-bar { flex: 1; height: 8px; background: #26262a }
.cz-stat-fill { height: 100%; background: #d8341f }
.cz-stat-fill.up { background: #4fd06a }
.cz-stat-fill.down { background: #7a1a14 }
.cz-stat-v { width: 40px; text-align: right; color: #b8b2a4 }
.cz-stat-tag { font-size: 9px; letter-spacing: 2px; color: #6d6a62; margin-top: 2px }
.cz-tabs { display: flex; flex-wrap: wrap; gap: 4px }
.cz-tab { min-width: 0; padding: 4px 7px; font-size: 9px; letter-spacing: 1px; background: #14090a }
.cz-tab.sel { background: #d8341f; color: #0b0b0f }
.cz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px }
.cz-tile {
  display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  min-width: 0; padding: 5px; text-align: left; border-color: var(--rar, #4a4a52);
}
.cz-tile.sel { background: #26262a; border-color: #f2c14a }
.cz-tile.locked { opacity: 0.4; cursor: default }
.cz-tile.locked:hover { background: #14090a; color: #f4f1ea }
.cz-tile-sw { height: 14px; border: 1px solid #0b0b0f }
.cz-tile-name { font-size: 9px; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cz-tile-foot { font-size: 8px; letter-spacing: 1px }
.cz-actions { display: flex; gap: 8px; margin-top: 10px }
.cz-actions button { min-width: 0; flex: 1; padding: 10px 8px; font-size: 12px }
.btn-main { border-color: #d8341f; background: #d8341f; color: #0b0b0f; font-weight: bold }
.btn-main:hover { background: #f2c14a; border-color: #f2c14a }
.btn-ghost { border-color: #4a4a52; background: transparent }
.btn-ghost:hover { background: #26262a; color: #f4f1ea }

/* ---- the rings grid */
.scr-rings { background: rgba(5, 5, 7, 0.6); overflow-y: auto; padding: 20px }
.rg-head { display: flex; align-items: center; justify-content: space-between; max-width: 1060px; margin: 0 auto 14px }
.rg-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 1060px; margin: 0 auto }
.rg-card {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  min-width: 0; padding: 10px; font-size: 11px; letter-spacing: 1px; text-align: left;
}
.rg-num { font-size: 15px; font-weight: bold; letter-spacing: 2px }
.rg-phase { color: #f2c14a }
.rg-phase.live { color: #d8341f }
.rg-line { color: #b8b2a4 }
.rg-line.dim { color: #6d6a62; font-size: 9px }
.rg-line.wait { color: #f28422 }
.rg-lock { color: #6d6a62; font-size: 9px; letter-spacing: 2px }
.rg-card.closed { opacity: 0.4; cursor: default }
.rg-card.closed:hover { background: #14090a; color: #f4f1ea }
.rg-foot { display: flex; align-items: center; gap: 14px; max-width: 1060px; margin: 14px auto 0; flex-wrap: wrap }
.rg-note { font-size: 11px; letter-spacing: 2px; color: #f2c14a; min-height: 14px }

/* ---- the queue panel over the spectator view */
.queue {
  position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%);
  display: none; z-index: 10; text-align: center;
}
.queue.on { display: block }
.q-box {
  display: flex; flex-direction: column; gap: 7px; align-items: center;
  padding: 14px 22px; background: rgba(11, 11, 15, 0.9); border: 2px solid #7a1a14;
}
.q-ring { font-size: 16px; font-weight: bold; letter-spacing: 3px; color: #d8341f }
.q-place { font-size: 12px; letter-spacing: 2px; color: #f2c14a }
.q-timer { font-size: 10px; letter-spacing: 2px; color: #b8b2a4 }
.q-box button { min-width: 0; padding: 8px 16px; font-size: 11px }

/* ---- the click-catcher before you step in */
.ov.ready { cursor: pointer }

/* ---- the withdrawal modal */
.modal {
  position: absolute; inset: 0; display: none; z-index: 30;
  align-items: center; justify-content: center;
  background: rgba(5, 5, 7, 0.86);
}
.modal.on { display: flex }
.modal-box {
  width: min(430px, 92vw); max-height: 88vh; overflow-y: auto;
  background: #0b0b0f; border: 2px solid #d8341f; padding: 0;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid #7a1a14;
  font-weight: bold; letter-spacing: 3px; color: #d8341f;
}
.modal-x { min-width: 0; padding: 2px 10px; font-size: 16px; line-height: 1 }
.modal-body { display: flex; flex-direction: column; gap: 8px; padding: 12px }
.wd-rows { display: flex; flex-direction: column; gap: 4px }
.wd-row { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 2px; color: #b8b2a4 }
.wd-row b { color: #f4f1ea }
.wd-pending { font-size: 10px; letter-spacing: 2px; color: #f2c14a }
.wd-msg { min-height: 14px; font-size: 11px; letter-spacing: 2px; color: #4fd06a }
.wd-msg.bad { color: #d8341f }
.wd-hist-label { font-size: 9px; letter-spacing: 3px; color: #6d6a62; margin-top: 4px }
.wd-hist { display: flex; flex-direction: column; gap: 3px }
.wd-hist-line { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; letter-spacing: 1px }
.wd-hist-line.dim, .dim { color: #6d6a62 }


/* ---- wallet menu in the top bar */
.tb-right { position: relative }
.tb-wallet.tb-on { border-color: #4fd06a }
.tb-shop { border-color: #f2c14a }
.tb-menu { position: absolute; right: 0; top: 100%; margin-top: 6px; display: none; flex-direction: column; gap: 4px; padding: 6px; background: #0b0b0f; border: 1px solid #d8341f; z-index: 40 }
.tb-menu.on { display: flex }
.tb-menu .tb-btn { text-align: left; white-space: nowrap }

/* ---- the shop */
.scr-shop { background: rgba(5, 5, 7, 0.78); overflow-y: auto; padding: 56px 20px 24px }
.sh-wrap { max-width: 1060px; margin: 0 auto }
.sh-tabs { margin-bottom: 8px; align-items: center }
.sh-tabs .cz-tab { padding: 7px 14px; font-size: 11px }
.sh-who { margin-left: auto; font-size: 10px; letter-spacing: 2px; color: #b8b2a4 }
.sh-badge { font-size: 10px; letter-spacing: 3px; padding: 3px 8px; background: #f2c14a; color: #0b0b0f; font-weight: bold }
.sh-closed { padding: 14px; margin: 8px 0 14px; border: 2px dashed #7a1a14; color: #f2c14a; letter-spacing: 3px; text-align: center }
.sh-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
.sh-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: #0b0b0f; border: 2px solid #7a1a14 }
.sh-pro { border-color: #3a7be8 } .sh-champion { border-color: #f4c430 }
.sh-name { font-size: 22px; font-weight: bold; letter-spacing: 4px; color: #f4f1ea }
.sh-pro .sh-name { color: #3a7be8 } .sh-champion .sh-name { color: #f4c430 } .sh-rookie .sh-name { color: #d8341f }
.sh-price { font-size: 13px; letter-spacing: 3px; color: #f2c14a }
.sh-odds { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 }
.sh-odd { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 2px; padding: 2px 6px; border-left: 3px solid var(--rar) }
.sh-odd span { color: var(--rar) }
.sh-tip { font-size: 10px; letter-spacing: 2px; color: #4fd06a }
.sh-tip.dim { color: #6d6a62 }
.sh-keys { font-size: 12px; letter-spacing: 2px; margin-top: 4px }
.sh-btns { display: flex; gap: 8px; margin-top: 6px }
.sh-btns button { min-width: 0; flex: 1; padding: 10px 6px; font-size: 12px }
button:disabled { opacity: 0.4; cursor: default }
button:disabled:hover { background: #14090a; color: #f4f1ea }
.btn-main:disabled:hover { background: #d8341f; color: #0b0b0f }
.sh-foot { margin-top: 14px; letter-spacing: 2px }
.sh-stuff { display: flex; flex-direction: column; gap: 6px; margin-top: 8px }
.inv-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px }
.sh-connect { margin: 8px 0 }
.sh-link { display: block; text-align: center; padding: 10px; text-decoration: none; letter-spacing: 3px }
.sh-addr { word-break: break-all; font-size: 9px }

/* ---- the reel */
.reel { z-index: 40 }
.reel-box { width: min(760px, 96vw) }
.rl-window { position: relative; overflow: hidden; height: 120px; margin: 14px 0; background: #050507; border-top: 1px solid #7a1a14; border-bottom: 1px solid #7a1a14 }
.rl-strip { position: absolute; left: 0; top: 10px; display: flex; gap: 6px; will-change: transform }
.rl-tile { width: 90px; height: 100px; flex: none; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; background: #14090a; border: 2px solid var(--rar); box-shadow: inset 0 -16px 20px -12px var(--rar) }
.rl-sw { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #0b0b0f; border: 1px solid #0b0b0f }
.rl-name { font-size: 9px; letter-spacing: 1px; text-align: center; max-width: 84px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis }
.rl-mark { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1px; background: #f2c14a; box-shadow: 0 0 10px #f2c14a }
.rl-result { min-height: 28px; text-align: center; font-size: 20px; font-weight: bold; letter-spacing: 4px; padding: 0 10px }
.rl-actions { display: flex; gap: 8px; padding: 12px; justify-content: center }
.rl-actions button { min-width: 140px }

@media (max-width: 760px) { .sh-cases { grid-template-columns: 1fr } .tb-shop { display: none } }

@media (max-width: 760px) {
  .rg-grid { grid-template-columns: repeat(2, 1fr) }
  .tb-title { display: none }
  .cz-panel { width: 100vw; border-right: none }
  .ptitle { font-size: 26px }
}

/* ===== the bright look: rounded, bold, clean (overrides the first draft above) ===== */
body { font-family: "Segoe UI", "Arial Black", system-ui, sans-serif; font-weight: 700 }
button { font-weight: 800; letter-spacing: 2px; border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.16); background: rgba(24, 30, 46, 0.86); color: #f4f1ea; transition: transform .08s, background .12s }
button:hover { background: #e0402a; color: #fff; transform: translateY(-1px) }
button.big { background: linear-gradient(#ee5a3c, #c4301a); border-color: #ff9a80; font-size: 20px; letter-spacing: 4px; box-shadow: 0 4px 0 #7a1a10 }
button.big:hover { background: linear-gradient(#ff6c4c, #d63a22) }
button.big.dim2 { background: linear-gradient(#35405c, #232b42); border-color: rgba(255, 255, 255, 0.28); box-shadow: 0 4px 0 #121828; opacity: 1 }
button.big.dim2:hover { background: linear-gradient(#46547a, #2d3752) }
.btn-main { background: linear-gradient(#ee5a3c, #c4301a); border-color: #ff9a80; color: #fff }
.btn-main:hover { background: linear-gradient(#ff6c4c, #d63a22); border-color: #ffd0c4 }
.btn-ghost { background: rgba(255, 255, 255, 0.07) }
.ov { background: rgba(10, 14, 26, 0.7) }
#menu.ov { background: linear-gradient(rgba(10, 14, 26, 0.55), rgba(10, 14, 26, 0.12) 50%, rgba(10, 14, 26, 0.7)) }
.logo { font-family: "Arial Black", Impact, sans-serif; font-style: italic; font-size: 84px; letter-spacing: 3px; color: #fff; text-shadow: 0 5px 0 #1b3f8c, 0 10px 24px rgba(0, 0, 0, 0.55) }
.logo span { color: #ff5a3c; text-shadow: 0 5px 0 #7a1a10, 0 10px 24px rgba(0, 0, 0, 0.55) }
.tag { font-size: 13px; letter-spacing: 3px; color: #dfe6f6; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6) }
.keys, .dim { color: #b9c3dc }
.tb { background: rgba(14, 18, 30, 0.82); border-bottom: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(6px) }
.tb-title { font-family: "Arial Black", Impact, sans-serif; letter-spacing: 3px }
.tb-btn { border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(40, 48, 72, 0.7); letter-spacing: 1.5px }
.tb-wd { border-color: #ffd34a; color: #ffd34a }
.tb-wd:hover, .tb-shop:hover { color: #fff }
.tb-shop { border-color: #6fb0ff; color: #bcd9ff }
.cz-panel, .scr-rings, .scr-shop { backdrop-filter: blur(5px) }
.cz-panel { background: rgba(14, 18, 32, 0.88); border-right: 1px solid rgba(255, 255, 255, 0.14) }
.cz-head, .rg-title { color: #ff5a3c; text-shadow: 0 3px 0 #5a140c; font-family: "Arial Black", Impact, sans-serif; font-style: italic }
.cz-name { border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.25) }
.cz-style, .cz-tile, .cz-tab, .rg-card { border-radius: 8px }
.cz-style.sel, .cz-tab.sel { background: #e0402a; color: #fff }
.cz-tile.sel { background: rgba(255, 255, 255, 0.14); border-color: #ffd34a }
.cz-stat-bar { border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.12) }
.cz-stat-fill { background: #6fb0ff }
.cz-stat-fill.up { background: #58d36a }
.cz-stat-fill.down { background: #e0402a }
.rg-card { background: rgba(24, 30, 50, 0.85); border: 2px solid rgba(255, 255, 255, 0.18) }
.rg-card:hover { background: #e0402a }
.sh-card, .modal-box, .q-box { border-radius: 14px; background: rgba(16, 20, 36, 0.94) }
.sh-card { border-width: 2px }
.modal-box { border: 2px solid rgba(255, 255, 255, 0.25) }
.modal-head { color: #ff5a3c; border-bottom: 1px solid rgba(255, 255, 255, 0.14) }
.rl-tile { border-radius: 8px }
.rl-window { border-radius: 10px }
.sh-closed { border-radius: 10px; border-color: #ffd34a; color: #ffd34a }

/* slimmer, quieter top bar */
.tb { padding: 4px 12px; background: rgba(10, 13, 22, 0.7) }
.tb-title { font-size: 12px; letter-spacing: 3px }
.tb-btn { padding: 4px 9px; font-size: 10px; letter-spacing: 1.2px }

/* the X button is a white logo, not a blue link; the balance chip lights up when there is SOL */
.tb-x, .tb-x:visited, .tb-x:hover { color: #fff; text-decoration: none; font-weight: 900; border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.1) }
.tb-x:hover { background: #fff; color: #0b0b0f }
.tb-bal { border-color: rgba(88, 211, 106, 0.5); color: #b9f0c4 }
.tb-bal.tb-has { border-color: #58d36a; color: #58d36a; background: rgba(88, 211, 106, 0.12) }
