/* ================= BUTTONS ================= */

.btn {
  padding: 12px 24px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.18s var(--ease-out-soft), box-shadow 0.18s, filter 0.18s, opacity .18s;
  box-shadow: 0 6px 16px var(--shadow-soft);
}
.btn:active,
.btn.is-pressed:not(:disabled) { transform: translateY(1px) scale(0.98); }
.btn:disabled { cursor: not-allowed; pointer-events: none; }

.btn--primary {
  background: linear-gradient(165deg, var(--brass-200) 0%, var(--brass-400) 45%, var(--brass-700) 100%);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow:
    0 8px 22px rgba(0,0,0,0.35),
    0 0 0 1px rgba(232,200,116,0.2) inset;
}
.btn--primary:hover:not(:disabled) {
  filter: brightness(1.07);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4), 0 0 24px var(--shadow-gold);
}

.btn--knock {
  font-family: var(--font-display);
  min-width: 118px;
  padding: 13px 34px;
  border-radius: 11px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--gold-400);
  background: linear-gradient(180deg, var(--knock-blue-top) 0%, var(--knock-blue-mid) 55%, var(--knock-blue-bot) 100%);
  color: #fff;
  box-shadow:
    0 4px 0 #0a1428,
    0 8px 22px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn--gin {
  font-family: var(--font-display);
  min-width: 118px;
  padding: 13px 34px;
  border-radius: 11px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid #f5d87a;
  background: linear-gradient(180deg, #e8c874 0%, var(--gold-500) 48%, var(--gold-600) 100%);
  color: var(--felt-brown-900);
  box-shadow:
    0 4px 0 #6b5028,
    0 8px 22px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--knock:disabled {
  background: linear-gradient(180deg, #3d4555 0%, #2a3040 100%);
  color: #6b7280;
  border-color: rgba(212, 175, 90, 0.2);
  opacity: 1;
  filter: none;
  box-shadow: 0 3px 0 #1a1e28, 0 4px 12px rgba(0, 0, 0, 0.3);
}
.btn--gin:disabled {
  background: linear-gradient(180deg, #7a6548 0%, #5a4530 100%);
  color: #9a8878;
  border-color: rgba(212, 175, 90, 0.2);
  opacity: 1;
  filter: none;
  box-shadow: 0 3px 0 #3a2a18, 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn--knock:not(:disabled):hover,
.btn--gin:not(:disabled):hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn--knock:not(:disabled):active,
.btn--gin:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #0a1428, 0 4px 12px rgba(0, 0, 0, 0.35);
}
.btn--gin:not(:disabled):active {
  box-shadow: 0 2px 0 #6b5028, 0 4px 12px rgba(0, 0, 0, 0.35);
}
.btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--cream-dim);
  border: 1px solid rgba(255,255,255,0.1);
  margin-top: 8px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,0.1); }

.btn--large {
  padding: 16px 38px;
  font-size: 14px;
  border-radius: 15px;
  letter-spacing: 0.12em;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 15px;
  color: var(--cream);
  backdrop-filter: blur(6px);
  transition: background 0.22s, opacity 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.icon-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(232,200,116,0.35);
  box-shadow: 0 0 16px var(--shadow-gold);
}
.icon-btn.is-off { opacity: 0.38; }

/* ================= SCOREBOARD ================= */

.scoreboard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.score-block { text-align: center; min-width: 96px; position: relative; }

.score-name {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-500);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
}

.dealer-badge {
  font-size: 8px;
  padding: 2px 7px;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--brass-300), var(--brass-600));
  color: var(--ink);
  letter-spacing: 0.08em;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.score-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 2px 8px rgba(0,0,0,0.55);
  line-height: 1.05;
}

.score-track {
  width: 96px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  margin-top: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.score-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brass-600), var(--brass-300));
  transition: width 0.7s var(--ease-luxe);
  box-shadow: 0 0 8px var(--shadow-gold);
}
.score-fill--house {
  background: linear-gradient(90deg, #3a6b52, #5a9a72);
}

.score-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(232,200,116,0.08);
  border: 1px solid rgba(232,200,116,0.18);
}
.score-vs span {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--brass-600);
  font-size: 13px;
}

/* ================= MODALS ================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(7vh, env(safe-area-inset-top)) max(11vw, env(safe-area-inset-right))
           max(7vh, env(safe-area-inset-bottom)) max(11vw, env(safe-area-inset-left));
  background: rgba(2, 10, 8, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-luxe);
}
.modal.is-open { opacity: 1; }

.modal-card {
  position: relative;
  box-sizing: border-box;
  width: min(620px, 78vw);
  height: auto;
  max-height: 86dvh;
  overflow: hidden;
  padding: 36px 32px 30px;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(168deg, #5a3490 0%, #3a1868 100%);
  border: 2px solid #f5c842;
  box-shadow: 0 40px 80px rgba(0,0,0,0.65);
  animation: modalIn 0.38s var(--ease-luxe) both;
}

.modal-card__frame {
  position: absolute;
  inset: 10px;
  border-radius: 16px;
  border: 1px solid rgba(232,200,116,0.12);
  pointer-events: none;
}

.modal-brand {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-400);
  margin-bottom: 6px;
  font-weight: 800;
}

.modal-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-500);
  margin-bottom: 4px;
  font-weight: 700;
}

.modal-title {
  font-size: 36px;
  margin-bottom: 20px;
}
.modal-title--small { font-size: 28px; margin-bottom: 16px; }

.modal-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.modal-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 10px 16px;
  border-radius: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.04);
}
.modal-row .label { color: var(--cream-dim); }
.modal-row .value { font-weight: 700; color: var(--cream); }
.modal-row--accent {
  background: rgba(201,169,97,0.12);
  border-color: rgba(232,200,116,0.18);
}
.modal-row--accent .value { color: var(--brass-300); }

.modal-calculation { margin: -10px 0 16px; padding: 10px 14px; border-left: 3px solid #e8c874; background: rgba(232,200,116,.08); text-align: left; }
.modal-calculation b { display: block; color: #f5d76e; font-size: 13px; }
.modal-calculation span { display: block; margin-top: 4px; color: var(--cream-dim); font-size: 11px; }
.modal-xp { display: flex; justify-content: center; gap: 12px; margin: -7px 0 14px; color: #9ce65b; font-size: 13px; font-weight: 800; }
.modal-xp strong { color: #ffd740; }

.modal-scoreline {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--cream);
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
}
.modal-scoreline .divider { color: var(--brass-700); }

.modal-btn { width: 100%; }

.modal-reward {
  font-size: 18px;
  font-weight: 800;
  color: #ffd740;
  margin: -8px 0 16px;
}

.modal-card.is-victory {
  border-color: rgba(232,200,116,0.55);
  box-shadow: 0 40px 80px var(--shadow-hard), 0 0 40px var(--shadow-gold);
}
.modal-card.is-defeat { border-color: rgba(213,85,90,0.45); }

@media (max-height: 700px) {
  .modal-card {
    width: min(520px, 78vw);
    max-height: 86dvh;
    padding: 20px 22px 18px;
  }

  .modal-title { font-size: 26px; margin-bottom: 12px; }
  .modal-title--small { font-size: 22px; margin-bottom: 10px; }
  .modal-rows { margin-bottom: 12px; gap: 6px; }
  .modal-scoreline { font-size: 16px; margin-bottom: 14px; }
}

/* legacy menu row styles removed — see menu-modal.css */
