:root{
  color-scheme: dark;
  --bg0: #07070b;
  --bg1: #0b0b14;
  --fg: #eaeaf2;
  --muted: rgba(255,255,255,.65);
  --line: rgba(255,255,255,.10);
  --accent: rgba(170,120,255,.95);
  --accent2: rgba(90,210,255,.95);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 600px at 50% 0%, rgba(170,120,255,.18) 0%, rgba(0,0,0,0) 55%),
    radial-gradient(900px 600px at 20% 40%, rgba(90,210,255,.10) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 70%);
  color: var(--fg);
}

.app{ height:100%; display:flex; flex-direction:column; }

.topbar{
  padding: 14px 14px 10px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom: 1px solid var(--line);
}

.pill{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--fg);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.topTitle{ text-align:center; flex:1; }
.gameName{ font-weight:650; letter-spacing:.2px; }
.sub{ font-size:12px; color: var(--muted); margin-top:2px; }

.layout{
  flex:1;
  display:flex;
  flex-direction:column;
  padding: 12px 14px 16px;
  gap: 12px;
}

.opponent{
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 18px;
}

.opRow{ display:flex; align-items:center; gap:10px; }
.avatar{
  width:38px; height:38px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(170,120,255,.14);
  border: 1px solid rgba(170,120,255,.30);
  font-weight:700;
}
.opName{ font-weight:650; }
.opMeta{ font-size:12px; color: var(--muted); margin-top:2px; }

.center{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 10px;
}

.hint{ color: var(--muted); font-size:14px; }

.tableWrap{
  width: min(560px, 92vw);
  border-radius: 22px;
  border: 1px solid rgba(170,120,255,.18);
  background: rgba(90,50,140,.10);
  overflow:hidden;
}

.tableTitle{
  padding: 10px 12px;
  display:flex;
  gap: 8px;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.badge{
  font-size: 12px;
  color: rgba(255,255,255,.82);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  white-space:nowrap;
}

.table{
  min-height: 220px;
  padding: 14px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-content:flex-start;
}

.pair{
  display:flex; gap:6px; align-items:center;
  padding: 6px;
  border-radius: 14px;
  background: rgba(0,0,0,.10);
  border: 1px solid rgba(255,255,255,.06);
}

.card{
  width: 56px;
  height: 86px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 700;
  user-select:none;
}

.card.small{
  width: 48px;
  height: 74px;
  border-radius: 12px;
}

.card.placeholder{
  opacity:.35;
  font-weight: 600;
}

.card.selected{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ctaRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:center;
}

.cta{
  min-width: 140px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(170,120,255,.18);
  color: var(--fg);
  font-weight: 650;
}
.cta.ghost{
  background: rgba(255,255,255,.06);
}

.bottom{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.handLabel{
  display:flex;
  justify-content:space-between;
  color: rgba(255,255,255,.82);
  font-weight: 650;
}
.tiny{ font-size: 12px; color: var(--muted); font-weight: 600; }

.hand{
  display:flex;
  gap: 10px;
  overflow-x:auto;
  padding: 6px 2px;
}

.actions{
  display:flex;
  gap: 10px;
}

.action{
  flex: 1;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--fg);
  font-weight: 700;
}
.action.primary{
  background: rgba(170,120,255,.22);
  border-color: rgba(170,120,255,.35);
}