/* GUESS THE BALANCE — sits on stakeleaderboard.css (background, header, badge, title, footer) */

.gb-wrap { position: relative; max-width: 1140px; margin: 0 auto; padding: 40px 22px 60px; }
.gb-wrap .sub-header { margin-bottom: 30px; }
.gb-wrap .main-title { margin-bottom: 12px; }
.gb-sub { color: var(--text-muted); font-size: .95rem; font-weight: 600; }

/* ── THE NUMBERS ────────────────────────────────── */
.gb-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.gb-stats div { min-width: 118px; padding: 10px 16px; background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 14px; }
.gb-stats dt { font-size: .6rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); }
.gb-stats dd { font: 800 1.4rem/1.2 'Rajdhani', sans-serif; color: #fff; }
.gb-stats div:last-child:nth-child(6) dd { color: var(--gold); }

/* ── LAYOUT ─────────────────────────────────────── */
.gb-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 20px; align-items: start; margin-bottom: 40px; }
.gb-side { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gb-grid > .sheet { grid-column: 1; grid-row: 1; }

.gb-box { padding: 18px 20px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--glass-border); }
.gb-box[hidden] { display: none; }
.gb-box h2 { font: 800 1.2rem/1.2 'Rajdhani', sans-serif; letter-spacing: .5px; color: #fff; margin-bottom: 10px; }
.gb-box h2 label { font: inherit; color: inherit; }
.gb-box h3 { font-size: .68rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); margin: 16px 0 8px; padding-top: 14px; border-top: 1px solid var(--glass-border); }
.gb-box p { color: var(--text-muted); font-size: .86rem; line-height: 1.55; }
.gb-box p b { color: #fff; }
.gb-box a { color: var(--green); font-weight: 700; }
.gb-big { font: 800 2.3rem/1.1 'Rajdhani', sans-serif; color: var(--green); margin-bottom: 6px; overflow-wrap: anywhere; }
.gb-fine { margin-top: 8px; font-size: .76rem !important; }
.gb-count { display: inline-block; margin-left: 4px; padding: 0 8px; border-radius: 10px; background: var(--purple-dim); border: 1px solid var(--glass-border); color: var(--purple-glow); font: 800 .85rem/1.5 'Rajdhani', sans-serif; vertical-align: middle; }

.gb-in, .gb-field input {
    width: 100%; border: 1px solid var(--glass-border); border-radius: 10px; background: #110c1f; color: #fff;
    padding: 11px 12px; font: 600 .95rem 'Inter', sans-serif; outline: none;
}
.gb-in { margin-bottom: 8px; }
.gb-in::placeholder, .gb-field input::placeholder { color: var(--text-muted); font-weight: 500; }
.gb-in:focus, .gb-field input:focus { border-color: var(--purple-glow); }
.gb-field { position: relative; display: block; margin-bottom: 8px; }
.gb-field > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--text-muted); pointer-events: none; }
.gb-field input { padding-left: 26px; }
#guessInput { font: 800 1.4rem 'Rajdhani', sans-serif; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; margin-bottom: 10px; border: 0; border-radius: 10px; cursor: pointer; font: 800 .8rem 'Inter', sans-serif; letter-spacing: 1px; text-transform: uppercase; transition: .2s; }
.btn-cream { background: var(--green); color: #04130a; }
.btn-cream:hover:not(:disabled) { box-shadow: 0 0 22px rgba(31,255,135,.3); }
.gb-danger { background: rgba(255,77,77,.14); border: 1px solid rgba(255,77,77,.45); color: #ff8a8a; }
.gb-danger:hover { background: rgba(255,77,77,.24); }
.gb-plain { background: var(--purple); color: #fff; }
.gb-plain:hover { background: var(--purple-glow); }

.gb-back { background: none; border: 0; color: var(--green); font: 700 .85rem 'Inter', sans-serif; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.gb-back[hidden] { display: none; }

/* ── THE GUESSES ────────────────────────────────── */
.gb-list { list-style: none; max-height: 540px; overflow-y: auto; margin: 2px -6px 0; padding: 0 6px; scrollbar-width: thin; scrollbar-color: #2a1d45 transparent; }
.gb-list li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 2px; border-bottom: 1px solid rgba(160,68,255,.1); }
.gb-list li:last-child { border-bottom: 0; }
.gb-list li.me { margin: 0 -6px; padding-left: 8px; padding-right: 8px; border-radius: 8px; background: var(--green-dim); }
.gb-list li.none { color: var(--text-muted); font-size: .86rem; }
.gb-rk { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 800 .9rem 'Rajdhani', sans-serif; background: var(--purple-dim); color: var(--purple-glow); }
.gb-list li:first-child .gb-rk { background: var(--gold); color: #0a0612; }
.gb-nm { flex: 1; min-width: 0; font-size: .9rem; font-weight: 700; color: #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-nm em { margin-left: 7px; font-size: .62rem; font-style: normal; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--gold); border: 1px solid rgba(255,202,40,.4); border-radius: 4px; padding: 1px 5px; }
.gb-val { flex-shrink: 0; text-align: right; font: 800 1.05rem 'Rajdhani', sans-serif; color: var(--green); }
.gb-val small { display: block; font: 600 .68rem 'Inter', sans-serif; color: var(--text-muted); }
.gb-tools { flex-shrink: 0; display: flex; gap: 4px; }
.gb-tools button { width: 28px; height: 28px; border: 1px solid var(--glass-border); border-radius: 7px; background: none; color: var(--text-muted); cursor: pointer; font-size: .8rem; }
.gb-tools button:hover { border-color: var(--purple-glow); color: #fff; }
.gb-tools button.del:hover { border-color: rgba(255,77,77,.6); color: #ff8a8a; }
.gb-list li.editing .gb-field { flex: 0 0 112px; margin: 0; }
.gb-list li.editing input { padding-top: 5px; padding-bottom: 5px; }

/* ── THE BONUSES ────────────────────────────────── */
.sheet { min-width: 0; padding: 20px 22px; background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 20px; }
.sheet h2 { font: 800 1.4rem/1.1 'Rajdhani', sans-serif; letter-spacing: 1px; color: #fff; text-transform: uppercase; }
.sheet-note { min-height: 1.3em; margin: 2px 0 8px; font-size: .8rem; color: var(--text-muted); }
.sheet-empty { text-align: center; color: var(--text-muted); padding: 34px 0; font-size: .9rem; }
.b-head, .b-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 76px 92px 62px; column-gap: 10px; align-items: center; }
.b-head.nores, .b-row.nores { grid-template-columns: 30px minmax(0, 1fr) 84px; }
.b-head { padding-bottom: 8px; border-bottom: 1px solid var(--glass-border); font-size: .62rem; font-weight: 900; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); }
.b-head span:nth-child(n+3) { text-align: right; }
.b-row { padding: 8px 0; border-bottom: 1px solid rgba(160,68,255,.08); }
.b-row:last-child { border-bottom: 0; }
.b-n { font: 800 1rem 'Rajdhani', sans-serif; color: var(--purple-glow); }
.b-slot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.b-thumb { flex-shrink: 0; width: 38px; height: 38px; border-radius: 9px; overflow: hidden; background: var(--purple-dim); }
.b-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.b-slot > div { min-width: 0; }
.b-name { font-size: .92rem; font-weight: 700; line-height: 1.2; color: #eee; overflow-wrap: anywhere; }
.b-name em { margin-left: 7px; padding: 1px 5px; border-radius: 4px; background: var(--gold); color: #1a1200; font-size: .58rem; font-style: normal; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; }
.b-sub { font-size: .74rem; line-height: 1.25; color: var(--text-muted); overflow-wrap: anywhere; }
.b-bet, .b-pay, .b-x { text-align: right; white-space: nowrap; font-family: 'Rajdhani', sans-serif; font-size: 1.05rem; font-weight: 700; }
.b-bet { color: #bdb3dd; }
.b-pay { color: #fff; font-weight: 800; }
.b-pay i { font: 500 .74rem 'Inter', sans-serif; color: var(--text-muted); }
.b-x { color: var(--green); font-weight: 800; }

/* ── PAST HUNTS (blank page by default, these sit at the bottom) ── */
.gb-past h2 { font: 800 1.3rem 'Rajdhani', sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.gb-past:empty { display: none; }
.gb-past-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gb-past-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 13px 15px; text-align: left; cursor: pointer; border-radius: 14px; border: 1px solid var(--glass-border); background: var(--card-bg); color: var(--text-muted); font: 500 .78rem 'Inter', sans-serif; transition: border-color .15s; }
.gb-past-item b { color: #fff; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gb-past-item .pv { color: var(--green); font-weight: 700; overflow-wrap: anywhere; }
.gb-past-item:hover, .gb-past-item.on { border-color: var(--purple-glow); }

.gb-toast { position: fixed; z-index: 99; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: 90vw; padding: 11px 18px; border-radius: 12px; background: #0f0a1d; border: 1px solid rgba(31,255,135,.35); color: var(--green); font: 700 .85rem 'Inter', sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s; }
.gb-toast.on { opacity: 1; }
.gb-toast.bad { border-color: rgba(255,77,77,.5); color: #ff9a9a; }

@media (max-width: 960px) {
    .gb-grid { grid-template-columns: minmax(0, 1fr); }
    .gb-side, .gb-grid > .sheet { grid-column: 1; grid-row: auto; }
    .gb-past-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .gb-wrap { padding: 26px 14px 50px; }
    .gb-stats div { min-width: 0; flex: 1 1 28%; padding: 8px 10px; }
    .gb-stats dd { font-size: 1.15rem; }
    .sheet { padding: 16px 14px; }
    .b-head, .b-row, .b-head.nores, .b-row.nores { grid-template-columns: 24px minmax(0, 1fr) 62px; column-gap: 8px; }
    .b-head:not(.nores) span:nth-child(4), .b-head:not(.nores) span:nth-child(5) { display: none; }
    .b-row:not(.nores) .b-pay { grid-column: 2; text-align: left; }
    .b-row:not(.nores) .b-x { grid-column: 3; }
    .b-thumb { width: 32px; height: 32px; }
    .gb-past-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .gb-toast, .gb-past-item, .btn { transition: none; }
}
