/* 40 OR BUST — neon hip-hop casino styling.
   Fixed 1080x1920 stage, scaled to any portrait screen. */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #000; overflow: hidden;
  font-family: "Arial Black", Arial, Helvetica, sans-serif; }

#viewport { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
#stage { position: relative; width: 1080px; height: 1920px; transform-origin: center center;
  background: #05061a; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- HERO ---------- */
#hero { position: relative; height: 480px; flex: 0 0 480px; overflow: hidden;
  background: linear-gradient(180deg, #2b1b78 0%, #1b2fb8 55%, #0a0f3a 100%); }
#hero .layer { position: absolute; inset: 0; background-size: cover; background-position: center bottom; pointer-events: none; }
#layer-hero-skyline { z-index: 1; }
#layer-hero-cards { z-index: 2; background-size: 56% auto; background-position: center 0%; background-repeat: no-repeat; mix-blend-mode: screen; opacity: .9; }
#layer-hero-car { z-index: 3; background-size: 44% auto; background-position: right 3% bottom 4%; background-repeat: no-repeat; mix-blend-mode: screen; }

#title-diamond { position: absolute; z-index: 4; left: 50%; top: 62%; width: 560px; height: 300px;
  transform: translate(-50%, -50%) rotate(45deg); border-radius: 46px;
  background: rgba(10, 4, 40, .88);
  border: 10px solid #8a2bff;
  box-shadow: 0 0 24px #8a2bff, 0 0 70px #8a2bff, inset 0 0 34px rgba(138, 43, 255, .65); }
#title-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transform: rotate(-45deg); text-align: center; line-height: .95;
  font-size: 96px; letter-spacing: 2px; color: #ffd23e;
  text-shadow: 0 0 10px #ff2fb3, 0 0 26px #ff2fb3, 3px 3px 0 #7c0f5e; }
#title-text span { font-size: 54px; color: #29e6ff; text-shadow: 0 0 12px #29e6ff; padding: 0 8px; }

/* ---------- PAY STRIP ---------- */
#paystrip { flex: 0 0 172px; display: flex; align-items: stretch; justify-content: space-between;
  padding: 14px 22px; gap: 10px;
  background: linear-gradient(180deg, #10131f, #1c2233 45%, #10131f);
  border-top: 5px solid #29e6ff; border-bottom: 5px solid #29e6ff;
  box-shadow: 0 0 18px rgba(41, 230, 255, .5); }
.paycell { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.paycell .mini { display: flex; }
.paycell .mini i { display: block; width: 30px; height: 42px; margin-left: -8px; border-radius: 5px;
  background: #f4f4f0; color: #10131f; font-style: normal; font-weight: 900; font-size: 20px;
  border: 2px solid #0a0f3a; box-shadow: 0 2px 4px rgba(0,0,0,.6);
  display: flex; align-items: flex-start; justify-content: center; }
.paycell .mini i:first-child { margin-left: 0; }
.paycell .mini i.red { color: #c01e2e; }
.paycell .plabel { font-size: 17px; color: #cfd6ff; letter-spacing: .5px; text-align: center; line-height: 1.05; }
.paycell .podds { font-size: 30px; color: #ffd23e; text-shadow: 0 0 8px rgba(255, 210, 62, .8); }

/* ---------- FELT ---------- */
#felt { position: relative; flex: 1 1 auto; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1b2fb8 0%, #121f7e 45%, #060a2e 100%); }
#dealer-tag { text-align: right; font-size: 26px; color: #fff;
  text-shadow: 0 0 8px rgba(41, 230, 255, .9); letter-spacing: 1px; }

#felt-inner { position: absolute; top: 0; left: 0; width: 100%; box-sizing: border-box; padding: 6px 30px 0; display: flex; flex-direction: column; justify-content: space-evenly; transform-origin: top center; }
.cardrow { display: flex; justify-content: center; gap: 18px; }
.card { width: 143px; height: 200px; border-radius: 13px; position: relative;
  background: linear-gradient(160deg, #ffffff, #dfe3ee);
  border: 3px solid #0a0f3a; box-shadow: 0 6px 14px rgba(0, 0, 0, .55);
  color: #10131f; }
.card.red { color: #c01e2e; }
.card .rank { position: absolute; top: 8px; left: 10px; font-size: 40px; font-weight: 900; line-height: 1; }
.card .suit { position: absolute; bottom: 8px; right: 10px; font-size: 44px; line-height: 1; }
.card .pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 84px; opacity: .92; }
.card.back { background: repeating-linear-gradient(45deg, #141a5e 0 12px, #1b2fb8 12px 24px);
  border-color: #29e6ff; box-shadow: 0 6px 14px rgba(0,0,0,.55), 0 0 12px rgba(41,230,255,.35); }
.card.back::after { content: "40"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 900; color: rgba(41, 230, 255, .75); text-shadow: 0 0 10px rgba(41,230,255,.8); }
.card.slot { background: rgba(255, 255, 255, .07); border: 3px dashed rgba(207, 214, 255, .35); box-shadow: none; }
.card.doubled { border-color: #ffd23e; box-shadow: 0 6px 14px rgba(0,0,0,.55), 0 0 22px rgba(255, 210, 62, .85); }
.card.doubled::before { content: "2X"; position: absolute; top: -16px; right: -16px; z-index: 2;
  width: 56px; height: 56px; border-radius: 50%; background: #ffd23e; color: #10131f;
  font-size: 28px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px rgba(255, 210, 62, .9); }

.doublespot { display: flex; justify-content: center; align-items: center; height: 190px; margin: 4px 0; }
.doublespot span { width: 143px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  border: 3px dashed rgba(255, 210, 62, .8); color: #ffd23e; font-size: 22px; letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(255, 210, 62, .8); }
.doublespot.filled span { display: none; }
.doublespot .card { width: 136px; height: 190px; }

.points { text-align: center; font-size: 28px; color: #cfd6ff; min-height: 36px; margin-top: 2px; letter-spacing: 1px; }
.points b { color: #fff; }

#dealer-zone { padding-top: 6px; }
#player-zone { margin-top: 6px; }

#banner { min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: 0 0 auto; }
#banner .main { font-size: 50px; letter-spacing: 2px; color: #fff; text-shadow: 0 0 18px rgba(41, 230, 255, .9); }
#banner .main.good { color: #7dff8a; text-shadow: 0 0 18px rgba(125, 255, 138, .9); }
#banner .main.bad { color: #ff5d6d; text-shadow: 0 0 18px rgba(255, 93, 109, .9); }
#banner .main.push { color: #ffd23e; text-shadow: 0 0 18px rgba(255, 210, 62, .9); }
#banner .sub { font-size: 26px; color: #cfd6ff; }

#advice { text-align: center; min-height: 28px; font-size: 22px; color: #29e6ff; font-style: italic; flex: 0 0 auto; }
#dealer-zone, #player-zone { flex: 0 0 auto; }

/* ---------- CONTROLS ---------- */
#controls { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 8px 0 14px; flex: 0 0 auto; }
.stepper { width: 300px; }
.step-label { font-size: 22px; color: #cfd6ff; text-align: center; letter-spacing: 1px; margin-bottom: 8px; }
.step-body { display: flex; align-items: center; justify-content: space-between; height: 110px;
  border: 4px solid #29e6ff; border-radius: 60px; background: linear-gradient(180deg, #1c2233, #10131f);
  box-shadow: 0 0 14px rgba(41, 230, 255, .45); padding: 0 12px; }
.step-btn { width: 76px; height: 76px; border-radius: 50%; border: 0; font-size: 46px; font-weight: 900;
  background: #29e6ff; color: #10131f; cursor: pointer; }
.step-btn:disabled { opacity: .3; }
.step-value { font-size: 42px; color: #fff; min-width: 120px; text-align: center; }

#action-buttons { display: flex; flex-direction: column; gap: 12px; }
.action { width: 300px; height: 104px; border-radius: 56px; border: 6px solid #29e6ff;
  font-family: inherit; font-size: 40px; font-weight: 900; letter-spacing: 2px; cursor: pointer; color: #10131f; }
.action.yellow { background: linear-gradient(180deg, #fff06b, #ffd23e); box-shadow: 0 0 20px rgba(255, 210, 62, .8); }
.action.cyan { background: linear-gradient(180deg, #7df3ff, #29e6ff); box-shadow: 0 0 20px rgba(41, 230, 255, .8); }
.action.gold { background: linear-gradient(180deg, #ffe9a8, #f5b81d); border-color: #ffd23e; box-shadow: 0 0 20px rgba(255, 210, 62, .8); }
.action:disabled { opacity: .28; box-shadow: none; cursor: default; }

/* ---------- BOTTOM BAR ---------- */
#bottombar { position: relative; flex: 0 0 210px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; gap: 18px; background: #10131f; border-top: 5px solid #29e6ff;
  box-shadow: 0 -4px 18px rgba(41, 230, 255, .35); }
.meter { width: 290px; height: 130px; border: 4px solid #29e6ff; border-radius: 18px;
  background: linear-gradient(180deg, #1c2233, #0b0e18); display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.meter-label { font-size: 22px; color: #8b93b8; letter-spacing: 2px; }
.meter-value { font-size: 52px; color: #fff; text-shadow: 0 0 10px rgba(41, 230, 255, .6); }
#bar-buttons { display: flex; flex-direction: column; gap: 14px; }
.bar-btn { min-width: 220px; height: 62px; border-radius: 32px; border: 3px solid #29e6ff; background: transparent;
  color: #29e6ff; font-family: inherit; font-size: 24px; font-weight: 900; letter-spacing: 1px; cursor: pointer; }
.bar-btn:active { background: rgba(41, 230, 255, .15); }
#free-tag { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%);
  font-size: 16px; color: #565f86; letter-spacing: 2px; font-family: Arial, sans-serif; }

/* ---------- OVERLAYS ---------- */
.overlay { position: absolute; inset: 0; z-index: 50; background: rgba(2, 3, 12, .9);
  display: flex; align-items: center; justify-content: center; }
.overlay.hidden { display: none; }
.panel { width: 900px; max-height: 1700px; overflow-y: auto; border: 4px solid #8a2bff; border-radius: 26px;
  background: #10131f; padding: 40px 46px; box-shadow: 0 0 40px rgba(138, 43, 255, .6); }
.panel h2 { color: #ffd23e; font-size: 44px; letter-spacing: 2px; margin-bottom: 24px; text-align: center; }
.panel ul { list-style: none; }
.panel li { color: #dfe4ff; font-family: Arial, sans-serif; font-size: 28px; line-height: 1.45; margin-bottom: 18px;
  padding-left: 34px; position: relative; }
.panel li::before { content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 14px;
  border-radius: 50%; background: #29e6ff; box-shadow: 0 0 8px #29e6ff; }
.panel li b { color: #ffd23e; }
.panel .bar-btn { display: block; margin: 26px auto 0; }
.opt-row { margin-bottom: 22px; text-align: center; }
.opt-row label { color: #dfe4ff; font-family: Arial, sans-serif; font-size: 30px; }
.opt-row input { width: 34px; height: 34px; vertical-align: middle; margin-right: 12px; }
.admin-note { color: #8b93b8; font-family: Arial, sans-serif; font-size: 24px; line-height: 1.4; margin-bottom: 20px; }
.admin-layer { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; border: 2px solid #2a3152;
  border-radius: 14px; padding: 14px; }
.admin-layer img { width: 130px; height: 86px; object-fit: cover; border-radius: 8px; background: #000; }
.admin-layer .al-name { flex: 1; color: #dfe4ff; font-family: Arial, sans-serif; font-size: 26px; }
.admin-layer .al-file { color: #565f86; font-family: Arial, sans-serif; font-size: 19px; }
.admin-layer label.up { border: 3px solid #29e6ff; border-radius: 26px; color: #29e6ff; font-size: 20px;
  font-weight: 900; padding: 12px 18px; cursor: pointer; white-space: nowrap; }
.admin-layer input[type=file] { display: none; }
