/* ===== Area logada (inspirada no painel original) ===== */
body.logged { background: linear-gradient(180deg, #0d081ecc, #0d081ef2), var(--img-home, url(/img/bg-home.png)) center top / cover fixed no-repeat, var(--bg); }
body.logged main.wrap { padding-bottom: 96px; max-width: 520px; }
body.logged.admin-wide main.wrap { max-width: 1100px; }
.bal-pill { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; text-decoration: none; padding: 6px 12px; border-radius: 12px; background: #00000055; border: 1px solid #ffffff1a; }
.bal-pill small { color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .08em; }
.bal-pill b { color: var(--green); font-size: 1rem; }
.panel { background: #171c36cc; border: 1px solid #ffffff14; border-radius: 18px; padding: 18px; margin: 14px 0; backdrop-filter: blur(6px); }
.panel-title { font-size: 1.15rem; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 14px; }
.label-up { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 0 10px; }
.entry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.entry-chip { font: inherit; font-weight: 800; color: var(--text); background: #ffffff0d; border: 1.5px solid #ffffff1f; border-radius: 12px; padding: 13px 6px; cursor: pointer; transition: .15s; }
.entry-chip:hover { border-color: var(--purple); }
.entry-chip.on { background: linear-gradient(135deg, #c4b5ff, #7c5cff); color: #160b33; border-color: transparent; box-shadow: 0 6px 20px #7c5cff66; }
.money-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; background: #0b0718; border: 1px solid #ffffff1a; border-radius: 12px; padding: 0 14px; }
.money-row span { color: var(--muted); font-weight: 700; }
.money-row input, .money-input { border: 0 !important; background: transparent !important; outline: none !important; font-size: 1.1rem; font-weight: 800; padding: 13px 0; }
.reward-card { text-align: center; border: 1px solid #7c5cff55; background: linear-gradient(180deg, #7c5cff22, #7c5cff08); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.reward-value { font-size: 1.6rem; font-weight: 900; color: var(--gold); text-shadow: 0 0 18px #ffd16666; }
.lobby-banner { width: 100%; border-radius: 18px; display: block; margin-top: 14px; border: 1px solid #ffffff1a; box-shadow: 0 10px 40px #0007; }
.deposit-head { margin-top: 14px; border-radius: 18px; padding: 20px 18px; border: 1px solid #ffffff1a; background: radial-gradient(400px 160px at 85% 20%, #c46bff55, transparent 70%), linear-gradient(135deg, #2a1458, #160b33); display: flex; align-items: center; gap: 14px; }
.deposit-head img { height: 54px; }
.deposit-head b { display: block; font-size: 1.15rem; font-weight: 900; text-transform: uppercase; }
.deposit-head span { color: var(--muted); font-size: .85rem; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.link-btn { background: none; border: 0; color: var(--green2); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; padding: 4px 0; }
.list { display: flex; flex-direction: column; }
.list-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #ffffff10; }
.list-row:last-child { border: 0; }
.bal-big { text-align: center; margin-bottom: 14px; }
.bal-big small { display: block; color: var(--muted); }
.bal-big b { font-size: 2rem; color: var(--green); }
.notice { border: 1px dashed var(--yellow); border-radius: 12px; padding: 12px; }
.pix-box { margin-top: 14px; padding: 14px; border-radius: 14px; background: #00e5a812; border: 1px solid #00e5a855; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 900; background: linear-gradient(135deg, #7c5cff, #00c2ff); }
.field { margin-bottom: 4px; }

/* barra inferior */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: space-around; align-items: flex-end; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #1a1035f2, #0d081e); border-top: 1px solid #ffffff14; }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 700; }
.bottom-nav a i { font-style: normal; font-size: 1.05rem; line-height: 1; }
.bottom-nav a.on { color: #fff; }
.bottom-nav .nav-play { margin-top: -26px; color: var(--gold); }
.nav-orb { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff9 0, transparent 30%), radial-gradient(circle, #c46bff, #5a3df5); box-shadow: 0 0 0 4px #0d081e, 0 0 24px #a855f7aa; animation: orb 2.4s ease-in-out infinite; }
@keyframes orb { 50% { box-shadow: 0 0 0 4px #0d081e, 0 0 36px #a855f7; transform: translateY(-2px); } }

/* login */
body.auth-page { background: linear-gradient(180deg, #0d081e66, #0d081ecc), var(--img-home, url(/img/bg-home.png)) center / cover fixed no-repeat, var(--bg); }
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 20px 0; }
.auth-card { width: min(100%, 400px); background: #1a1233e6; border: 1px solid #ffffff1a; border-radius: 20px; padding: 24px; box-shadow: 0 20px 60px #000a; backdrop-filter: blur(8px); }
.auth-logo { height: 64px; display: block; margin: -60px auto 10px; filter: drop-shadow(0 6px 18px #000a); }

/* switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #ffffff22; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(20px); }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.stat { background: #171c36cc; border: 1px solid #ffffff14; border-radius: 14px; padding: 12px; }
.stat small { display: block; color: var(--muted); font-size: .75rem; }
.stat b { font-size: 1.25rem; }
.cfg-list { display: flex; flex-direction: column; }
.cfg-row { display: grid; grid-template-columns: 1fr minmax(140px, 260px); gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid #ffffff10; }
@media (max-width: 560px) { .cfg-row { grid-template-columns: 1fr; gap: 6px; } }
.cfg-save { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; }

/* ===== Jogo ===== */
body.game-page { background: linear-gradient(180deg, #1c0c3033, #1c0c3080), var(--img-game-m, url(/img/bg-game-mobile.png)) center / cover fixed no-repeat, var(--bg); }
@media (min-width: 768px) { body.game-page { background: linear-gradient(180deg, #1c0c3033, #1c0c3080), var(--img-game-d, url(/img/bg-game-desktop.png)) center / cover fixed no-repeat, var(--bg); } }
body.game-page main.wrap { max-width: 480px; padding-bottom: 90px; }
.game-screen { padding-top: 10px; }
.game-top { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.round-btn { width: 44px; border-radius: 14px; border: 1px solid #ffffff2a; background: #ffffffd9; color: #2a1458; font-size: 1.5rem; font-weight: 900; cursor: pointer; }
.chip-stat { background: #ffffffd9; color: #2a1458; border-radius: 14px; padding: 6px 10px; text-align: center; box-shadow: 0 6px 18px #0003; }
.chip-stat small { display: block; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.chip-stat b { font-size: 1.1rem; font-weight: 900; }
.chip-stat.mult b { color: #6d28d9; display: inline-block; }
.mult-val.bump { animation: bump .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); color: #00b36b; } 100% { transform: scale(1); } }
.board { position: relative; border-radius: 22px; padding: 16px 14px 10px; background: linear-gradient(180deg, #ffffff40, #ffffff1a); border: 1.5px solid #ffffff66; box-shadow: 0 20px 50px #2a0f5555, inset 0 0 30px #ffffff22; backdrop-filter: blur(3px); display: flex; justify-content: center; }
.game-cvs { display: block; touch-action: none; cursor: crosshair; border-radius: 16px; }
.pips { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px auto; padding: 7px 12px; border-radius: 99px; background: #ffffffc9; color: #2a1458; font-weight: 800; font-size: .8rem; width: max-content; box-shadow: 0 6px 18px #0003; }
.pips-label { margin-right: 6px; }
.pip { width: 11px; height: 11px; border-radius: 50%; background: #2a145822; border: 2px solid #6d28d9; }
.pip.used { background: #6d28d9; }
.pip.hot { border-color: #ff3b5c; }
.pip.hot.used { background: #ff3b5c; }
.pips.warn { background: #ffe0e6; color: #b3002d; animation: warn .6s ease-in-out infinite alternate; }
@keyframes warn { to { transform: scale(1.06); box-shadow: 0 0 22px #ff3b5c88; } }
.game-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.exit-btn { background: #ffffffd9 !important; color: #2a1458 !important; border: 0 !important; }
.cash-btn { position: relative; overflow: hidden; color: #3d2a00; background: #ffffff8c; box-shadow: none; text-transform: none; letter-spacing: 0; font-weight: 800; }
.cash-btn span { position: relative; z-index: 1; }
.cash-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ffe08288, #ffb30088); transition: width .5s; }
.cash-btn:disabled { opacity: 1; color: #6b5a2a; cursor: not-allowed; }
.cash-btn.ready { background: linear-gradient(135deg, #ffe082, #ffb300); box-shadow: 0 8px 28px #ffb30088; animation: cashpulse 1.4s ease-in-out infinite; }
.cash-btn.ready .cash-fill { display: none; }
@keyframes cashpulse { 50% { transform: scale(1.03); box-shadow: 0 10px 40px #ffb300cc; } }
.overlay { position: fixed; inset: 0; background: rgba(8, 3, 20, .78); display: grid; place-items: center; z-index: 60; padding: 16px; animation: fadein .25s; backdrop-filter: blur(4px); }
@keyframes fadein { from { opacity: 0; } }
.end-card { width: min(100%, 360px); text-align: center; border-radius: 22px; padding: 24px; background: linear-gradient(180deg, #24164a, #150e2e); border: 1px solid #ffffff22; animation: popin .45s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes popin { from { transform: scale(.6); opacity: 0; } }
.overlay.win .end-card { border-color: #ffd16688; box-shadow: 0 0 60px #ffd16644; }
.overlay.lose .end-card { border-color: #ff547066; box-shadow: 0 0 60px #ff547033; }
.end-emoji { font-size: 3.2rem; }
.end-mult { font-size: 2.6rem; font-weight: 900; color: var(--gold); text-shadow: 0 0 22px #ffd16688; }
.end-pay { font-size: 1.4rem; font-weight: 900; margin: 6px 0 18px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.sandbox { position: relative; z-index: 50; }

body.game-page .bottom-nav { display: none; }
body.game-page main.wrap { padding-bottom: 24px; }

/* botao X do card de fim de jogo */
.end-card { position: relative; }
.end-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid #ffffff26; background: #ffffff10; color: #fff; font-size: 1rem; cursor: pointer; display: grid; place-items: center; }
.end-close:hover { background: #ff5470; border-color: transparent; }
