/* Neon Blackjack — shell styles (DOM cards, neon table). */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #0a0a18; color: #dff3ff; overflow: hidden;
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#app { height: 100%; display: flex; flex-direction: column; }

#topbar {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 8px; justify-content: center;
}
.chip {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(0,229,255,0.3);
  border-radius: 999px; padding: 4px 10px; font-size: .78rem;
  display: flex; gap: 6px; align-items: center; min-height: 30px;
}
.chip .lb { color: #7f93b8; font-size: .64rem; letter-spacing: .08em; }
.chip b { color: #ffd54a; font-variant-numeric: tabular-nums; }
#handNo { color: #9db4d8; font-size: .72rem; }
.tab {
  background: rgba(124,77,255,0.12); color: #9db4d8; border: 1px solid rgba(124,77,255,0.4);
  border-radius: 999px; padding: 6px 12px; min-height: 36px; font-weight: 700; font-size: .72rem; cursor: pointer;
}
.tab.on { background: linear-gradient(135deg, rgba(0,229,255,.25), rgba(124,77,255,.35)); color: #fff; border-color: #00e5ff; }
.pill {
  background: rgba(255,255,255,0.08); color: #dff3ff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; min-width: 40px; height: 40px; font-size: .95rem; cursor: pointer;
}
.pill.wide { padding: 0 12px; font-size: .78rem; }

#table {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: space-evenly; position: relative; padding: 6px 10px;
  background:
    radial-gradient(ellipse 90% 55% at 50% 46%, rgba(124,77,255,0.12), transparent 70%),
    #0a0a18;
}
#table::before {
  content: ""; position: absolute; left: 50%; top: 44%; width: min(92%, 560px); height: 70%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(124,77,255,0.5); border-bottom: none;
  border-radius: 280px 280px 18px 18px / 220px 220px 18px 18px;
  box-shadow: 0 0 30px rgba(124,77,255,0.18), inset 0 0 40px rgba(124,77,255,0.06);
  pointer-events: none;
}
.row { display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 1; }
.zoneLabel { font-size: .62rem; letter-spacing: .16em; color: #7f93b8; }
.zoneLabel b { color: #00e5ff; margin-left: 6px; font-size: .8rem; }
.cards { display: flex; gap: 8px; min-height: 74px; align-items: center; }
.card {
  width: 54px; height: 74px; border-radius: 8px; background: #f4f7ff; position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,255,0.25);
  animation: dealIn .28s ease-out;
}
.card .cr { position: absolute; top: 4px; left: 6px; font-weight: 800; font-size: .95rem; color: #14203c; }
.card .cs { position: absolute; bottom: 6px; right: 7px; font-size: 1.15rem; color: #14203c; }
.card.red .cr, .card.red .cs { color: #d81b60; }
.card.back { background: linear-gradient(135deg, #1b2352, #101638); }
.card.back .bk::before { content: "◆"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(0,229,255,0.55); font-size: 1.4rem; }
.card.flip { animation: flipIn .3s ease-out; }
@keyframes dealIn { from { transform: translateY(-14px) scale(.85); opacity: 0; } }
@keyframes flipIn { from { transform: rotateY(90deg); } }

.banner { min-height: 30px; font-weight: 800; letter-spacing: .1em; font-size: 1.05rem; z-index: 1; }
.banner.show.win { color: #22ff88; text-shadow: 0 0 16px rgba(34,255,136,.6); }
.banner.show.push { color: #ffd54a; }
.banner.show.bj { color: #ffd54a; text-shadow: 0 0 20px rgba(255,213,74,.75); animation: pulse 1s infinite; }
.banner.show.lose, .banner.show.bust { color: #ff2d95; text-shadow: 0 0 16px rgba(255,45,149,.6); }

.coach {
  min-height: 46px; max-width: min(92%, 460px); border-radius: 12px; padding: 8px 14px; z-index: 1;
  display: none; flex-direction: column; gap: 2px; text-align: center;
  background: rgba(20,16,40,0.82); border: 1px solid rgba(255,213,74,0.5);
  box-shadow: 0 0 22px rgba(255,213,74,0.18);
}
.coach.show { display: flex; }
.coach b { color: #ffd54a; font-size: .84rem; letter-spacing: .04em; }
.coach span { color: #c9b8ff; font-size: .7rem; }
.coach.H { border-color: rgba(0,229,255,0.55); }
.coach.S { border-color: rgba(34,255,136,0.55); }
.coach.D { border-color: rgba(255,213,74,0.75); }

.btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; z-index: 1; }
.chipbtn {
  background: radial-gradient(circle at 32% 30%, #2b3a72, #16204a); color: #ffd54a;
  border: 2px solid rgba(255,213,74,0.55); border-radius: 999px; font-weight: 800;
  min-width: 56px; min-height: 56px; font-size: .9rem; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}
.chipbtn.ghost { color: #7f93b8; border-color: rgba(127,147,184,0.4); background: rgba(255,255,255,0.04); }
.chipbtn:active { transform: scale(.93); }
.act {
  min-width: 104px; min-height: 56px; border-radius: 14px; border: 0; font-weight: 800;
  font-size: .95rem; letter-spacing: .06em; cursor: pointer; color: #061024;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
.act.hit { background: linear-gradient(135deg, #00e5ff, #22a5ff); }
.act.stand { background: linear-gradient(135deg, #22ff88, #0fc); }
.act.dbl { background: linear-gradient(135deg, #ffd54a, #ff9f1a); }
.act:disabled { filter: grayscale(0.8) brightness(0.6); cursor: default; }
.act:active:not(:disabled) { transform: scale(.95); }
.primary {
  background: linear-gradient(135deg, #00e5ff, #7c4dff); color: #061024; font-weight: 800;
  border: 0; border-radius: 12px; padding: 12px 28px; min-height: 48px; font-size: .95rem;
  cursor: pointer; letter-spacing: .05em; box-shadow: 0 4px 18px rgba(0,229,255,.35); z-index: 1;
}
.primary:disabled { filter: grayscale(0.7) brightness(0.65); }
.primary:active:not(:disabled) { transform: scale(.96); }
.hide { display: none !important; }

#foot {
  display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px;
  font-size: .62rem; color: #64789c; flex-wrap: wrap;
}
#funOnly { color: #b3893a; }

.overlay {
  position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center;
  background: rgba(6,8,24,0.75); backdrop-filter: blur(3px);
}
.panel {
  text-align: center; padding: 26px 30px; border-radius: 16px; max-width: 88%;
  background: rgba(14,18,44,0.94); border: 1px solid rgba(0,229,255,0.35);
  box-shadow: 0 0 34px rgba(0,229,255,0.18), inset 0 0 22px rgba(124,77,255,0.12);
}
.panel h2 { font-size: 1.2rem; color: #ffd54a; letter-spacing: .06em; margin-bottom: 8px; }
.panel .sub { color: #9db4d8; margin: 6px 0 12px; font-size: .84rem; }
.bigscore { font-size: 2.2rem; font-weight: 800; margin-bottom: 6px; }
.bigscore.pos { color: #22ff88; text-shadow: 0 0 20px rgba(34,255,136,.5); }
.bigscore.neg { color: #ff2d95; text-shadow: 0 0 20px rgba(255,45,149,.5); }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .card, .card.flip, .banner.show.bj { animation: none; }
}
