/* ============================================================
   Hold'em for Meta Ray-Ban Display Glasses
   600 x 600 viewport, additive display:
     #000 = transparent (real world shows through)
     UI surfaces use dark grey to remain visible
     Felt is drawn on canvas with dim glow, not solid color
   ============================================================ */

:root {
  --bg-page:        #000000;
  --bg-surface:     #14141a;
  --bg-surface-hi:  #1f1f29;
  --bg-modal:       #0f0f15;
  --text:           #ffffff;
  --text-dim:       #b0b0bb;
  --text-mute:      #707080;
  --accent:         #00d4ff;
  --accent-glow:    rgba(0, 212, 255, 0.55);
  --gold:           #ffcc44;
  --danger:         #ff4466;
  --green:          #38d870;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: var(--bg-page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  position: relative;
  width: 600px;
  height: 600px;
}

/* ---------- Screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.screen.hidden { display: none; }

.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 8px;
  flex-shrink: 0;
}
.screen-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text);
  border: 2px solid transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Focus ring (universal) ---------- */
.focusable { outline: none; transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease; }
.focusable:focus,
.focusable:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent), 0 0 18px var(--accent-glow);
}

/* ============================================================
   Main Menu
   ============================================================ */
.menu-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 24px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.brand-mark {
  width: 100px;
  height: 100px;
}
.brand-svg { width: 100%; height: 100%; display: block; }
.brand-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 4px;
  margin-top: 6px;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 320px;
  max-width: 100%;
}
.menu-btn {
  height: 56px;
  padding: 0 20px;
  background: var(--bg-surface);
  color: var(--text);
  border: 2px solid var(--bg-surface-hi);
  border-radius: var(--radius-md);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-btn.primary {
  background: linear-gradient(180deg, #00d4ff22, #00d4ff0a);
  border-color: var(--accent);
  color: var(--accent);
}
.menu-btn:hover { background: var(--bg-surface-hi); }

/* ============================================================
   Option list (difficulty etc.)
   ============================================================ */
.opt-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 24px 24px;
}
.opt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 20px;
  background: var(--bg-surface);
  color: var(--text);
  border: 2px solid var(--bg-surface-hi);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
}
.opt-title { font-size: 18px; font-weight: 700; }
.opt-sub   { font-size: 13px; color: var(--text-dim); }

/* ============================================================
   Game screen (canvas + pinned action bar)
   ============================================================ */
#game {
  flex-direction: column;
}
#table {
  position: absolute;
  inset: 0;
  width: 600px;
  height: 600px;
  display: block;
}
.action-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  z-index: 2;
}
.act-btn {
  height: 56px;
  background: rgba(20, 20, 26, 0.92);
  border: 2px solid var(--bg-surface-hi);
  border-radius: var(--radius-md);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.act-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.act-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.act-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}
.act-btn.fold .act-label { color: #ff7a8a; }
.act-btn.allin .act-label { color: var(--gold); }

/* ============================================================
   Modals
   ============================================================ */
.modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--bg-modal);
  border: 2px solid var(--bg-surface-hi);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 460px;
  max-width: 92%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 1px;
}

/* Sizer */
.sizer-amount {
  font-size: 44px;
  font-weight: 800;
  text-align: center;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(255, 204, 68, 0.35);
  margin: 4px 0 6px;
}
.sizer-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.preset-btn {
  height: 40px;
  background: var(--bg-surface);
  border: 2px solid var(--bg-surface-hi);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.preset-btn.active {
  border-color: var(--gold);
  color: var(--gold);
}
.sizer-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.5px;
}
.sizer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

/* Hand result */
.result-detail {
  text-align: center;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.4;
}
.result-board {
  text-align: center;
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: 0.5px;
}

/* ============================================================
   Tournament over
   ============================================================ */
.over-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 16px;
}
.over-result {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
}
.over-detail {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* ============================================================
   Stats
   ============================================================ */
.stats-content {
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}
.stat-key { color: var(--text-dim); font-size: 14px; }
.stat-val { font-weight: 700; font-size: 16px; }

/* ============================================================
   How to Play
   ============================================================ */
.how-content {
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.how-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.3;
}
.how-key {
  min-width: 70px;
  padding: 4px 8px;
  background: var(--bg-surface-hi);
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
.how-tip {
  font-size: 12px;
  color: var(--text-mute);
  background: transparent;
}
.how-rank-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-top: 8px;
  text-transform: uppercase;
}
.how-ranks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  font-size: 12px;
  color: var(--text);
  padding: 4px 4px;
}
