Files
shelem/public/style.css
T
goyban 8e8478e45b Initial commit: Shelem card game
Full-stack multiplayer Shelem (Iranian trick-taking card game) with
Socket.IO, JWT auth, bot players, joker mode, and mobile-friendly UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-08 16:17:37 +00:00

959 lines
27 KiB
CSS

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--felt: #1d6b3a;
--felt-dark: #133025;
--felt-light: #268847;
--card-w: 68px;
--card-h: 98px;
--radius: 8px;
--shadow: 0 2px 8px rgba(0,0,0,.4);
--gold: #f5c518;
--accent: #c8860a;
--red: #d32f2f;
--muted: rgba(255,255,255,.55);
--team-a: #4fc3f7; /* seats 0 & 2 */
--team-b: #ef9a9a; /* seats 1 & 3 */
}
html, body {
height: 100%;
overflow: hidden;
font-family: 'Segoe UI', system-ui, sans-serif;
background: var(--felt-dark);
color: #fff;
touch-action: manipulation;
}
/* ── Screens ──────────────────────────────────── */
.screen { display: none; }
.screen.active { display: flex; flex-direction: column; height: 100vh; }
/* ── Lobby ────────────────────────────────────── */
#screen-lobby {
justify-content: center;
align-items: center;
background: radial-gradient(ellipse at center, #1d5c3a 0%, var(--felt-dark) 100%);
}
.lobby-box {
background: rgba(0,0,0,.5);
border: 1px solid rgba(255,255,255,.12);
border-radius: 16px;
padding: 28px 34px;
width: min(430px, 94vw);
display: flex;
flex-direction: column;
gap: 14px;
max-height: 96vh;
overflow-y: auto;
}
.logo {
font-size: 2.4rem;
text-align: center;
color: var(--gold);
text-shadow: 0 2px 12px rgba(200,130,10,.6);
letter-spacing: 2px;
}
.tagline {
text-align: center;
color: rgba(255,255,255,.55);
font-size: .85rem;
margin-top: -8px;
}
/* ── Auth bar ─────────────────────────────────── */
.auth-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 6px 10px;
background: rgba(255,255,255,.06);
border: 1px solid rgba(255,255,255,.1);
border-radius: 10px;
font-size: .8rem;
}
.auth-status { color: var(--muted); }
.auth-bar-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.btn-text {
background: none; border: none; color: var(--gold);
cursor: pointer; font-size: .78rem; padding: 2px 5px;
text-decoration: underline;
}
.btn-text:hover { color: #fff; }
/* ── Tabs ─────────────────────────────────────── */
.lobby-tabs { display: flex; gap: 6px; }
.tab-btn {
flex: 1;
padding: 7px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.12);
border-radius: 8px;
color: var(--muted);
cursor: pointer;
font-size: .85rem;
transition: background .15s;
}
.tab-btn.active, .tab-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.tab-panel { display: none; flex-direction: column; gap: 10px; }
.tab-panel.active { display: flex; }
/* ── Fields & inputs ──────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: .8rem; color: var(--muted); }
.field small { color: rgba(255,255,255,.4); font-size: .72rem; }
input[type=text], input[type=password], input[type=email] {
width: 100%;
padding: 9px 12px;
background: rgba(255,255,255,.09);
border: 1px solid rgba(255,255,255,.18);
border-radius: 8px;
color: #fff;
font-size: .9rem;
outline: none;
}
input:focus { border-color: var(--gold); }
/* ── Mode / score buttons ─────────────────────── */
.mode-row, .score-row { display: flex; gap: 6px; }
.mode-btn, .score-btn {
flex: 1;
padding: 8px 6px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.14);
border-radius: 8px;
color: var(--muted);
cursor: pointer;
font-size: .82rem;
text-align: center;
transition: background .15s;
}
.mode-btn small { display: block; font-size: .72rem; color: rgba(255,255,255,.4); margin-top: 2px; }
.mode-btn.active, .mode-btn:hover,
.score-btn.active, .score-btn:hover {
background: rgba(245,197,24,.2);
border-color: var(--gold);
color: var(--gold);
}
/* ── Buttons ──────────────────────────────────── */
.btn-primary {
padding: 10px;
background: rgba(245,197,24,.25);
border: 1px solid rgba(245,197,24,.55);
border-radius: 10px;
color: var(--gold);
font-size: .95rem;
font-weight: 600;
cursor: pointer;
transition: background .15s;
}
.btn-primary:hover { background: rgba(245,197,24,.38); }
.btn-primary:disabled { opacity: .4; cursor: default; }
.btn-secondary {
padding: 9px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.16);
border-radius: 10px;
color: var(--muted);
font-size: .9rem;
cursor: pointer;
transition: background .15s;
}
.btn-secondary:hover { background: rgba(255,255,255,.15); }
.divider { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 2px 0; }
.error-msg { color: #ff6b6b; font-size: .82rem; min-height: 16px; }
.hint { color: var(--muted); font-size: .82rem; text-align: center; }
/* ── Waiting Room ─────────────────────────────── */
#screen-waiting {
justify-content: center;
align-items: center;
background: radial-gradient(ellipse at center, #1d5c3a 0%, var(--felt-dark) 100%);
}
.waiting-box {
background: rgba(0,0,0,.48);
border: 1px solid rgba(255,255,255,.12);
border-radius: 16px;
padding: 28px 34px;
width: min(380px, 94vw);
display: flex;
flex-direction: column;
gap: 14px;
align-items: center;
text-align: center;
}
.btn-leave-screen {
align-self: flex-start;
background: none; border: none; color: var(--muted);
cursor: pointer; font-size: .85rem;
padding: 0; text-decoration: underline;
}
.btn-leave-screen:hover { color: #fff; }
.room-code-box {
display: flex; align-items: center; gap: 8px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.14);
border-radius: 10px;
padding: 8px 14px;
}
.room-code-box .label { font-size: .75rem; color: var(--muted); }
.room-code { font-size: 1.5rem; font-weight: 700; letter-spacing: 3px; color: var(--gold); }
.btn-copy {
background: none; border: none; color: var(--muted);
cursor: pointer; font-size: 1rem; padding: 2px 4px;
}
.waiting-seats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
width: 100%;
}
.seat-slot {
display: flex; align-items: center; gap: 8px;
padding: 8px 12px;
background: rgba(255,255,255,.05);
border: 1px solid rgba(255,255,255,.12);
border-radius: 8px;
font-size: .85rem;
}
.seat-slot.partner-a { border-color: rgba(79,195,247,.3); }
.seat-slot.partner-b { border-color: rgba(239,154,154,.3); }
.seat-num { color: var(--muted); font-size: .75rem; min-width: 14px; }
.seat-name { font-weight: 600; color: #fff; }
.waiting-status { font-size: .88rem; color: var(--muted); }
.waiting-options { display: flex; gap: 10px; justify-content: center; }
.waiting-opt-label {
font-size: .78rem; color: var(--gold);
padding: 2px 8px;
background: rgba(245,197,24,.1);
border: 1px solid rgba(245,197,24,.25);
border-radius: 12px;
}
.btn-fill-bots {
padding: 8px 16px;
background: rgba(255,255,255,.08);
border: 1px solid rgba(255,255,255,.16);
border-radius: 10px;
color: var(--muted);
cursor: pointer;
font-size: .85rem;
width: 100%;
}
.btn-fill-bots:hover { background: rgba(255,255,255,.16); color: #fff; }
/* ── Game screen ──────────────────────────────── */
#screen-game { background: var(--felt); overflow: hidden; position: relative; }
/* Info bar */
#info-bar {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 10px;
background: rgba(0,0,0,.35);
border-bottom: 1px solid rgba(0,0,0,.3);
flex-shrink: 0;
z-index: 10;
}
#score-block {
display: flex;
gap: 8px;
flex: 1;
justify-content: center;
}
.team-score {
font-size: .78rem;
font-weight: 700;
padding: 2px 10px;
border-radius: 20px;
white-space: nowrap;
}
.team-score.team-a { background: rgba(79,195,247,.2); border: 1px solid rgba(79,195,247,.4); color: var(--team-a); }
.team-score.team-b { background: rgba(239,154,154,.2); border: 1px solid rgba(239,154,154,.4); color: var(--team-b); }
#game-meta { display: flex; gap: 8px; align-items: center; }
.trump-display {
font-size: .8rem; font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
background: rgba(245,197,24,.2);
border: 1px solid rgba(245,197,24,.4);
color: var(--gold);
}
.bid-display {
font-size: .75rem;
color: var(--muted);
padding: 2px 8px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.12);
border-radius: 12px;
}
.game-menu-wrap { position: relative; }
.game-menu-dropdown {
position: absolute;
top: calc(100% + 6px);
right: 0;
background: #1a2e1a;
border: 1px solid rgba(255,255,255,.15);
border-radius: 10px;
min-width: 140px;
z-index: 200;
overflow: hidden;
}
.game-menu-item {
display: block; width: 100%; text-align: left;
padding: 9px 14px;
background: none; border: none;
color: #eee; font-size: .85rem; cursor: pointer;
}
.game-menu-item:hover { background: rgba(255,255,255,.1); }
.game-menu-exit { color: #ff8080; }
.spectator-banner {
background: rgba(0,0,0,.5);
text-align: center;
padding: 5px;
font-size: .8rem;
color: var(--muted);
flex-shrink: 0;
}
/* ── Table grid ───────────────────────────────── */
#table-grid {
flex: 1;
display: grid;
grid-template-columns: 90px 1fr 90px;
grid-template-rows: auto 1fr;
gap: 4px;
padding: 6px;
overflow: hidden;
min-height: 0;
}
.player-area { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.area-top { grid-column: 2; grid-row: 1; }
.area-left { grid-column: 1; grid-row: 1 / 3; justify-content: center; }
.area-right { grid-column: 3; grid-row: 1 / 3; justify-content: center; }
#trick-area {
grid-column: 2;
grid-row: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
position: relative;
}
.player-label {
display: flex;
align-items: center;
gap: 4px;
font-size: .8rem;
font-weight: 600;
white-space: nowrap;
background: rgba(0,0,0,.3);
border-radius: 12px;
padding: 3px 8px;
}
.player-label.vertical { flex-direction: column; font-size: .72rem; }
.turn-dot { color: var(--gold); font-size: .6rem; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.partner-badge {
font-size: .6rem;
padding: 1px 5px;
border-radius: 8px;
background: rgba(79,195,247,.2);
color: var(--team-a);
border: 1px solid rgba(79,195,247,.3);
}
#my-partner-label { background: rgba(79,195,247,.15); }
.player-score-badge {
font-size: .7rem; color: var(--gold);
padding: 1px 5px;
background: rgba(245,197,24,.12);
border-radius: 8px;
}
.tricks-badge {
font-size: .7rem; color: var(--muted);
padding: 1px 5px;
background: rgba(255,255,255,.08);
border-radius: 8px;
}
/* ── Card back / face-down ────────────────────── */
.opp-cards {
display: flex;
flex-wrap: wrap;
gap: 3px;
justify-content: center;
max-width: 140px;
}
.opp-cards.vertical {
flex-direction: column;
max-width: 36px;
max-height: 200px;
overflow: hidden;
}
.card-back {
width: 36px;
height: 52px;
background: linear-gradient(135deg, #1565c0 0%, #0d47a1 50%, #1565c0 100%);
border-radius: 4px;
border: 1px solid rgba(255,255,255,.25);
box-shadow: 0 1px 3px rgba(0,0,0,.4);
flex-shrink: 0;
}
.opp-cards.vertical .card-back { width: 30px; height: 42px; }
/* ── Playing cards ────────────────────────────── */
.card {
width: var(--card-w);
height: var(--card-h);
border-radius: var(--radius);
box-shadow: var(--shadow);
cursor: pointer;
flex-shrink: 0;
transition: transform .12s, box-shadow .12s;
position: relative;
overflow: hidden;
border: 2px solid transparent;
background: #fff;
}
.card img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; }
.card:hover { transform: translateY(-8px); box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.card.selected {
transform: translateY(-12px);
border-color: var(--gold);
box-shadow: 0 0 12px rgba(245,197,24,.6);
}
.card.illegal { cursor: default; }
.card.illegal::after {
content: '';
position: absolute;
inset: 0;
background: rgba(0,0,0,.55);
border-radius: 6px;
pointer-events: none;
}
/* Magnifier (drag mode, dense fan) */
.card.magnified {
transform: translateY(-34px) scale(1.5) !important;
z-index: 50 !important;
box-shadow: 0 14px 36px rgba(0,0,0,.75) !important;
border: 2px solid #fff !important;
transition: transform .1s, box-shadow .1s !important;
}
/* Joker identification badges */
.joker-badge {
position: absolute;
bottom: 3px;
left: 50%;
transform: translateX(-50%);
font-size: .58rem;
font-weight: 800;
padding: 2px 6px;
border-radius: 4px;
white-space: nowrap;
pointer-events: none;
line-height: 1.3;
text-shadow: 0 1px 2px rgba(0,0,0,.6);
box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.joker-color-badge {
background: linear-gradient(90deg, #e040fb, #ff6d00, #ffea00, #00e676, #2979ff);
color: #fff;
border: none;
}
.joker-black-badge {
background: linear-gradient(135deg, #263238 0%, #455a64 100%);
color: #eceff1;
border: 1px solid rgba(255,255,255,.35);
}
/* ── Trick area ───────────────────────────────── */
.trick-slot {
width: var(--card-w);
height: var(--card-h);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.trick-slot img {
width: var(--card-w);
height: var(--card-h);
border-radius: 6px;
box-shadow: var(--shadow);
display: block;
}
.trick-card-wrap {
position: relative;
width: var(--card-w);
height: var(--card-h);
flex-shrink: 0;
}
.trick-card-wrap img {
width: 100%;
height: 100%;
border-radius: 6px;
box-shadow: var(--shadow);
display: block;
}
.trick-middle-row {
display: flex; align-items: center; justify-content: center; gap: 4px;
}
.trick-center-info {
width: 60px; text-align: center; flex-shrink: 0;
}
.phase-msg {
font-size: .72rem; color: rgba(255,255,255,.6);
line-height: 1.4;
}
/* Drop-zone pulse when dragging */
#trick-area { position: relative; }
#trick-area.drag-active::before {
content: '';
position: absolute;
inset: -10px;
border: 2px dashed rgba(255,255,255,.4);
border-radius: 18px;
pointer-events: none;
animation: pulse-border .8s ease-in-out infinite alternate;
}
@keyframes pulse-border { from { opacity: .35; } to { opacity: 1; } }
/* Drag ghost */
.drag-ghost {
position: fixed;
pointer-events: none;
opacity: .92;
z-index: 9999;
transform: scale(1.15) rotate(-4deg);
box-shadow: 0 12px 32px rgba(0,0,0,.7);
border-radius: 6px;
width: var(--card-w);
height: var(--card-h);
overflow: hidden;
transition: none !important;
}
.drag-ghost img { width: 100%; height: 100%; display: block; }
/* ── My hand ──────────────────────────────────── */
#my-area {
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px 8px calc(8px + env(safe-area-inset-bottom));
background: rgba(0,0,0,.2);
border-top: 1px solid rgba(0,0,0,.3);
}
#my-area.fan-active { overflow: visible; }
#my-label {
display: flex;
align-items: center;
gap: 6px;
font-size: .8rem;
font-weight: 600;
}
/* Scroll mode (default) */
#my-hand {
display: flex;
align-items: flex-end;
gap: 4px;
overflow-x: auto;
overflow-y: visible;
padding: 2px 0 4px;
scrollbar-width: none;
justify-content: safe center;
}
#my-hand::-webkit-scrollbar { display: none; }
/* Fan / overlap mode */
#my-hand.fan-mode {
gap: 0;
overflow: visible;
padding: 14px 4px 4px;
justify-content: flex-start;
}
/* Play / hand mode toggle buttons */
.btn-play-mode,
.btn-hand-mode {
margin-left: auto;
padding: 2px 8px;
background: rgba(255,255,255,.12);
border: 1px solid rgba(255,255,255,.25);
border-radius: 6px;
color: rgba(255,255,255,.8);
font-size: .72rem;
cursor: pointer;
white-space: nowrap;
}
.btn-play-mode:hover, .btn-hand-mode:hover { background: rgba(255,255,255,.22); }
.btn-play-mode.drag-mode {
background: rgba(100,200,100,.18);
border-color: #66bb6a;
color: #a5d6a7;
}
.btn-hand-mode.fan-mode {
background: rgba(100,180,255,.18);
border-color: rgba(100,180,255,.5);
color: rgba(180,220,255,.9);
}
/* ── Overlays ─────────────────────────────────── */
.overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,.72);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
padding: 12px;
}
.overlay.hidden { display: none; }
.overlay-box {
background: #1a2e1a;
border: 1px solid rgba(255,255,255,.15);
border-radius: 16px;
padding: 26px 28px;
width: min(440px, 96vw);
display: flex;
flex-direction: column;
gap: 14px;
max-height: 92vh;
overflow-y: auto;
}
.overlay-box.small { max-width: 320px; }
.overlay-box h3 { font-size: 1.1rem; color: var(--gold); text-align: center; }
/* ── Bidding overlay ──────────────────────────── */
.bid-box {}
.bid-history {
display: flex;
flex-direction: column;
gap: 6px;
max-height: 180px;
overflow-y: auto;
}
.bid-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 10px;
background: rgba(255,255,255,.05);
border: 1px solid rgba(255,255,255,.1);
border-radius: 8px;
font-size: .85rem;
}
.bid-row.active-bidder { border-color: var(--gold); background: rgba(245,197,24,.08); }
.bid-row .bid-name { font-weight: 600; }
.bid-row .bid-val { color: var(--gold); font-weight: 700; }
.bid-row .bid-val.passed { color: var(--muted); font-weight: 400; font-style: italic; }
.bid-row .bid-val.waiting { color: var(--muted); }
.bid-hint { font-size: .82rem; color: var(--muted); text-align: center; }
.bid-input-row {
display: flex;
align-items: center;
justify-content: center;
gap: 14px;
}
.bid-adj {
width: 40px; height: 40px;
background: rgba(255,255,255,.1);
border: 1px solid rgba(255,255,255,.2);
border-radius: 8px;
color: #fff; font-size: 1rem; cursor: pointer;
}
.bid-adj:hover { background: rgba(255,255,255,.2); }
.bid-amount-display {
font-size: 1.8rem;
font-weight: 700;
color: var(--gold);
min-width: 60px;
text-align: center;
}
.bid-action-row { display: flex; gap: 10px; }
.bid-action-row .btn-primary, .bid-action-row .btn-secondary { flex: 1; }
/* ── Widow overlay ────────────────────────────── */
.widow-box {}
.pass-hint { font-size: .82rem; color: var(--muted); text-align: center; }
/* One row per suit — matches Hearts pass overlay */
.pass-hand {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 4px;
width: 100%;
max-height: 55vh;
overflow-y: auto;
}
.pass-suit-row {
display: flex;
align-items: center;
gap: 6px;
}
.pass-suit-label {
font-size: 1.3rem;
width: 28px;
text-align: center;
flex-shrink: 0;
line-height: 1;
}
.pass-suit-label.suit-h,
.pass-suit-label.suit-d { color: #ff8080; }
.pass-suit-label.suit-c,
.pass-suit-label.suit-s { color: #ddd; }
.pass-suit-cards {
display: flex;
gap: 4px;
flex-wrap: wrap;
}
.pass-hand .card { width: 58px; height: 82px; }
.pass-hand .card img { width: 58px; height: 82px; }
.pass-selected-row {
display: flex; align-items: center; gap: 8px;
min-height: 36px;
}
.pass-selected-label { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.pass-selected-preview { display: flex; gap: 4px; flex-wrap: wrap; }
.pass-selected-preview .card { width: 48px; height: 68px; }
.pass-selected-preview .card img { width: 48px; height: 68px; }
.pass-placeholder {
width: 48px; height: 68px;
border: 2px dashed rgba(255,255,255,.2);
border-radius: 6px;
}
/* ── Trump overlay ────────────────────────────── */
.trump-box { align-items: center; }
.trump-suit-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
width: 100%;
}
.trump-suit-btn {
padding: 14px 10px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.14);
border-radius: 10px;
color: #fff;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: background .15s, border-color .15s;
}
.trump-suit-btn:hover { background: rgba(245,197,24,.2); border-color: var(--gold); color: var(--gold); }
.trump-suit-btn[data-suit="H"], .trump-suit-btn[data-suit="D"] { color: #ff8080; }
.trump-suit-btn[data-suit="H"]:hover, .trump-suit-btn[data-suit="D"]:hover { color: var(--gold); }
/* ── Hand / game over overlays ────────────────── */
.result-icon { font-size: 2.5rem; text-align: center; }
.result-icon.big { font-size: 3rem; }
.result-scores {
display: flex;
flex-direction: column;
gap: 6px;
}
.result-score-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 12px;
background: rgba(255,255,255,.06);
border-radius: 8px;
font-size: .88rem;
}
.result-score-row.winner { background: rgba(245,197,24,.12); border: 1px solid rgba(245,197,24,.3); }
.result-score-row .team-label { font-weight: 600; }
.result-score-row .delta { font-weight: 700; }
.delta.pos { color: #69f0ae; }
.delta.neg { color: #ff6b6b; }
.gameover-scores {
display: flex;
flex-direction: column;
gap: 8px;
margin: 4px 0;
}
.gameover-row {
display: flex;
justify-content: space-between;
padding: 8px 14px;
border-radius: 10px;
background: rgba(255,255,255,.06);
font-size: .9rem;
}
.gameover-row.winner { background: rgba(245,197,24,.15); border: 1px solid rgba(245,197,24,.4); }
/* ── Auth overlay ─────────────────────────────── */
.auth-box { max-width: 360px; }
.btn-close {
align-self: flex-end;
background: none; border: none;
color: var(--muted); font-size: 1rem; cursor: pointer;
line-height: 1;
}
.auth-tabs { display: flex; gap: 6px; }
.auth-tab {
flex: 1; padding: 7px;
background: rgba(255,255,255,.07);
border: 1px solid rgba(255,255,255,.12);
border-radius: 8px;
color: var(--muted);
cursor: pointer; font-size: .85rem;
}
.auth-tab.active { background: rgba(245,197,24,.15); border-color: rgba(245,197,24,.35); color: var(--gold); }
.auth-panel { display: none; flex-direction: column; gap: 10px; }
.auth-panel.active { display: flex; }
/* ── Profile & leaderboard ────────────────────── */
#screen-profile, #screen-leaderboard {
background: radial-gradient(ellipse at center, #1d5c3a 0%, var(--felt-dark) 100%);
justify-content: flex-start;
align-items: center;
overflow-y: auto;
padding: 16px;
}
.profile-wrap { width: 100%; display: flex; justify-content: center; }
.profile-box {
background: rgba(0,0,0,.48);
border: 1px solid rgba(255,255,255,.12);
border-radius: 16px;
padding: 24px 28px;
width: min(400px, 96vw);
display: flex;
flex-direction: column;
gap: 14px;
}
.btn-back {
background: none; border: none; color: var(--muted);
cursor: pointer; font-size: .85rem; align-self: flex-start;
text-decoration: underline;
}
.btn-back:hover { color: #fff; }
.profile-avatar { font-size: 2.5rem; text-align: center; }
.profile-name { font-size: 1.3rem; text-align: center; color: var(--gold); }
.stat-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.stat-card {
display: flex; flex-direction: column;
align-items: center; gap: 2px;
padding: 10px;
background: rgba(255,255,255,.05);
border: 1px solid rgba(255,255,255,.1);
border-radius: 10px;
}
.stat-num { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.stat-label { font-size: .72rem; color: var(--muted); text-align: center; }
.points-legend {
background: rgba(255,255,255,.04);
border: 1px solid rgba(255,255,255,.1);
border-radius: 10px;
padding: 12px 14px;
}
.points-legend h4 { font-size: .85rem; color: var(--gold); margin-bottom: 8px; }
.points-legend ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.points-legend li { font-size: .8rem; color: var(--muted); }
.points-legend strong { color: #fff; }
.profile-section { display: flex; flex-direction: column; gap: 8px; }
.admin-section {
background: rgba(255,100,0,.06);
border: 1px solid rgba(255,100,0,.2);
border-radius: 10px;
padding: 10px 14px;
}
.admin-title { font-size: .85rem; color: #ffaa55; margin-bottom: 6px; }
.admin-row { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; }
.btn-admin-toggle { min-width: 80px; }
.btn-admin-toggle.signup-open { border-color: rgba(100,220,100,.6); color: #69f0ae; }
/* ── Leaderboard ──────────────────────────────── */
.lb-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.lb-table th, .lb-table td { padding: 7px 8px; text-align: left; }
.lb-table th { color: var(--muted); font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); }
.lb-table td { border-bottom: 1px solid rgba(255,255,255,.05); }
.lb-table tr:hover td { background: rgba(255,255,255,.04); }
/* ── Util ─────────────────────────────────────── */
.hidden { display: none !important; }
/* ── Bar-at-bottom layout ─────────────────────── */
#screen-game.bar-bottom #info-bar {
order: 10;
border-bottom: none;
border-top: 1px solid rgba(0,0,0,.3);
}
#screen-game.bar-bottom .game-menu-dropdown {
top: auto;
bottom: calc(100% + 6px);
}
/* ── Mobile bidding: transparent panel at top so hand stays visible ── */
@media (pointer: coarse) {
#overlay-bid {
align-items: flex-start;
background: transparent;
pointer-events: none;
padding: 0;
}
#overlay-bid .overlay-box {
pointer-events: all;
width: 100%;
max-width: 100%;
border-radius: 0 0 20px 20px;
border-top: none;
background: rgba(8, 22, 8, 0.97);
box-shadow: 0 6px 28px rgba(0,0,0,.75);
max-height: 62vh;
}
}
/* ── Mobile tweaks ────────────────────────────── */
@media (max-width: 480px) {
:root { --card-w: 54px; --card-h: 78px; }
#table-grid { grid-template-columns: 70px 1fr 70px; }
.overlay-box { padding: 18px 16px; }
.bid-amount-display { font-size: 1.4rem; }
.trump-suit-btn { font-size: .88rem; padding: 11px 6px; }
}