/* ============================================================
   BLIND AUCTION — Modern High-Roller Casino Theme
   ============================================================ */
:root {
  --bg-0: #080b12;
  --bg-1: #0f1524;
  --panel: #151d30;
  --panel-2: #1e2842;
  --panel-3: #283556;
  --border: rgba(212, 175, 55, 0.28);
  --border-soft: rgba(212, 175, 55, 0.12);
  --gold: #d4af37;
  --gold-hi: #f9e282;
  --gold-dim: #947a24;
  --red: #e64a19;
  --red-hi: #ff6e40;
  --green: #2e7d32;
  --green-hi: #4caf50;
  --text: #f8f5ee;
  --text-dim: #c5beae;
  --muted: #7f8ca8;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.65);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font-display: 'Alexandria', system-ui, -apple-system, sans-serif;
  --font-body: 'Tajawal', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(212, 175, 55, 0.12), transparent 60%),
    radial-gradient(ellipse 700px 600px at 100% 100%, rgba(120, 90, 180, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
  user-select: none;
}

#app {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

/* Layout & Screens */
.screen {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: rise .4s cubic-bezier(.2,.8,.2,1);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.eyebrow .line { height: 1px; width: 22px; background: var(--border); }

h1.title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  text-align: center;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--gold-hi) 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2.title-sm {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  text-align: center;
  margin: 0;
}

p.sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px 18px;
}

/* Primary Seal Button */
.seal-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 999px;
  border: 1px solid var(--gold-dim);
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 65%, #8e7223 100%);
  color: #1a1204;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform .12s ease, box-shadow .12s ease;
}
.seal-btn:active { transform: scale(0.97); }
.seal-btn:disabled { opacity: 0.4; pointer-events: none; }

/* Dynamic Player Manager */
.player-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.player-input-row input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fff;
  font-size: 15px;
}
.player-input-row input:focus { outline: none; border-color: var(--gold-hi); }

.add-player-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--panel-3);
  border: 1.5px solid var(--border);
  color: var(--gold-hi);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  font-size: 13.5px;
  font-weight: 700;
}
.player-chip__remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(230, 74, 25, 0.2);
  color: var(--red-hi);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rules Accordion */
.rules-toggle {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline dotted;
  cursor: pointer;
}
.rules-box {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.75;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.rules-box b { color: var(--gold-hi); }
.rules-box ul { margin: 6px 0 0 0; padding-right: 18px; }

/* Prize Display Card */
.prize-card { text-align: center; padding-top: 28px; }
.prize-icon { font-size: 52px; margin-bottom: 8px; filter: drop-shadow(0 6px 16px rgba(212,175,55,0.3)); }
.prize-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin-bottom: 6px; }
.prize-desc { color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.prize-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(212,175,55,0.12);
  border: 1px dashed var(--gold);
  color: var(--gold-hi);
}

/* Cover Screen */
.pass-cover {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: linear-gradient(180deg, var(--panel-2), var(--bg-0));
  padding: 30px;
}
.pass-lock { font-size: 46px; }
.pass-name { font-family: var(--font-display); font-size: 26px; font-weight: 900; color: #fff; }
.pass-tap { font-size: 12px; font-weight: 700; color: var(--gold); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Bidding Controls */
.bid-head { display: flex; align-items: center; justify-content: space-between; }
.bid-who { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.balance-pill {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  color: var(--green-hi);
  background: rgba(76,175,80,0.12);
  border: 1px solid rgba(76,175,80,0.3);
  padding: 5px 12px;
  border-radius: 999px;
}

.bid-amount-display {
  text-align: center;
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  color: var(--gold-hi);
  margin: 10px 0;
  text-shadow: 0 4px 20px rgba(212,175,55,0.3);
}

input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dim), var(--panel-3));
  margin: 16px 0 8px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold));
  border: 2px solid #100b03;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.5);
}

.quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.quick-chip {
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-hi);
  font-size: 13px;
  font-weight: 800;
}

/* Reveal Screen */
.reveal-list { display: flex; flex-direction: column; gap: 8px; }
.reveal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: rgba(0,0,0,0.22);
}
.reveal-row.winner {
  border-color: var(--gold);
  background: rgba(212,175,55,0.15);
  font-weight: 800;
}
.reveal-row.winner .amt { color: var(--gold-hi); font-size: 17px; }
.reveal-row.tied { border-color: var(--red); background: rgba(230,74,25,0.12); }
.reveal-row.tied .amt { color: var(--red-hi); }

.result-banner {
  text-align: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
}
.result-banner.win { background: rgba(212,175,55,0.14); border: 1px solid var(--gold); color: var(--gold-hi); }
.result-banner.void { background: rgba(230,74,25,0.14); border: 1px solid var(--red); color: var(--red-hi); }
.result-banner b { font-family: var(--font-display); font-size: 16px; display: block; margin-bottom: 2px; }

/* Scoreboard */
.board-list { display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--panel-2);
}
.board-row.rank1 { border-color: var(--gold); background: rgba(212,175,55,0.1); }
.board-row .rank { font-family: var(--font-display); font-weight: 800; width: 20px; color: var(--muted); }
.board-row .name { flex: 1; font-weight: 700; font-size: 14.5px; }
.board-row .bal { font-family: var(--font-display); font-weight: 800; font-size: 15px; }
/* Abilities Buttons (Fixes the black font issue) */
.ghost-btn {
  border: 1px solid var(--border-soft);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.danger-btn {
  border: 1px solid var(--red);
  color: var(--red-hi);
  background: rgba(230, 74, 25, 0.1);
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease;
}

.ghost-btn:active, .danger-btn:active {
  transform: scale(0.97);
}