/* =============================================
   WOLFCHAT — DRAW & GUESS styles
   Reuses the root tokens from style.css (--red/--blue/--gold/--green/--mono…)
   ============================================= */

/* ----- mode-selection card ----- */
.mode-draw { background: rgba(255,183,0,0.06); border: 2px solid rgba(255,183,0,0.3); }
.mode-draw:hover { border-color: #FFB800; background: rgba(255,183,0,0.12); transform: translateY(-2px); }

/* =====================================================
   LOBBY
   ===================================================== */
#draw-lobby-screen { flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.dl-wrap { position: relative; z-index: 2; width: 100%; max-width: 440px; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.dl-top { display: flex; align-items: center; gap: 10px; }
.dl-top .logo-mark.sm { width: 26px; height: 26px; font-size: 16px; box-shadow: none; }
.dl-toplabel { font-size: 16px; font-weight: 800; letter-spacing: 4px; color: var(--gold); }

.dl-card { width: 100%; background: var(--panel); border: 1px solid var(--border); padding: 22px; display: flex; flex-direction: column; gap: 14px; backdrop-filter: blur(4px); }
.dl-title { font-size: 18px; font-weight: 800; letter-spacing: 3px; text-align: center; }
.dl-sub { font-size: 12px; color: rgba(255,255,255,0.55); text-align: center; letter-spacing: 1px; margin-top: -6px; }

.dl-players { display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.dg-av { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.3); }
.dl-prow { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); }
.dl-prow .pdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dl-pname { flex: 1; font-size: 13px; color: rgba(255,255,255,0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-badge { font-size: 9px; letter-spacing: 1px; font-weight: 800; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
.dl-badge.ready { background: rgba(0,200,83,0.18); color: var(--green); }

.dl-rounds { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dl-rounds-label { font-size: 11px; letter-spacing: 3px; color: rgba(255,255,255,0.5); }
.dl-round-btns { display: flex; gap: 8px; }
.dl-round { width: 44px; height: 44px; background: rgba(255,255,255,0.05); border: 2px solid var(--border); color: #fff; font-family: var(--mono); font-size: 16px; font-weight: 800; cursor: pointer; transition: border-color .12s, background .12s; }
.dl-round.sel { border-color: var(--gold); background: rgba(255,183,0,0.12); color: var(--gold); }

.dl-start { width: 100%; background: var(--gold); color: #1a1300; border: none; font-family: var(--mono); font-weight: 800; font-size: 16px; letter-spacing: 4px; padding: 15px; cursor: pointer; transition: transform .08s, box-shadow .12s, opacity .12s; }
.dl-start:hover { box-shadow: 0 0 24px rgba(255,183,0,0.45); }
.dl-start:active { transform: translateY(2px); }
.dl-start:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.dl-hint { font-size: 11px; color: rgba(255,255,255,0.4); text-align: center; letter-spacing: 1px; }

.dl-voice { width: 100%; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: 2px; font-weight: 700; }

/* =====================================================
   GAME SCREEN
   ===================================================== */
/* dvh so the drawing UI fills the screen whether or not the Chrome UI shows. */
#draw-screen { flex-direction: column; background: #0D0D0D; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

#dg-top { flex: 0 0 52px; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: rgba(10,10,10,0.92); border-bottom: 1px solid var(--border); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.dg-round { font-size: 12px; letter-spacing: 2px; color: rgba(255,255,255,0.8); font-weight: 700; min-width: 72px; }
.dg-drawer { font-size: 12px; letter-spacing: 1px; color: var(--gold); min-width: 72px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dg-timer { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.dg-timer-svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.dg-timer-track { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 4; }
.dg-timer-prog { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 1s linear; }
.dg-timer-num { position: absolute; font-size: 16px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }

/* ===== PORTRAIT-FIRST DRAW LAYOUT (the draw game plays vertically) ===== */
#draw-screen { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

.dg-word { flex: 0 0 auto; min-height: 38px; display: flex; align-items: center; justify-content: center; padding: 0 8px; font-size: 15px; letter-spacing: 3px; font-weight: 800; color: var(--gold); background: rgba(255,183,0,0.05); text-transform: uppercase; white-space: nowrap; overflow: hidden; }
.dg-word-thinking { color: rgba(255,255,255,0.4); font-size: 12px; letter-spacing: 2px; animation: dgPulse 1.2s ease-in-out infinite; }
.dg-reveal-miss { color: var(--red); }
@keyframes dgPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
/* letter-count hint shown to guessers under the blanks */
.dg-letters { flex: 0 0 auto; text-align: center; font-size: 10px; letter-spacing: 2px; color: rgba(255,255,255,0.45); background: rgba(255,183,0,0.05); border-bottom: 1px solid var(--border); min-height: 0; line-height: 1.6; }
.dg-letters:empty { display: none; }

.dg-banner { position: absolute; top: 96px; left: 50%; transform: translate(-50%, -16px); z-index: 40; background: rgba(0,0,0,0.85); border: 1px solid var(--gold); color: var(--gold); font-size: 13px; letter-spacing: 2px; padding: 8px 18px; border-radius: 8px; opacity: 0; pointer-events: none; transition: transform .25s, opacity .25s; }
.dg-banner.show { opacity: 1; transform: translate(-50%, 0); }

/* vertical stack: players strip · canvas (fills, square) · toolbar · feed+input.
   The canvas FLEXES to fill leftover space so the toolbar/input are always
   visible without scrolling; JS sizes the canvas itself to the largest square. */
#dg-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* horizontal player strip — chips wrap to a 2nd row if there are many players;
   names are shown in full, never truncated. */
.dg-players { flex: 0 0 auto; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; background: #0f0f0f; border-bottom: 1px solid var(--border); }
.dg-prow { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 14px; font-size: 13px; background: rgba(255,255,255,0.04); border: 1px solid transparent; white-space: nowrap; }
.dg-prow .pdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dg-spk { width: 6px; height: 6px; border-radius: 50%; background: transparent; flex-shrink: 0; transition: background .1s; }
.dg-prow.speaking .dg-spk { background: var(--green); box-shadow: 0 0 6px var(--green); animation: dgPulse 0.7s infinite; }
.dg-pname { color: rgba(255,255,255,0.9); }
.dg-prow.drawing { background: rgba(255,183,0,0.12); border-color: var(--gold); }
.dg-prow.guessed { opacity: 0.65; }
.dg-pencil { font-size: 12px; }
.dg-check { color: var(--green); font-weight: 800; }
.dg-score { font-size: 12px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }

/* canvas area fills the leftover vertical space; the canvas inside is sized by
   JS to the largest square that fits (centered, white letterbox if needed) so
   the drawing aspect ratio is identical on every device (stroke sync stays true). */
#dg-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 160px; display: flex; align-items: center; justify-content: center; background: #0d0d0d; overflow: hidden; }
#dg-canvas { display: block; background: #fff; touch-action: none; cursor: crosshair; }

.dg-overlay { position: absolute; inset: 0; z-index: 30; background: rgba(8,8,8,0.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; }
.dg-ov-title { font-size: 24px; font-weight: 900; letter-spacing: 4px; color: #fff; }
.dg-ov-sub { font-size: 14px; letter-spacing: 1px; color: var(--gold); }
.dg-ov-foot { font-size: 12px; letter-spacing: 2px; color: rgba(255,255,255,0.6); margin-top: 6px; }

.dg-float { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 35; font-size: 28px; font-weight: 900; color: var(--green); text-shadow: 0 2px 12px rgba(0,0,0,0.6); pointer-events: none; animation: dgFloat 1.1s ease-out forwards; }
@keyframes dgFloat { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%) scale(1.1); } }

/* toolbar — single horizontal row below the canvas, scrolls sideways if needed */
.dg-toolbar { flex: 0 0 auto; z-index: 20; display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 7px 8px; background: rgba(0,0,0,0.92); border-top: 1px solid var(--border); overflow-x: auto; }
.dg-toolbar.hidden { display: none; }
.dg-tb-group { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; flex-shrink: 0; }
.dg-tb-group + .dg-tb-group { padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.12); }
.dg-color { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); cursor: pointer; padding: 0; }
.dg-color.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.dg-size { width: 40px; height: 40px; min-width: 40px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.dg-size span { display: block; background: #fff; border-radius: 50%; }
.dg-size.sel { border-color: var(--gold); background: rgba(255,183,0,0.15); }
.dg-tool, .dg-act { min-width: 44px; height: 44px; padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.dg-tool .dg-ti, .dg-act .dg-ti { font-size: 16px; line-height: 1; }
.dg-tool .dg-tl, .dg-act .dg-tl { font-size: 8px; font-weight: 800; letter-spacing: 1px; color: rgba(255,255,255,0.65); }
.dg-tool.sel { border-color: var(--gold); background: rgba(255,183,0,0.18); }
.dg-act:active, .dg-tool:active { transform: scale(0.92); }

/* feed + input live below the canvas/toolbar */
#dg-side { flex: 0 0 auto; display: flex; flex-direction: column; background: #111; }
/* input row first (prominent, right under the canvas), feed below it */
#dg-input-wrap { flex: 0 0 auto; padding: 8px; border-bottom: 1px solid var(--border); }
.dg-input-row { display: flex; gap: 8px; }
#dg-input { flex: 1 1 auto; min-width: 0; height: 52px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: #fff; font-family: var(--mono); font-size: 16px; padding: 0 14px; outline: none; border-radius: 10px; }
#dg-input:focus { border-color: var(--gold); }
#dg-input:disabled { color: var(--green); border-color: rgba(0,200,83,0.4); background: rgba(0,200,83,0.08); }
.dg-send { flex: 0 0 auto; height: 52px; background: var(--green); color: #fff; border: none; font-family: var(--mono); font-weight: 800; letter-spacing: 1px; font-size: 14px; padding: 0 20px; border-radius: 10px; cursor: pointer; }
.dg-send:active { transform: scale(0.96); }
.dg-drawing-note { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: 2px; color: var(--gold); padding: 15px; }

/* guess feed — always visible, shows the last few entries, scrolls for more */
.dg-feed { flex: 0 0 auto; min-height: 60px; max-height: 120px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.dg-fentry { font-size: 12px; line-height: 1.4; padding: 5px 9px; border-radius: 6px; word-break: break-word; }
.dg-fentry.correct { background: rgba(0,200,83,0.15); border-left: 3px solid var(--green); color: #fff; }
.dg-fentry.wrong { background: transparent; color: rgba(255,255,255,0.4); }
.dg-fentry.system { text-align: center; font-style: italic; color: var(--gold); font-size: 11px; letter-spacing: 1px; }
.dg-pts { color: var(--green); font-weight: 800; }
.dg-wrongtext { color: rgba(255,255,255,0.45); }

/* bottom bar: mic (left) · status · leave (right) — mic is no longer floating */
#dg-bottom { flex: 0 0 60px; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: rgba(10,10,10,0.95); border-top: 1px solid var(--border); }
.dg-mic { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.22); background: var(--green); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 0 16px rgba(0,200,83,0.35); transition: background .15s, box-shadow .15s, transform .08s; }
.dg-mic.muted { background: var(--red); box-shadow: 0 0 16px rgba(255,45,45,0.4); }
.dg-mic:active { transform: scale(0.94); }
.dg-guesscount { flex: 1 1 auto; text-align: center; font-size: 12px; letter-spacing: 1px; color: rgba(255,255,255,0.6); }
.dg-leave { flex: 0 0 auto; background: rgba(255,45,45,0.15); border: 1px solid var(--red); color: var(--red); font-family: var(--mono); font-size: 11px; letter-spacing: 2px; padding: 10px 14px; border-radius: 8px; cursor: pointer; }

/* word choose modal */
.dg-wordmodal { position: absolute; inset: 0; z-index: 60; background: rgba(8,8,8,0.94); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dg-wm-inner { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; }
.dg-wm-title { font-size: 20px; font-weight: 900; letter-spacing: 4px; text-align: center; color: #fff; }
.dg-wm-sub { font-size: 12px; color: rgba(255,255,255,0.55); text-align: center; letter-spacing: 1px; }
.dg-wm-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.dg-wm-card { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; background: #161616; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .12s, transform .1s; }
.dg-wm-card:hover { border-color: var(--gold); transform: scale(1.02); }
.dg-wm-card:active { transform: scale(0.99); }
.dg-wm-word { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; text-transform: capitalize; }
.dg-wm-diff { font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 4px 10px; border-radius: 5px; }
.dg-wm-diff.easy { background: rgba(0,200,83,0.18); color: var(--green); }
.dg-wm-diff.medium { background: rgba(255,183,0,0.18); color: var(--gold); }
.dg-wm-diff.hard { background: rgba(255,45,45,0.18); color: var(--red); }
.dg-wm-timer { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-top: 6px; }
#dg-wm-bar { height: 100%; width: 100%; background: var(--gold); }

/* =====================================================
   PODIUM
   ===================================================== */
#podium-screen { flex-direction: column; align-items: center; justify-content: center; overflow: auto; }
.pod-wrap { position: relative; z-index: 2; width: 100%; max-width: 480px; padding: 24px 18px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.pod-title { font-size: 30px; font-weight: 900; letter-spacing: 8px; color: var(--gold); text-shadow: 0 0 24px rgba(255,183,0,0.35); }

.pod-platforms { display: flex; align-items: flex-end; justify-content: center; gap: 12px; width: 100%; min-height: 220px; }
.pod-col { flex: 1; max-width: 130px; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: podRise .5s ease-out both; }
@keyframes podRise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.pod-crown { font-size: 24px; }
.pod-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; color: #fff; border: 2px solid rgba(255,255,255,0.3); }
.pod-avatar.red { background: var(--red); } .pod-avatar.blue { background: var(--blue); }
.pod-name { font-size: 13px; font-weight: 700; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-pscore { font-size: 18px; font-weight: 900; color: var(--gold); }
.pod-pstat { font-size: 10px; color: rgba(255,255,255,0.5); }
.pod-plat { width: 100%; border-radius: 8px 8px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; background-image: linear-gradient(180deg, rgba(255,255,255,0.25), rgba(255,255,255,0)); }
.pod-plat span { font-size: 28px; font-weight: 900; color: rgba(0,0,0,0.55); }
.pod-empty { width: 100%; height: 60px; }

.pod-board { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.pod-brow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.pod-brow.winner { background: rgba(255,183,0,0.12); border-color: var(--gold); }
.pod-rank { font-weight: 800; color: rgba(255,255,255,0.5); min-width: 18px; }
.pod-brow .pdot { width: 9px; height: 9px; border-radius: 50%; }
.pod-bname { flex: 1; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-bstat { font-size: 11px; color: rgba(255,255,255,0.45); }
.pod-bscore { font-weight: 900; color: var(--gold); min-width: 44px; text-align: right; }

.pod-actions { display: flex; gap: 12px; width: 100%; }
.pod-again, .pod-lobby { flex: 1; font-family: var(--mono); font-weight: 800; letter-spacing: 2px; font-size: 13px; padding: 14px; cursor: pointer; border-radius: 8px; }
.pod-again { background: var(--gold); color: #1a1300; border: none; }
.pod-lobby { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); border: 1px solid var(--border); }
.pod-again:active, .pod-lobby:active { transform: translateY(2px); }


/* keep the modal/word readable on very small screens */
@media (max-width: 380px) {
  .dg-word { font-size: 13px; letter-spacing: 3px; }
  .dg-wm-word { font-size: 19px; }
}
