/* ================================================================
   style.css — Remi Ceki Kustom  |  Modern · Responsive · Mobile-First
   ================================================================ */

/* ── Design Tokens ──────────────────────────────────────────────── */
:root {
  /* Palette */
  --c-felt:        #16412b;
  --c-felt-mid:    #0f2e1d;
  --c-felt-dark:   #091a10;
  --c-gold:        #e0b648;
  --c-gold-hi:     #f5d070;
  --c-gold-lo:     #b8912e;
  --c-red:         #d63031;
  --c-red-hi:      #ff6b6b;
  --c-teal:        #00cec9;
  --c-purple:      #8e44ad;
  --c-green:       #27ae60;
  --c-blue:        #2980b9;

  /* Surface */
  --s-glass:       rgba(0,0,0,.42);
  --s-glass-light: rgba(255,255,255,.06);
  --s-panel:       #111e15;

  /* Text */
  --t-bright:  #f5ead6;
  --t-mid:     #b0956a;
  --t-dim:     #6e7d6e;

  /* Card */
  --card-bg:   #fafafa;
  --card-sh:   rgba(0,0,0,.55);

  /* Radius */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-card: 7px;

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur-fast: 130ms;
  --dur-mid:  280ms;

  /* Card sizes — overridden via JS / media queries */
  --card-w:  52px;
  --card-h:  73px;
  --card-fs: .88rem;

  --card-sm-w:  36px;
  --card-sm-h:  50px;
  --card-sm-fs: .72rem;

  --card-xs-w:  26px;
  --card-xs-h:  37px;
  --card-xs-fs: .6rem;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%; width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--c-felt-dark);
  color: var(--t-bright);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Screens ────────────────────────────────────────────────────── */
.screen { display: none; width: 100%; height: 100%; flex-direction: column; }
.screen.active { display: flex; }

/* ================================================================
   LOBBY
   ================================================================ */
.lobby-bg {
  position: relative; display: flex;
  align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at 50% 60%, #1d5c38 0%, #091a10 70%);
  overflow-y: auto; overflow-x: hidden;
}
.lobby-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.lobby-container {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(16px, 3vw, 28px);
  padding: clamp(24px, 5vw, 48px) 16px;
  width: 100%; max-width: 460px;
}

/* Logo */
.lobby-logo {
  display: flex; gap: clamp(10px,2vw,18px); justify-content: center; margin-bottom: 4px;
}
.ls {
  font-size: clamp(1.6rem,5vw,2.6rem);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
  animation: cardFloat 3s ease-in-out infinite;
}
.ls-heart, .ls-diamond { color: #e74c3c; }
.ls-spade, .ls-club    { color: #d8d8d8; }
.ls:nth-child(2) { animation-delay: .4s; }
.ls:nth-child(3) { animation-delay: .8s; }
.ls:nth-child(4) { animation-delay: 1.2s; }
@keyframes cardFloat {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%     { transform: translateY(-9px) rotate(2deg); }
}

.lobby-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem,7vw,3.4rem);
  font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(145deg, var(--c-gold-hi), var(--c-gold-lo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  filter: drop-shadow(0 2px 12px rgba(224,182,72,.3));
}
.lobby-subtitle {
  text-align: center; color: var(--t-mid);
  font-size: clamp(.8rem,2.5vw,.95rem); margin-top: 4px;
}

/* Lobby card */
.lobby-card {
  width: 100%;
  background: var(--s-glass);
  border: 1px solid rgba(224,182,72,.22);
  border-radius: var(--r-xl);
  padding: clamp(18px,4vw,30px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 64px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07);
}
.lobby-card-label {
  font-family: 'Cinzel', serif; font-size: .8rem; color: var(--c-gold);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 14px; text-align: center;
}
.lobby-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.lobby-card-header .lobby-card-label {
  margin-bottom: 0;
  text-align: left;
}
.btn-rnd-bots {
  background: rgba(224, 182, 72, 0.12);
  border: 1px solid rgba(224, 182, 72, 0.4);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.72rem;
  color: #f7df94;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.btn-rnd-bots:hover {
  background: rgba(224, 182, 72, 0.28);
  border-color: var(--c-gold);
  color: #fff;
  transform: translateY(-1px);
}
.player-inputs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.player-row {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.04); border-radius: var(--r-md);
  padding: 10px 14px; border: 1px solid transparent;
  transition: border-color var(--dur-fast);
}
.player-row.human-row { border-color: rgba(224,182,72,.3); background: rgba(224,182,72,.05); }
.player-row:focus-within { border-color: rgba(224,182,72,.5); }
.player-avatar { font-size: 1.3rem; flex-shrink: 0; }
.player-row-info { display: flex; flex-direction: column; flex: 1; }
.player-row-tag { font-size: .68rem; color: var(--t-mid); letter-spacing: .5px; margin-bottom: 2px; }
.name-input {
  background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,.15);
  color: var(--t-bright); font-size: .95rem; font-weight: 500;
  outline: none; padding: 2px 0; width: 100%;
  transition: border-color var(--dur-fast);
}
.name-input:focus { border-bottom-color: var(--c-gold); }

/* Start button */
.btn-start {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px 0;
  background: linear-gradient(135deg, var(--c-gold) 0%, var(--c-gold-lo) 100%);
  color: #1a1000; font-weight: 700; font-size: 1.05rem; font-family: 'Inter', sans-serif;
  border: none; border-radius: var(--r-md); cursor: pointer;
  box-shadow: 0 4px 20px rgba(224,182,72,.35);
  transition: filter var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn-start:hover  { filter: brightness(1.1); box-shadow: 0 6px 28px rgba(224,182,72,.5); }
.btn-start:active { transform: scale(.97); }
.btn-start-icon   { font-size: 1.2rem; }

/* Rules chips */
.lobby-rules { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.rule-chip {
  background: rgba(224,182,72,.1);
  border: 1px solid rgba(224,182,72,.28);
  border-radius: 20px; padding: 5px 13px;
  font-size: .74rem; color: var(--c-gold); letter-spacing: .3px;
}

/* ================================================================
   HUD
   ================================================================ */
.hud {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px;
  height: 46px; flex-shrink: 0; z-index: 20;
  background: rgba(0,0,0,.5);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(8px);
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 8px; }
.hud-center { flex: 1; display: flex; justify-content: center; }

.hud-pill {
  display: flex; align-items: baseline; gap: 4px;
  background: rgba(255,255,255,.06); border-radius: 20px; padding: 3px 10px;
}
.hud-pill-label { font-size: .62rem; color: var(--t-dim); text-transform: uppercase; letter-spacing: 1px; }
.hud-pill-val   { font-family: 'Cinzel', serif; font-size: .95rem; color: var(--c-gold); font-weight: 700; }

.turn-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,.45); border-radius: 20px;
  padding: 5px 14px; border: 1px solid rgba(224,182,72,.18);
  max-width: calc(100vw - 160px); overflow: hidden;
}
.turn-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-gold); flex-shrink: 0;
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.4; transform:scale(.65); } }
.turn-name  { font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.turn-phase {
  font-size: .65rem; color: var(--c-gold);
  background: rgba(224,182,72,.15); border-radius: 4px; padding: 1px 6px;
  white-space: nowrap;
}

.hud-btn {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  color: var(--t-bright); border-radius: 8px;
  width: 36px; height: 36px; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.hud-btn:hover { background: rgba(255,255,255,.14); }

/* ================================================================
   MODAL (Score)
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--s-panel);
  border: 1px solid rgba(224,182,72,.25);
  border-radius: var(--r-xl);
  padding: 24px 22px;
  width: 100%; max-width: 360px;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-family: 'Cinzel', serif; color: var(--c-gold); font-size: 1rem; }
.modal-close {
  background: rgba(255,255,255,.06); border: none; color: var(--t-mid);
  width: 30px; height: 30px; border-radius: 50%; font-size: 1rem; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: rgba(214,48,49,.25); color: var(--c-red-hi); }
.score-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.score-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.04); border-radius: var(--r-md);
  padding: 10px 14px;
}
.score-row.leader { border: 1px solid rgba(224,182,72,.35); background: rgba(224,182,72,.07); }
.sr-name  { font-size: .88rem; font-weight: 500; }
.sr-score { font-family: 'Cinzel', serif; font-size: 1.05rem; font-weight: 700; }
.sr-score.pos { color: var(--c-gold); }
.sr-score.neg { color: var(--c-red-hi); }
.modal-note { font-size: .72rem; color: var(--t-dim); text-align: center; }

/* ================================================================
   GAME TABLE
   ================================================================ */
.game-table {
  flex: 1; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 40%, #1f6040 0%, var(--c-felt-mid) 75%);
  overflow: hidden; min-height: 0;
}
.middle-row { flex: 1; display: flex; min-height: 0; }

/* ── Zone helpers ─────────────────────────────────────────────── */
.zone { position: relative; }
.zone-active {
  outline: 2px solid rgba(224,182,72,.7);
  animation: zoneGlow 1.4s ease-in-out infinite alternate;
}
@keyframes zoneGlow {
  from { outline-color: rgba(224,182,72,.4); box-shadow: none; }
  to   { outline-color: var(--c-gold);        box-shadow: inset 0 0 18px rgba(224,182,72,.12); }
}
.zone-thinking {
  outline: 2px dashed rgba(224, 182, 72, 0.9) !important;
  box-shadow: inset 0 0 24px rgba(224, 182, 72, 0.22), 0 0 16px rgba(224, 182, 72, 0.3) !important;
  animation: zoneThinkGlow 1.2s ease-in-out infinite alternate !important;
}
@keyframes zoneThinkGlow {
  from { outline-color: rgba(224, 182, 72, 0.5); filter: brightness(1); }
  to   { outline-color: #ffd700; filter: brightness(1.15); }
}

/* shared info chips */
.z-avatar { font-size: .9rem; }
.z-name   { font-weight: 600; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
.z-score  { font-family: 'Cinzel', serif; font-size: .74rem; color: var(--c-gold); background: rgba(0,0,0,.4); border-radius: 10px; padding: 1px 7px; }
.z-count  { font-size: .7rem; color: var(--t-dim); background: rgba(255,255,255,.07); border-radius: 10px; padding: 1px 7px; }

/* ── TOP zone (Bot 2) ─────────────────────────────────────────── */
.zone-top {
  padding: 4px 8px 3px;
  background: rgba(0,0,0,.22);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.zone-info-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.z-hand-row  { display: flex; gap: 2px; flex-wrap: nowrap; overflow: hidden; min-height: 38px; }
.z-melds-row { display: flex; gap: 4px; flex-wrap: wrap; min-height: 22px; margin-top: 2px; }

/* ── SIDE zones ───────────────────────────────────────────────── */
.zone-side {
  width: clamp(70px, 16vw, 110px); flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 3px; gap: 4px;
  background: rgba(0,0,0,.15);
}
.zone-left  { border-right: 1px solid rgba(255,255,255,.05); }
.zone-right { border-left:  1px solid rgba(255,255,255,.05); }
.z-side-info {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.z-hand-col  { flex: 1; display: flex; flex-direction: column; gap: 2px; align-items: center; overflow: hidden; }
.z-melds-col { display: flex; flex-direction: column; gap: 3px; align-items: center; width: 100%; }

/* ── CENTER felt ──────────────────────────────────────────────── */
.table-felt {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; min-width: 0;
  padding: 6px 4px;
}

/* ── BOTTOM zone (Human) ──────────────────────────────────────── */
.zone-bottom {
  background: rgba(0,0,0,.3);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 5px 8px 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.human-top-strip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px;
}
.human-identity { display: flex; align-items: center; gap: 5px; }
.human-score-chip { color: var(--c-gold); font-family: 'Cinzel', serif; }
.btn-sort-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(224, 182, 72, 0.16), rgba(30, 90, 60, 0.3));
  border: 1px solid rgba(224, 182, 72, 0.45);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f7df94;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  margin-left: 4px;
}
.btn-sort-chip:hover {
  background: linear-gradient(135deg, rgba(224, 182, 72, 0.32), rgba(30, 110, 75, 0.45));
  border-color: var(--c-gold);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(224, 182, 72, 0.35);
}
.btn-sort-chip:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.btn-sort-chip .sort-icon {
  font-size: 0.78rem;
  line-height: 1;
}
.human-melds-wrap { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: wrap; }
.melds-lbl { font-size: .68rem; color: var(--t-dim); flex-shrink: 0; }
.melds-row { display: flex; gap: 4px; flex-wrap: wrap; }
.opener-badge {
  background: rgba(224,182,72,.15); border: 1px solid var(--c-gold);
  border-radius: 10px; padding: 1px 8px; font-size: .66rem; color: var(--c-gold);
  white-space: nowrap;
}
.opener-badge.hidden { display: none; }

.human-hand {
  display: flex; gap: clamp(3px,1vw,7px); flex-wrap: wrap;
  min-height: clamp(72px,14vw,96px); align-items: flex-end; padding: 2px 0;
}
.human-action-bar {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 38px;
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--r-card);
  box-shadow: 0 2px 8px var(--card-sh);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; cursor: pointer; flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.card:hover  { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,.55); }
.card:active { transform: translateY(-2px); }
.card.selected {
  transform: translateY(-12px);
  box-shadow: 0 0 0 3px var(--c-gold), 0 10px 24px rgba(224,182,72,.4);
}

/* ================================================================
   PENANDA KOMBINASI JADI (GARIS HIJAU BERSINAR & KILAU SUDUT KARTU)
   ================================================================ */
.card.card-meld-glow {
  box-shadow: 0 0 0 2px #2ecc71, 0 0 14px rgba(46, 204, 113, 0.75), 0 3px 8px var(--card-sh) !important;
  position: relative;
}

.card.card-meld-glow.selected {
  transform: translateY(-12px);
  box-shadow: 0 0 0 3px #2ecc71, 0 0 22px rgba(46, 204, 113, 0.95), 0 10px 24px rgba(46, 204, 113, 0.45) !important;
}

/* Garis hijau tipis bersinar mengelilingi kartu */
.card.card-meld-glow::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--r-card) + 1px);
  border: 1.5px solid #2ecc71;
  box-shadow: inset 0 0 6px rgba(46, 204, 113, 0.45);
  pointer-events: none;
  animation: meldGlowPulse 2.2s ease-in-out infinite alternate;
}

/* Cahaya kilau tipis di 4 sudut kartu yang telah jadi */
.card.card-meld-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--r-card);
  pointer-events: none;
  background:
    radial-gradient(circle at 4px 4px, rgba(46, 255, 130, 0.95) 0%, rgba(46, 255, 130, 0.4) 3px, transparent 6px),
    radial-gradient(circle at calc(100% - 4px) 4px, rgba(46, 255, 130, 0.95) 0%, rgba(46, 255, 130, 0.4) 3px, transparent 6px),
    radial-gradient(circle at 4px calc(100% - 4px), rgba(46, 255, 130, 0.95) 0%, rgba(46, 255, 130, 0.4) 3px, transparent 6px),
    radial-gradient(circle at calc(100% - 4px) calc(100% - 4px), rgba(46, 255, 130, 0.95) 0%, rgba(46, 255, 130, 0.4) 3px, transparent 6px);
  animation: meldCornerShimmer 2.2s ease-in-out infinite alternate;
}

@keyframes meldGlowPulse {
  0% {
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5), inset 0 0 4px rgba(46, 204, 113, 0.3);
    border-color: rgba(46, 204, 113, 0.7);
  }
  100% {
    box-shadow: 0 0 16px rgba(46, 204, 113, 0.95), inset 0 0 8px rgba(46, 204, 113, 0.6);
    border-color: #2ecc71;
  }
}

@keyframes meldCornerShimmer {
  0% {
    opacity: 0.55;
    filter: drop-shadow(0 0 2px #2ecc71);
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 6px #2ecc71);
  }
}

/* ================================================================
   MANUAL CARD DRAG & REORDER
   ================================================================ */
.card > * {
  pointer-events: none;
}

.human-hand .card {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.human-hand .card:active {
  cursor: grabbing;
}

.card.card-dragging {
  opacity: 0.88;
  z-index: 1000 !important;
  cursor: grabbing !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(46, 204, 113, 0.7) !important;
  transition: none !important;
}

.card.drag-over-card {
  outline: 2.5px dashed #f39c12;
  outline-offset: 4px;
  transform: scale(1.08) translateY(-10px);
  box-shadow: 0 0 20px rgba(243, 156, 18, 0.9) !important;
}
.card.targeted {
  animation: targetPulse .55s ease-in-out infinite alternate;
}
@keyframes targetPulse {
  from { box-shadow: 0 0 0 2px var(--c-teal), 0 0 8px var(--c-teal); }
  to   { box-shadow: 0 0 0 3px var(--c-teal), 0 0 22px var(--c-teal); }
}

/* Colour variants */
.card.red-suit   { color: var(--c-red); }
.card.black-suit { color: #141414; }
.card.joker-card { color: #7d3fba; }

/* Sizes */
.card-lg {
  width: var(--card-w); height: var(--card-h);
  font-size: var(--card-fs);
}
.card-sm {
  width: var(--card-sm-w); height: var(--card-sm-h);
  font-size: var(--card-sm-fs);
}
.card-xs {
  width: var(--card-xs-w); height: var(--card-xs-h);
  font-size: var(--card-xs-fs);
}
.card-rank { line-height: 1; }
.card-suit { font-size: .82em; line-height: 1; }

/* Card back */
.card-back {
  background: linear-gradient(135deg, #1a3a60, #0b1f40);
  border-radius: var(--r-card);
  box-shadow: 0 2px 6px rgba(0,0,0,.55);
  flex-shrink: 0; overflow: hidden;
}
.card-back-inner {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 2px,
    transparent 2px, transparent 9px
  );
  border-radius: var(--r-card);
}

/* Meld group */
.meld-group {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--r-md);
  padding: 3px 5px; display: flex; gap: 2px; flex-wrap: wrap; align-items: center;
}
.meld-badge {
  font-size: .58rem; color: var(--c-gold);
  background: rgba(224,182,72,.18); border-radius: 3px;
  padding: 1px 4px; margin-bottom: 2px; display: block; text-align: center;
}

/* ================================================================
   PILES (deck + discard)
   ================================================================ */
.piles-row { display: flex; gap: clamp(16px,4vw,36px); align-items: flex-end; justify-content: center; }
.pile-wrap  { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pile-lbl   { font-size: .62rem; color: var(--t-dim); text-transform: uppercase; letter-spacing: 1px; }

/* Deck */
.deck-stack {
  position: relative;
  width: clamp(52px,10vw,68px);
  height: clamp(72px,14vw,94px);
  cursor: pointer;
  transition: transform var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.deck-stack:hover  { transform: scale(1.06); }
.deck-stack:active { transform: scale(.97); }
.deck-card {
  position: absolute;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a3a60, #0b1f40);
  border-radius: var(--r-card);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
}
.dc3 { top: -4px; left: -4px; opacity: .45; }
.dc2 { top: -2px; left: -2px; opacity: .7; }
.dc1 { top: 0; left: 0; }
.deck-pattern {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    45deg, rgba(255,255,255,.06) 0, rgba(255,255,255,.06) 2px, transparent 2px, transparent 10px
  );
}
.deck-count {
  position: absolute; bottom: 5px; right: 5px;
  background: rgba(224,182,72,.85); color: #1a1000;
  border-radius: 8px; padding: 1px 6px;
  font-size: .65rem; font-weight: 700;
}

/* Discard */
.discard-area {
  display: flex; gap: 3px; align-items: flex-end;
  min-width: clamp(110px, 28vw, 200px);
  max-width: clamp(130px, 34vw, 240px);
  height: clamp(60px,12vw,80px);
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
  background: rgba(0,0,0,.18);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: var(--r-card); padding: 3px;
}
.discard-area::-webkit-scrollbar { height: 3px; }
.discard-area::-webkit-scrollbar-thumb { background: rgba(224,182,72,.3); border-radius: 2px; }
.discard-empty { color: var(--t-dim); font-size: .72rem; align-self: center; margin: auto; white-space: nowrap; }

/* ================================================================
   PICKUP / MELD INLINE PANELS
   ================================================================ */
.pickup-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(0,0,0,.55); border: 1px solid var(--c-teal);
  border-radius: var(--r-md); padding: 7px 12px;
  font-size: .76rem; color: #00eff0;
  width: 100%; max-width: 420px;
}
.pickup-hint.hidden { display: none; }

.inline-panel {
  background: rgba(14,28,18,.88); border: 1px solid rgba(224,182,72,.35);
  border-radius: var(--r-lg); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  width: 100%; max-width: 440px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 36px rgba(0,0,0,.6);
  z-index: 10;
}
.inline-panel.hidden { display: none; }
.pcp-header-row {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 6px; margin-bottom: 2px;
}
.ip-title {
  font-family: 'Cinzel', serif; font-size: .85rem; font-weight: 700; color: var(--c-gold);
}
.btn-cancel-x {
  background: rgba(255,255,255,.08); border: none; color: var(--t-dim);
  width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.btn-cancel-x:hover { background: rgba(214,48,49,.3); color: var(--c-red-hi); }
.ip-label { font-size: .72rem; color: var(--t-mid); font-weight: 500; }
.ip-card-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; min-height: 38px; }
.pcp-hint-text {
  font-size: .72rem; color: var(--t-dim); font-style: italic; padding: 4px 0;
}
.ip-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ip-error {
  font-size: .75rem; color: var(--c-red-hi);
  background: rgba(214,48,49,.15); border: 1px solid rgba(214,48,49,.4);
  border-radius: var(--r-sm); padding: 6px 10px;
}
.ip-error.hidden { display: none; }

/* ================================================================
   CHIP BUTTONS
   ================================================================ */
.btn-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 8px; padding: clamp(7px,1.5vw,9px) clamp(10px,2.5vw,16px);
  font-size: clamp(.72rem,1.8vw,.82rem); font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: filter var(--dur-fast), transform var(--dur-fast);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-chip:hover  { filter: brightness(1.15); }
.btn-chip:active { transform: scale(.95); }
.btn-chip:disabled { opacity: .3; pointer-events: none; }

.btn-chip-gold   { background: rgba(224,182,72,.18); border-color: rgba(224,182,72,.4); color: var(--c-gold); }
.btn-chip-purple { background: rgba(142,68,173,.25);  border-color: rgba(142,68,173,.5); color: #c39bd3; }
.btn-chip-teal   { background: rgba(0,206,201,.18);   border-color: rgba(0,206,201,.45); color: var(--c-teal); }
.btn-chip-green  { background: rgba(39,174,96,.22);   border-color: rgba(39,174,96,.5);  color: #6ddf9a; }
.btn-chip-blue   { background: rgba(41,128,185,.25);  border-color: rgba(41,128,185,.5); color: #7fb3d6; }
.btn-chip-danger { background: rgba(214,48,49,.2);    border-color: rgba(214,48,49,.45); color: var(--c-red-hi); }

/* ================================================================
   HUMAN ACTION BAR BUTTONS
   ================================================================ */
.action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--r-md); padding: clamp(8px,2vw,11px) clamp(12px,3vw,18px);
  font-size: clamp(.75rem,2.2vw,.88rem); font-weight: 600;
  cursor: pointer; border: none;
  transition: filter var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  white-space: nowrap; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
}
.action-btn:hover  { filter: brightness(1.12); box-shadow: 0 5px 16px rgba(0,0,0,.5); }
.action-btn:active { transform: scale(.96); }
.action-btn:disabled { opacity: .3; pointer-events: none; box-shadow: none; }

.btn-draw    { background: linear-gradient(135deg,#2980b9,#1a5276); color: #fff; }
.btn-pickup  { background: linear-gradient(135deg,#16a085,#0e6655); color: #fff; }
.btn-meld    { background: linear-gradient(135deg,#8e44ad,#5b2c6f); color: #fff; }
.btn-discard { background: linear-gradient(135deg,#c0392b,#7b241c); color: #fff; }
.btn-rnd-discard { background: linear-gradient(135deg, #e67e22, #d35400); color: #fff; }
.btn-confirm { background: linear-gradient(135deg,#27ae60,#1a7a43); color: #fff; }
.btn-cancel-action { background: linear-gradient(135deg,#d63031,#a32020); color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* ================================================================
   TOAST
   ================================================================ */
#toast-container {
  position: fixed; bottom: clamp(16px,4vw,28px); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  z-index: 300; pointer-events: none; width: 90%; max-width: 360px;
}
.toast {
  background: rgba(8,18,10,.92); border: 1px solid rgba(224,182,72,.35);
  color: var(--t-bright); border-radius: var(--r-md);
  padding: 10px 18px; font-size: .85rem; text-align: center; width: 100%;
  animation: toastSlide var(--dur-mid) var(--ease);
  box-shadow: 0 6px 24px rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
}
.toast.error   { border-color: rgba(214,48,49,.6);   color: var(--c-red-hi); }
.toast.success { border-color: rgba(39,174,96,.6);   color: #6ddf9a; }
.toast.info    { border-color: rgba(0,206,201,.6);   color: var(--c-teal); }
@keyframes toastSlide {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ================================================================
   RESULT SCREENS
   ================================================================ */
.result-overlay {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 16px;
  background: rgba(0,0,0,.82); backdrop-filter: blur(6px);
  overflow-y: auto;
}
.winner-bg { background: rgba(0,0,0,.88); }

.result-card {
  background: var(--s-panel);
  border: 1px solid rgba(224,182,72,.3);
  border-radius: var(--r-xl); padding: clamp(24px,5vw,40px);
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  box-shadow: 0 16px 56px rgba(0,0,0,.7);
  text-align: center;
}
.winner-card { border-color: var(--c-gold); }

.result-icon { font-size: 2.6rem; }
.result-title {
  font-family: 'Cinzel', serif; font-size: clamp(1.3rem,4vw,1.8rem);
  color: var(--c-gold);
}
.result-sub { font-size: .85rem; color: var(--t-mid); }
.closing-bonus-badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(39,174,96,.18);
  border: 1px solid rgba(39,174,96,.5);
  border-radius: var(--r-md);
  padding: 4px 10px;
  font-size: .8rem;
  color: #6ddf9a;
  animation: pulseBonus 1s ease-in-out infinite alternate;
}
@keyframes pulseBonus {
  from { box-shadow: 0 0 4px rgba(109,223,154,.2); }
  to   { box-shadow: 0 0 12px rgba(109,223,154,.6); }
}
.text-bonus {
  font-size: .75rem;
  color: #6ddf9a;
  font-weight: 500;
  display: inline-block;
  margin-left: 4px;
}
.denda-badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(214,48,49,.18);
  border: 1px solid rgba(214,48,49,.5);
  border-radius: var(--r-md);
  padding: 4px 10px;
  font-size: .8rem;
  color: var(--c-red-hi);
  animation: pulseDenda 1s ease-in-out infinite alternate;
}
.in-hand-badge {
  display: inline-block;
  margin-top: 6px;
  background: rgba(52, 152, 219, 0.18);
  border: 1px solid rgba(52, 152, 219, 0.5);
  border-radius: var(--r-md);
  padding: 4px 10px;
  font-size: .8rem;
  color: #74b9ff;
}
.text-in-hand {
  color: #74b9ff;
  font-size: .75rem;
  font-weight: 600;
  margin-left: 4px;
}
@keyframes pulseDenda {
  from { box-shadow: 0 0 4px rgba(214,48,49,.2); }
  to   { box-shadow: 0 0 12px rgba(214,48,49,.6); }
}
.text-denda {
  font-size: .75rem;
  color: var(--c-red-hi);
  font-weight: 600;
  display: inline-block;
  margin-left: 4px;
}

/* Opener Babak Selanjutnya */
.round-opener-info {
  width: 100%;
}
.next-opener-box {
  background: rgba(230, 126, 34, 0.12);
  border: 1px solid rgba(230, 126, 34, 0.38);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--t-primary);
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Trophy */
.trophy { font-size: clamp(3rem,8vw,4.5rem); animation: trophy 1.1s ease-in-out infinite alternate; }
@keyframes trophy {
  from { transform: scale(1) rotate(-4deg); }
  to   { transform: scale(1.06) rotate(4deg); }
}
.winner-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem,4.5vw,2.2rem);
  color: var(--c-gold-hi);
  filter: drop-shadow(0 0 16px rgba(224,182,72,.5));
}
.winner-sub { color: var(--t-mid); font-size: .88rem; }

/* Score table */
.score-table {
  width: 100%; border-collapse: collapse; font-size: clamp(.76rem,2.5vw,.88rem);
}
.score-table th {
  background: rgba(224,182,72,.12); color: var(--c-gold);
  padding: 8px 10px; text-align: left;
  font-family: 'Cinzel', serif; font-weight: 600; font-size: .75rem;
  border-bottom: 1px solid rgba(224,182,72,.18);
}
.score-table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.05); }
.score-table tr:last-child td { border-bottom: none; }
.score-table tr.row-win td { color: var(--c-gold); font-weight: 700; }
.score-table tr.row-loss td { color: var(--c-red-hi); }

/* Primary button (result screens) */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; padding: 14px 0;
  background: linear-gradient(135deg, var(--c-gold) 0%, var(--c-gold-lo) 100%);
  color: #1a1000; font-weight: 700; font-size: 1rem;
  border: none; border-radius: var(--r-md); cursor: pointer;
  box-shadow: 0 4px 18px rgba(224,182,72,.3);
  transition: filter var(--dur-fast), transform var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover  { filter: brightness(1.1); }
.btn-primary:active { transform: scale(.97); }

/* Auto Advance Countdown */
.auto-advance-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.auto-advance-progress {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--c-teal), var(--c-gold));
  border-radius: 3px;
  transition: width 0.1s linear;
}
.auto-advance-text {
  font-size: 0.82rem;
  color: var(--c-gold-hi);
  margin-top: -6px;
  font-weight: 500;
}

/* Burst effect placeholder */
.winner-burst { display: none; }

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.15); }
::-webkit-scrollbar-thumb { background: rgba(224,182,72,.35); border-radius: 2px; }

/* ================================================================
   RESPONSIVE — Tablet  (≥ 600 px)
   ================================================================ */
@media (min-width: 600px) {
  :root {
    --card-w:  60px; --card-h:  84px; --card-fs: .96rem;
    --card-sm-w: 42px; --card-sm-h: 58px; --card-sm-fs: .78rem;
    --card-xs-w: 30px; --card-xs-h: 42px; --card-xs-fs: .64rem;
  }
  .zone-top     { padding: 6px 12px 4px; }
  .z-hand-row   { min-height: 50px; }
  .z-melds-row  { min-height: 28px; }
  .human-hand   { min-height: 90px; }
  .zone-side    { width: 100px; }
  .discard-area { height: 70px; }
}

/* ================================================================
   RESPONSIVE — Desktop  (≥ 900 px)
   ================================================================ */
@media (min-width: 900px) {
  :root {
    --card-w:  64px; --card-h:  90px; --card-fs: 1rem;
    --card-sm-w: 46px; --card-sm-h: 64px; --card-sm-fs: .82rem;
    --card-xs-w: 33px; --card-xs-h: 46px; --card-xs-fs: .66rem;
  }
  .hud          { height: 50px; padding: 0 18px; }
  .zone-top     { padding: 7px 14px 5px; }
  .zone-side    { width: 116px; }
  .discard-area { height: 80px; max-width: 260px; }
  .human-hand   { min-height: 100px; gap: 8px; }
  .human-action-bar { gap: 10px; }
  .pickup-hint, .inline-panel { max-width: 460px; }
  .z-name       { max-width: 90px; }
  .turn-name    { max-width: 120px; }
}

/* ================================================================
   SAFE AREA (notch / home bar on iOS)
   ================================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .zone-bottom {
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  #toast-container {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}


/* ================================================================
   MULTIPLAYER ONLINE & MATCHMAKING STYLES
   ================================================================ */
.lobby-mode-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(224, 182, 72, 0.25);
  border-radius: var(--r-md);
  padding: 4px;
  gap: 6px;
  margin-bottom: 16px;
}
.mode-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: calc(var(--r-md) - 2px);
  color: var(--t-mid);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-tab:hover {
  color: #fff;
}
.mode-tab.active {
  background: linear-gradient(135deg, rgba(224, 182, 72, 0.25), rgba(224, 182, 72, 0.1));
  border-color: rgba(224, 182, 72, 0.55);
  color: #ffd700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.mode-tab-icon {
  font-size: 1.1rem;
}

/* Online Panel in Lobby */
.online-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 184, 148, 0.28);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.online-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--t-bright);
  line-height: 1.35;
}
.online-info-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.btn-start-online {
  background: linear-gradient(135deg, #00b894 0%, #00cec9 100%) !important;
  color: #032b21 !important;
  box-shadow: 0 4px 20px rgba(0, 184, 148, 0.45) !important;
}
.btn-start-online:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 28px rgba(0, 184, 148, 0.65) !important;
}

/* Matchmaking Screen & Radar Card */
.matchmaking-card {
  width: 100%;
  background: var(--s-glass);
  border: 1px solid rgba(0, 184, 148, 0.35);
  border-radius: var(--r-xl);
  padding: clamp(20px, 5vw, 36px);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 24px rgba(0, 184, 148, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.radar-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.radar-center {
  font-size: 2.2rem;
  z-index: 2;
  animation: radarBounce 2s ease-in-out infinite alternate;
}
.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(0, 206, 201, 0.7);
  animation: radarPulse 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
.radar-ring.delay {
  animation-delay: 0.9s;
}
@keyframes radarPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes radarBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.mm-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 5vw, 1.8rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}
.mm-subtitle {
  color: var(--t-mid);
  font-size: 0.82rem;
  margin-bottom: 14px;
}
.mm-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 184, 148, 0.5);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 4px;
}
.mm-timer-label {
  font-size: 0.78rem;
  color: var(--t-mid);
}
.mm-timer-val {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: #00cec9;
  letter-spacing: 1px;
}
.mm-timer-note {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 18px;
}

.mm-slots-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 20px;
}
.mm-slots-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--t-mid);
  font-weight: 600;
  margin-bottom: 10px;
}
.mm-slots-count {
  color: var(--c-gold);
}
.mm-slots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mm-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
}
.mm-slot-row.filled {
  border-color: rgba(0, 184, 148, 0.4);
  background: rgba(0, 184, 148, 0.08);
}
.mm-slot-row.is-self {
  border-color: rgba(224, 182, 72, 0.5);
  background: rgba(224, 182, 72, 0.1);
}
.mm-slot-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mm-slot-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
}
.mm-slot-badge.ready {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.4);
}
.mm-slot-badge.waiting {
  background: rgba(255, 255, 255, 0.06);
  color: var(--t-mid);
}

.mm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.btn-force-bots {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, rgba(224, 182, 72, 0.2), rgba(224, 182, 72, 0.1));
  border: 1px solid rgba(224, 182, 72, 0.45);
  border-radius: var(--r-md);
  color: #ffd700;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-force-bots:hover {
  background: rgba(224, 182, 72, 0.3);
  border-color: #ffd700;
  color: #fff;
  transform: translateY(-1px);
}
.btn-cancel-mm {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--r-md);
  color: var(--t-mid);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-cancel-mm:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* Online HUD Badge */
.online-pill {
  border-color: rgba(0, 184, 148, 0.5) !important;
  color: #00cec9 !important;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00cec9;
  display: inline-block;
  box-shadow: 0 0 8px #00cec9;
  animation: pulseDot 1.5s infinite;
  margin-right: 4px;
}
@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ================================================================
   ROOM CUSTOM (Main Bareng Teman dengan Kode Unik)
   ================================================================ */
.custom-room-split {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.cr-action-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.cr-create-box {
  border: 1px solid rgba(224, 182, 72, 0.35);
  background: linear-gradient(145deg, rgba(224, 182, 72, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.cr-create-box:hover {
  border-color: rgba(224, 182, 72, 0.6);
  box-shadow: 0 4px 18px rgba(224, 182, 72, 0.15);
}

.cr-join-box {
  border: 1px solid rgba(0, 206, 201, 0.35);
  background: linear-gradient(145deg, rgba(0, 206, 201, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.cr-join-box:hover {
  border-color: rgba(0, 206, 201, 0.6);
  box-shadow: 0 4px 18px rgba(0, 206, 201, 0.15);
}

.cr-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cr-badge-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.cr-card-texts {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cr-action-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.cr-create-box .cr-action-title {
  color: #ffd700;
}

.cr-join-box .cr-action-title {
  color: #00cec9;
}

.cr-action-desc {
  font-size: 0.76rem;
  color: var(--t-mid);
  line-height: 1.35;
}

.btn-create-cr {
  width: 100%;
  padding: 11px;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #e0b648 0%, #b8912e 100%) !important;
  color: #1a1505 !important;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(224, 182, 72, 0.35) !important;
}

.btn-create-cr:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.cr-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--t-dim);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 2px 0;
}

.cr-or-divider::before,
.cr-or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cr-or-divider span {
  padding: 0 10px;
}

.cr-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.cr-code-inp {
  flex: 1;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(0, 206, 201, 0.5);
  border-radius: var(--r-sm);
  color: #00cec9;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 12px;
  outline: none;
  transition: all 0.2s ease;
}

.cr-code-inp:focus {
  border-color: #00cec9;
  box-shadow: 0 0 12px rgba(0, 206, 201, 0.4);
}

.cr-code-inp::placeholder {
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.3);
}

.btn-join-cr {
  padding: 10px 18px;
  background: linear-gradient(135deg, #00cec9 0%, #00989e 100%);
  border: none;
  border-radius: var(--r-sm);
  color: #032b21;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-join-cr:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 206, 201, 0.4);
}

/* ── Screen: Custom Room Waiting ────────────────────── */
.custom-room-card {
  border-color: rgba(224, 182, 72, 0.45) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 28px rgba(224, 182, 72, 0.22) !important;
}

.cr-waiting-header-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
  animation: radarBounce 2s ease-in-out infinite alternate;
}

.cr-code-badge-box {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed rgba(224, 182, 72, 0.6);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cr-code-badge-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--t-mid);
  letter-spacing: 1.5px;
}

.cr-code-badge-val-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
}

.cr-code-badge-val {
  font-family: monospace;
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 4px;
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
  user-select: all;
  -webkit-user-select: all;
}

.btn-copy-code {
  padding: 6px 12px;
  background: rgba(224, 182, 72, 0.15);
  border: 1px solid rgba(224, 182, 72, 0.5);
  border-radius: var(--r-sm);
  color: #ffd700;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-copy-code:hover {
  background: rgba(224, 182, 72, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.cr-code-badge-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
  text-align: center;
}

.host-tag {
  background: rgba(224, 182, 72, 0.2);
  color: #ffd700;
  border: 1px solid rgba(224, 182, 72, 0.4);
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: bold;
  margin-left: 6px;
}

/* ── SVG Icons ────────────────────────────────────────── */
.svg-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.18em;
  fill: currentColor;
  flex-shrink: 0;
}
.svg-icon-sm {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.12em;
}
.svg-icon-lg {
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.22em;
}
.svg-icon-xl {
  width: 2.2em;
  height: 2.2em;
  vertical-align: -0.25em;
}
.svg-icon-hud {
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* ── Modern Unified Player Profile Strip ──────────────── */
.player-profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(224, 182, 72, 0.08);
  border: 1px solid rgba(224, 182, 72, 0.35);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.player-profile-strip:focus-within {
  border-color: var(--c-gold);
  background: rgba(224, 182, 72, 0.13);
  box-shadow: 0 0 16px rgba(224, 182, 72, 0.25);
}
.profile-avatar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(224, 182, 72, 0.18);
  border: 1px solid rgba(224, 182, 72, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  flex-shrink: 0;
}
.profile-avatar-icon .svg-icon {
  width: 20px;
  height: 20px;
}
.profile-input-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.profile-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--c-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.profile-name-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(224, 182, 72, 0.3);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  outline: none;
  padding: 2px 0;
  width: 100%;
  transition: border-color var(--dur-fast);
}
.profile-name-input:focus {
  border-bottom-color: var(--c-gold-hi);
}

/* ── Bot Opponents Card (Compact & Clean) ─────────────── */
.bot-opponents-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 18px;
}
.boc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.boc-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--t-mid);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.bot-row-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 480px) {
  .bot-row-grid {
    grid-template-columns: 1fr;
  }
}
.bot-col-item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.bot-col-role {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--t-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.bot-sub-input {
  background: transparent;
  border: none;
  color: var(--t-bright);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  outline: none;
  padding: 0;
  width: 100%;
}
.bot-sub-input:focus {
  color: #ffd700;
}

/* ── Online Clean Banner ──────────────────────────────── */
.online-clean-banner {
  background: rgba(0, 184, 148, 0.06);
  border: 1px solid rgba(0, 184, 148, 0.28);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ocb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--t-bright);
}
.ocb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00cec9;
  box-shadow: 0 0 8px #00cec9;
  flex-shrink: 0;
}

/* ── Avatar Tag in Slots ──────────────────────────────── */
.avatar-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ================================================================
   NEW LOBBY REDESIGN — Matching Exact Concept Art
   ================================================================ */

/* Utility: visually hidden but accessible for scripts */
.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
  pointer-events: none !important;
}

/* ── Lobby Background (Emerald Casino Felt Table) ── */
.lobby-bg {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 50%, #0d3b24 0%, #072214 55%, #020d07 100%);
  overflow-y: auto;
  overflow-x: hidden;
}

.lobby-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── Ambient Floating Playing Cards ── */
.lby-bg-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.lby-float-card {
  position: absolute;
  width: 110px;
  height: 160px;
  border-radius: 8px;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.75));
  opacity: 0.85;
  transition: transform 0.5s ease;
}

.lby-fc-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lby-fc-top-left {
  top: -20px;
  left: -15px;
  transform: rotate(-24deg);
  animation: floatCard1 8s ease-in-out infinite;
}

.lby-fc-bot-left {
  bottom: 45px;
  left: 15px;
  transform: rotate(20deg);
  animation: floatCard2 9s ease-in-out infinite;
}

.lby-fc-top-right {
  top: -30px;
  right: 280px;
  transform: rotate(28deg);
  animation: floatCard3 10s ease-in-out infinite;
}

.lby-fc-mid-right {
  top: 240px;
  right: -25px;
  transform: rotate(38deg);
  animation: floatCard1 8.5s ease-in-out infinite;
}

.lby-fc-bot-right {
  bottom: -40px;
  right: 15px;
  transform: rotate(-18deg);
  animation: floatCard2 9.5s ease-in-out infinite;
}

@keyframes floatCard1 {
  0%, 100% { transform: rotate(-24deg) translateY(0); }
  50% { transform: rotate(-22deg) translateY(-10px); }
}

@keyframes floatCard2 {
  0%, 100% { transform: rotate(20deg) translateY(0); }
  50% { transform: rotate(18deg) translateY(-8px); }
}

@keyframes floatCard3 {
  0%, 100% { transform: rotate(28deg) translateY(0); }
  50% { transform: rotate(30deg) translateY(-10px); }
}

/* ── Lobby Wrap ── */
.lby-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  padding: clamp(16px, 3vh, 32px) clamp(12px, 2.5vw, 28px);
  margin: auto;
}

/* ── Header ── */
.lby-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
  text-align: center;
}

.lby-suits {
  display: flex;
  gap: 14px;
  font-size: 1.45rem;
  justify-content: center;
  margin-bottom: 2px;
}

.lby-suit-spade, .lby-suit-club {
  color: #e4e7eb;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.lby-suit-heart, .lby-suit-diamond {
  color: #e74c3c;
  filter: drop-shadow(0 2px 6px rgba(231, 76, 60, 0.45));
}

.lby-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lby-flourish {
  width: 80px;
  height: 20px;
  display: flex;
  align-items: center;
}

.lby-flourish svg {
  width: 100%;
  height: 100%;
}

.lby-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 5px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff2b2 0%, #e5b84c 45%, #b2851e 75%, #d8a635 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 18px rgba(224, 182, 72, 0.5));
  white-space: nowrap;
  margin: 0;
  line-height: 1.1;
}

.lby-filigree-under {
  width: 170px;
  height: 18px;
  margin-top: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lby-filigree-under svg {
  width: 100%;
  height: 100%;
}

/* ── Unified Main Board ── */
.lby-board {
  display: flex;
  gap: 16px;
  align-items: stretch;
  width: 100%;
  max-width: 1100px;
  background: rgba(3, 20, 12, 0.75);
  border: 1.5px solid rgba(46, 204, 113, 0.22);
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 22px 20px;
}

/* ── Individual Game Cards ── */
.lc {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #0c1810;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.lc:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.8);
}

/* Card 1: Bot */
.lc-bot {
  background: linear-gradient(180deg, #101d14 0%, #09130d 100%);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Card 2: Online (HIGHLIGHTED WITH CYAN GLOW) */
.lc-online {
  background: linear-gradient(180deg, #071c26 0%, #031018 100%);
  border: 2px solid #00e5ff !important;
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.4), inset 0 0 18px rgba(0, 229, 255, 0.12) !important;
  background-image: radial-gradient(circle at 50% 0%, rgba(0, 229, 255, 0.45) 0%, transparent 60%);
}

.lc-online:hover {
  box-shadow: 0 0 45px rgba(0, 229, 255, 0.55), inset 0 0 24px rgba(0, 229, 255, 0.2) !important;
}

/* Card 3: Custom Room */
.lc-custom {
  background: linear-gradient(180deg, #181308 0%, #0c0a03 100%);
  border: 1.5px solid rgba(224, 182, 72, 0.45);
  box-shadow: 0 0 25px rgba(224, 182, 72, 0.16);
  background-image: radial-gradient(circle at 50% 0%, rgba(224, 182, 72, 0.3) 0%, transparent 60%);
}

.lc-custom:hover {
  box-shadow: 0 0 35px rgba(224, 182, 72, 0.28);
}

/* ── Illustrations ── */
.lc-illo {
  width: 100%;
  height: 175px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.lc-illo-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Card 2 Floating Profile Badge ── */
.lc-profile-pill {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  background: rgba(5, 22, 28, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.45);
  border-radius: 10px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.lcp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.2);
  border: 1px solid #00e5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  flex-shrink: 0;
}

.lcp-avatar svg {
  width: 16px;
  height: 16px;
}

.lcp-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 8px;
  min-width: 0;
}

.lcp-name-wrap {
  display: flex;
  align-items: center;
}

.lcp-name-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  padding: 0;
  width: 70px;
  cursor: text;
  text-overflow: ellipsis;
}

.lcp-name-input:focus {
  border-bottom: 1px solid #00e5ff;
}

.lcp-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #e0b648;
}

.lcp-trophy-icon {
  width: 11px;
  height: 11px;
}

.lcp-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.lcp-heart-tag {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #2ecc71;
}

.lcp-heart-icon {
  font-size: 0.65rem;
  color: #e74c3c;
}

.lcp-time-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  color: #80cbc4;
}

.lcp-ping-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 6px #2ecc71;
  animation: pulsePing 1.8s ease-in-out infinite;
}

@keyframes pulsePing {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ── Card Body ── */
.lc-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  justify-content: space-between;
}

.lc-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lc-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #e0b648;
  margin: 0;
  text-transform: uppercase;
}

.lc-sub {
  font-size: 0.78rem;
  color: #b7a480;
  margin: 0;
  line-height: 1.3;
}

.lc-footnote {
  font-size: 0.72rem;
  color: #8e8068;
  text-align: center;
  margin: 2px 0 0;
}

.lc-btn-rnd {
  background: rgba(224, 182, 72, 0.12);
  border: 1px solid rgba(224, 182, 72, 0.35);
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.68rem;
  color: #f7df94;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  user-select: none;
}

.lc-btn-rnd:hover {
  background: rgba(224, 182, 72, 0.25);
  color: #fff;
}

/* Action Icons Row (Card 2) */
.lc-action-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 4px 0;
}

.lc-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}

.lc-icon-btn svg {
  width: 17px;
  height: 17px;
}

.lc-icon-btn:hover {
  background: rgba(0, 229, 255, 0.2);
}

/* ── Buttons ── */
.lc-btn-primary {
  width: 100%;
  padding: 11px 0;
  background: linear-gradient(180deg, #dfaf4e 0%, #ab7a22 100%);
  color: #1a1002;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(223, 175, 78, 0.35);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.lc-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 22px rgba(223, 175, 78, 0.5);
}

.lc-btn-primary:active {
  transform: scale(0.98);
}

.lc-btn-cyan {
  width: 100%;
  padding: 11px 0;
  background: linear-gradient(180deg, #00d2d3 0%, #0097a7 100%);
  color: #00222a;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 210, 211, 0.45);
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
}

.lc-btn-cyan:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(0, 210, 211, 0.6);
}

.lc-btn-cyan:active {
  transform: scale(0.98);
}

.lc-btn-dark {
  width: 100%;
  padding: 11px 0;
  background: rgba(0, 0, 0, 0.45);
  color: #e5cb7f;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1.5px solid rgba(224, 182, 72, 0.4);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lc-btn-dark:hover {
  background: rgba(224, 182, 72, 0.15);
  border-color: #e0b648;
}

.lc-btn-dark:active {
  transform: scale(0.98);
}

/* ── Custom Room Join Code Drawer ── */
.lc-join-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.lc-code-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  margin-top: 0;
}

.lc-code-drawer.open,
.lc-code-drawer:focus-within {
  max-height: 48px;
  opacity: 1;
  margin-top: 4px;
}

.lc-code-inp {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(224, 182, 72, 0.5);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f5d070;
  font-family: 'Inter', monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
  outline: none;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lc-code-inp::placeholder {
  color: rgba(224, 182, 72, 0.35);
  letter-spacing: 2px;
  font-weight: 400;
}

.lc-code-inp:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(224, 182, 72, 0.3);
}

/* ── Section 4: INFORMASI & ATURAN ── */
.lby-info-card {
  width: 200px;
  flex-shrink: 0;
  background: rgba(5, 22, 14, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lby-info-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #e0b648;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(224, 182, 72, 0.2);
  padding-bottom: 10px;
  margin: 0;
}

.lby-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.lby-info-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lby-info-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0b648;
  box-shadow: 0 0 6px rgba(224, 182, 72, 0.8);
  margin-top: 5px;
  flex-shrink: 0;
}

.lby-info-heading {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f0e6d2;
  display: block;
}

.lby-info-desc {
  font-size: 0.72rem;
  color: #8a7f6c;
  margin: 2px 0 0;
  line-height: 1.3;
}

/* ── Responsive Behavior ── */
@media (max-width: 960px) {
  .lby-board {
    flex-wrap: wrap;
  }
  .lc {
    min-width: calc(50% - 10px);
  }
  .lby-info-card {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .lby-board {
    flex-direction: column;
    padding: 16px 14px;
  }
  .lc {
    min-width: 100%;
  }
  .lby-wrap {
    padding: 14px 10px;
  }
  .lby-title {
    font-size: 2rem;
    letter-spacing: 3px;
  }
  .lby-flourish {
    width: 45px;
  }
}
