/* UNO Party — shares arcade.css theme. */
.game-body { overflow: hidden; height: 100svh; }
#stage { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #3b0764, #0c0418 70%); }
.hidden { display: none !important; }

.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 14px 0; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.uno-title { font-weight: 900; font-size: 1.2rem; letter-spacing: -.5px; }
.uno-title span { color: #fdba74; }
.icon-btn { cursor: pointer; font: inherit; font-size: 1.2rem; line-height: 1; width: 44px; height: 44px; display: inline-flex;
  align-items: center; justify-content: center; color: var(--ink); background: rgba(32,16,64,0.6);
  border: 1.5px solid rgba(249,115,22,0.45); border-radius: 50%; text-decoration: none; }
.icon-btn:active { transform: scale(0.92); }

.screen { position: absolute; inset: 0; z-index: 25; display: none; align-items: center; justify-content: center; padding: 20px;
  padding-top: max(20px, calc(env(safe-area-inset-top) + 60px)); overflow-y: auto; }
.screen.on { display: flex; }
.screen[data-screen="table"] { align-items: stretch; padding-top: max(56px, calc(env(safe-area-inset-top) + 50px)); padding-bottom: 12px; }

.title-card { text-align: center; max-width: 420px; }
.title { font-size: clamp(2.8rem, 15vw, 5rem); font-weight: 900; letter-spacing: -2px; margin: 0; line-height: .9; }
.title span { display: block; background: linear-gradient(120deg, #fdba74, #f97316, #c084fc); -webkit-background-clip: text; background-clip: text;
  color: transparent; }
.tag { color: var(--ink-dim); margin: 14px auto 22px; max-width: 32ch; }
.menu-btns { display: flex; flex-direction: column; gap: 12px; }
.how { color: var(--ink-mut); font-size: .85rem; margin-top: 18px; }

.panel.setup-card, .panel.lobby-card, .panel.over-card, .panel.picker-card { width: 100%; max-width: 380px; padding: 24px; text-align: center; }
.setup-card h2, .over-card h2, .picker-card h2 { font-size: 1.4rem; }
.setup-card .btn.big { width: 100%; }
.lbl, .lobby-label { display: block; text-align: left; color: var(--ink-dim); font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin: 0 0 6px; }
.lobby-label { text-align: center; }
.nick-row, .join-row { display: flex; gap: 8px; align-items: stretch; }
.nick-row .field, .join-row .field { flex: 1; }
.nick-row .icon-btn { flex: none; border-radius: 12px; }
.join-row { margin-bottom: 8px; }
.join-row .btn { flex: none; }
.nick-hint { color: var(--ink-mut); font-size: .78rem; margin: 6px 0 16px; text-align: left; }
.or { color: var(--ink-mut); font-size: .8rem; margin: 16px 0 10px; }
.err { color: var(--pink); font-weight: 700; font-size: .85rem; margin: 10px 0 0; min-height: 1em; }
.btn.small { font-size: .85rem; padding: .55em 1.1em; }
.setup-card .small { margin-top: 16px; }
.code-big { font-size: 2.8rem; font-weight: 900; letter-spacing: 6px; color: #fff; text-shadow: 0 0 26px rgba(249,115,22,0.7); margin: 4px 0 10px; }
.player-list { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.player-list li { display: flex; align-items: center; gap: 8px; font-weight: 700; background: rgba(11,4,23,0.4);
  border: 1px solid rgba(249,115,22,0.25); border-radius: 10px; padding: .5em .8em; text-align: left; }
.player-list li .tag { margin-left: auto; font-size: .72rem; font-weight: 800; color: #fdba74; margin-top: 0; max-width: none; }
.player-list li .pts { margin-left: auto; font-weight: 900; color: #fff; }
.wait { color: var(--ink-dim); font-weight: 700; font-style: italic; }

/* table */
.table { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; margin: 0 auto; min-height: 0; flex: 1; }
.opps { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.opp { font-size: .78rem; font-weight: 800; padding: .3em .7em; border-radius: 999px; background: rgba(32,16,64,0.7);
  border: 1.5px solid rgba(168,85,247,0.3); white-space: nowrap; }
.opp.turn { border-color: #fdba74; box-shadow: 0 0 14px rgba(253,186,116,0.6); }
.opp.left { opacity: .4; text-decoration: line-through; }
.opp .uno-badge { color: #ffd54a; margin-left: 4px; }

.centre { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 4px 0; }
.pile { width: 70px; height: 100px; border-radius: 12px; border: 2px solid #fff; cursor: pointer; font: inherit; font-weight: 900; color: #fff;
  background: repeating-linear-gradient(45deg, #1e1b4b 0 6px, #312e81 6px 12px); box-shadow: 0 6px 16px rgba(0,0,0,0.4); }
.pile span { font-size: .8rem; letter-spacing: 1px; }
.pile:disabled { opacity: .55; cursor: default; }
.discard { width: 70px; height: 100px; position: relative; }
.meta { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.colour-chip { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 12px rgba(0,0,0,0.4); }
.dir { font-size: 1.6rem; color: #fdba74; line-height: 1; }

.turn-msg { text-align: center; font-weight: 800; margin: 0; min-height: 1.2em; }
.log { text-align: center; color: var(--ink-mut); font-size: .8rem; margin: 0; min-height: 1.1em; }

/* cards */
.uno-card { width: 70px; height: 100px; border-radius: 12px; border: 3px solid #fff; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1.7rem; position: relative; box-shadow: 0 6px 14px rgba(0,0,0,0.45); flex: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4); user-select: none; }
.uno-card::before, .uno-card::after { position: absolute; font-size: .8rem; line-height: 1; }
.uno-card::before { content: attr(data-label); top: 6px; left: 7px; }
.uno-card::after { content: attr(data-label); bottom: 6px; right: 7px; transform: rotate(180deg); }
.uno-card .sym { font-size: 1.9rem; }
.c-R { background: #ef4444; } .c-Y { background: #facc15; color: #1f2937; text-shadow: none; } .c-G { background: #22c55e; } .c-B { background: #3b82f6; }
.c-W { background: conic-gradient(#ef4444, #facc15, #22c55e, #3b82f6, #ef4444); }
.uno-card.back { background: repeating-linear-gradient(45deg, #1e1b4b 0 6px, #312e81 6px 12px); }
.uno-card.small-card { width: 46px; height: 66px; font-size: 1.1rem; }

.hand { display: flex; gap: 0; overflow-x: auto; padding: 22px 12px 16px; margin-top: 4px; justify-content: safe center; }
.hand .uno-card { margin: 0 -10px; transition: transform .15s; }
.hand .uno-card:first-child { margin-left: 0; } .hand .uno-card:last-child { margin-right: 0; }
.hand .uno-card.playable { transform: translateY(-12px); outline: 3px solid #fdba74; outline-offset: 2px; cursor: pointer; }
.hand .uno-card.dim { opacity: .5; filter: saturate(.5); }

.actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* overlays */
.overlay { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(8,3,18,0.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 18px; }
.pick-col { height: 74px; border-radius: 16px; border: 3px solid #fff; cursor: pointer; }
.c-R.pick-col { background: #ef4444; } .c-Y.pick-col { background: #facc15; } .c-G.pick-col { background: #22c55e; } .c-B.pick-col { background: #3b82f6; }

.toast { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 16px); transform: translateX(-50%); z-index: 60;
  background: rgba(32,16,64,0.94); border: 1px solid rgba(249,115,22,0.45); color: var(--ink); padding: .6em 1.1em; border-radius: 999px;
  font-weight: 700; font-size: .85rem; max-width: 90vw; text-align: center; }
