/* ============================================================
   ONLINE PvP MODE — Styles (Game-like interface)
   ============================================================ */

/* ── Lobby ────────────────────────────────────────────────── */
.pvp-lobby {
  width: 100%; min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1a1145 0%, #0a0a1a 60%);
  box-sizing: border-box;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}

/* Loading state */
.pvp-lobby-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; gap: 16px;
}
.pvp-lobby-loading p { color: #94a3b8; font-size: 1.05rem; }

/* ── Top Bar ──────────────────────────────────────────────── */
.pvp-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: linear-gradient(180deg, #0f0b2e 0%, transparent 100%);
  border-bottom: 1px solid #2d1f6e44;
  position: sticky; top: 0; z-index: 10;
}
.pvp-topbar-back {
  background: none; border: 1px solid #4338ca55; color: #a78bfa;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: .85rem;
  transition: all .2s;
}
.pvp-topbar-back:hover { background: #4338ca33; border-color: #a78bfa; }
.pvp-topbar-title {
  display: flex; align-items: center; gap: 8px;
  color: #e2e8f0; font-size: 1.2rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}
.pvp-topbar-icon { font-size: 1.4rem; }
.pvp-topbar-tools {
  flex: 1;
  display: flex; justify-content: center; align-items: center; gap: 8px;
}
.pvp-topbar-tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, .08);
  border: 1px solid rgba(99, 102, 241, .35);
  border-radius: 6px;
  color: #c7d2fe;
  font-size: .82rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.pvp-topbar-tool-btn:hover {
  background: rgba(99, 102, 241, .2);
  border-color: #a78bfa;
  color: #fff;
}
.pvp-topbar-tool-icon { font-size: 1rem; }
@media (max-width: 720px) {
  .pvp-topbar-title span:last-child { display: none; } /* só o ícone ⚔️ */
  .pvp-topbar-tool-btn { padding: 5px 9px; font-size: .75rem; }
  .pvp-topbar-tool-label { display: none; } /* só ícones */
  .pvp-topbar-tool-icon { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .pvp-topbar { padding: 8px 12px; gap: 8px; }
  .pvp-topbar-back { padding: 4px 10px; font-size: .75rem; }
  .pvp-topbar-username { font-size: .8rem; padding: 3px 8px; }
  .pvp-topbar-winrate { display: none; }
}
.pvp-topbar-user {
  display: flex; align-items: center; gap: 10px;
}
.pvp-topbar-username {
  color: #a78bfa; font-weight: 600; font-size: .95rem;
  background: #1e1b4b; padding: 4px 12px; border-radius: 6px;
  border: 1px solid #4338ca44;
}
.pvp-topbar-winrate {
  color: #fbbf24; font-size: .8rem; font-weight: 700;
}

/* ── Arena Grid (Profile + Create + Ranking) ──────────────── */
.pvp-arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 24px 24px 0;
}

/* Profile card */
.pvp-profile-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f0a2a 100%);
  border: 1px solid #4338ca55;
  border-radius: 14px;
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  box-shadow: 0 0 30px #4338ca15;
}
.pvp-profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; border: 3px solid #a78bfa44;
  box-shadow: 0 0 20px #6366f133;
}
.pvp-profile-name {
  color: #e2e8f0; font-size: 1.15rem; font-weight: 700;
}
.pvp-profile-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; width: 100%; margin-top: 8px;
}
.pvp-pstat {
  display: flex; flex-direction: column; align-items: center;
  background: #0f0a2a; border-radius: 8px; padding: 8px 4px;
  border: 1px solid #1e1b4b;
}
.pvp-pstat-num { color: #e2e8f0; font-size: 1.1rem; font-weight: 700; }
.pvp-pstat-lbl { color: #64748b; font-size: .65rem; margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }

/* Create room card */
.pvp-create-card {
  background: linear-gradient(135deg, #0f172a 0%, #0a1628 100%);
  border: 1px solid #1e3a5f55;
  border-radius: 14px;
  padding: 24px 20px;
  display: flex; flex-direction: column;
  gap: 16px;
  box-shadow: 0 0 30px #2563eb10;
}
.pvp-create-card-title {
  color: #60a5fa; font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.pvp-create-card-form {
  display: flex; flex-direction: column; gap: 10px; flex: 1;
  justify-content: center;
}
.pvp-create-input {
  padding: 12px 14px; background: #0a0a1a; border: 1px solid #1e3a5f;
  border-radius: 8px; color: #e2e8f0; font-size: .95rem; outline: none;
  transition: border-color .2s;
}
.pvp-create-input:focus { border-color: #3b82f6; box-shadow: 0 0 12px #3b82f622; }
.pvp-create-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff; border: none; padding: 12px 22px; border-radius: 10px;
  cursor: pointer; font-weight: 700; font-size: 1rem;
  letter-spacing: .5px; transition: all .2s;
  box-shadow: 0 4px 16px #2563eb33;
}
.pvp-create-btn:hover { background: linear-gradient(135deg, #3b82f6, #2563eb); transform: translateY(-1px); box-shadow: 0 6px 20px #2563eb44; }
.pvp-create-btn:disabled { opacity: .5; transform: none; }

/* Ranking card */
.pvp-ranking-card {
  background: linear-gradient(135deg, #1a1506 0%, #0f0a02 100%);
  border: 1px solid #92400e44;
  border-radius: 14px;
  padding: 20px;
  display: flex; flex-direction: column;
  gap: 10px;
  box-shadow: 0 0 30px #f59e0b08;
  overflow: hidden;
}
.pvp-ranking-title {
  color: #fbbf24; font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.pvp-ranking-empty { color: #64748b; font-size: .85rem; text-align: center; padding: 20px 0; }
.pvp-ranking-list { display: flex; flex-direction: column; gap: 4px; }
.pvp-ranking-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px;
  background: #1a150688; transition: background .15s;
}
.pvp-ranking-row:hover { background: #1a1506cc; }
.pvp-ranking-row.pvp-ranking-top {
  background: linear-gradient(90deg, #92400e22, transparent);
  border-left: 2px solid #fbbf24;
}
.pvp-ranking-pos { width: 28px; text-align: center; font-size: .9rem; }
.pvp-ranking-name { flex: 1; color: #e2e8f0; font-size: .85rem; font-weight: 500; }
.pvp-ranking-streak { color: #f97316; font-size: .75rem; font-weight: 700; }
.pvp-ranking-score { color: #92400e; font-size: .75rem; }

/* ── Room List Section ────────────────────────────────────── */
.pvp-rooms-section {
  padding: 24px;
  flex: 1;
}
.pvp-rooms-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.pvp-rooms-title {
  color: #e2e8f0; font-size: 1.1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.pvp-rooms-count {
  color: #64748b; font-size: .8rem;
  background: #1e293b; padding: 4px 10px; border-radius: 10px;
}
.pvp-rooms-empty {
  text-align: center; color: #64748b; padding: 48px 20px;
  background: #0f172a44; border-radius: 14px;
  border: 1px dashed #1e293b;
}
.pvp-rooms-empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.pvp-rooms-empty p { margin: 0; font-size: .95rem; }

/* Room tiles grid */
.pvp-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.pvp-room-tile {
  background: linear-gradient(135deg, #0f172a 0%, #0a0f1e 100%);
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.pvp-room-tile::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #4338ca, transparent);
  opacity: 0; transition: opacity .3s;
}
.pvp-room-tile:hover { border-color: #4338ca55; transform: translateY(-2px); box-shadow: 0 8px 24px #0006; }
.pvp-room-tile:hover::before { opacity: 1; }
.pvp-room-tile.playing { border-color: #f59e0b33; }
.pvp-room-tile.playing::before { background: linear-gradient(90deg, transparent, #f59e0b, transparent); opacity: .6; }

.pvp-room-tile-top { display: flex; justify-content: flex-end; }
.pvp-room-tile-status {
  font-size: .7rem; padding: 3px 10px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600;
  background: #334155; color: #94a3b8;
}
.pvp-room-tile-status.waiting { background: #065f4622; color: #34d399; }
.pvp-room-tile-status.deck-select { background: #4338ca22; color: #a78bfa; }
.pvp-room-tile-status.playing { background: #f59e0b18; color: #fbbf24; }

.pvp-room-tile-name {
  color: #e2e8f0; font-weight: 700; font-size: 1.05rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pvp-room-tile-players {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: #94a3b8; font-size: .8rem;
}
.pvp-room-tile-host { color: #a78bfa; }
.pvp-room-tile-streak {
  background: linear-gradient(90deg, #f97316, #dc2626);
  color: #fff; padding: 1px 7px; border-radius: 8px; font-size: .7rem; font-weight: 700;
}
.pvp-room-tile-vs { color: #64748b; }
.pvp-room-tile-spec { color: #64748b; font-size: .75rem; }

.pvp-room-tile-btn {
  width: 100%; padding: 10px; border: none; border-radius: 8px;
  font-weight: 700; font-size: .9rem; cursor: pointer;
  transition: all .2s; margin-top: 4px;
  letter-spacing: .5px;
}
.pvp-room-tile-btn.join {
  background: linear-gradient(135deg, #059669, #047857);
  color: #fff; box-shadow: 0 4px 12px #05966933;
}
.pvp-room-tile-btn.join:hover { background: linear-gradient(135deg, #10b981, #059669); transform: translateY(-1px); }
.pvp-room-tile-btn.watch {
  background: linear-gradient(135deg, #4338ca, #3730a3);
  color: #e2e8f0; box-shadow: 0 4px 12px #4338ca22;
}
.pvp-room-tile-btn.watch:hover { background: linear-gradient(135deg, #6366f1, #4338ca); }
.pvp-room-tile-btn.own {
  background: #1e293b; color: #64748b;
  cursor: default; box-shadow: none;
}
.pvp-room-tile-btn:disabled { opacity: .5; cursor: default; transform: none; }

/* ── Room (waiting, deck-select, playing) ─────────────────── */
.pvp-room {
  width: 100%; min-height: 100vh; padding: 24px 32px;
  background: var(--bg, #0a0a1a); box-sizing: border-box;
  align-self: stretch;
}
.pvp-room-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.pvp-room-header h2 { margin: 0; color: #e2e8f0; flex: 1; font-size: 1.5rem; }
.pvp-badge {
  background: #1e293b; color: #94a3b8; padding: 6px 16px;
  border-radius: 8px; font-size: .85rem;
}

/* Waiting animation */
.pvp-waiting { text-align: center; }
.pvp-waiting-anim { padding: 60px 0; }
.pvp-pulse {
  font-size: 4rem;
  animation: pvpPulse 2s ease-in-out infinite;
}
@keyframes pvpPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: .7; }
}
.pvp-waiting-anim p { color: #94a3b8; margin-top: 16px; font-size: 1.05rem; }

.pvp-spectators { margin-top: 24px; }
.pvp-spectators h4 { color: #94a3b8; font-size: .9rem; }
.pvp-spectator-name {
  display: inline-block; background: #1e293b; color: #e2e8f0;
  padding: 4px 12px; border-radius: 6px; margin: 4px; font-size: .85rem;
}

.btn-leave {
  background: #7f1d1d; color: #fca5a5; border: none; padding: 10px 22px;
  border-radius: 8px; cursor: pointer; font-size: .9rem;
  transition: background .2s;
}
.btn-leave:hover { background: #991b1b; }

/* ── Deck Select ──────────────────────────────────────────── */
.pvp-deck-prompt { text-align: center; padding: 40px 0; }
.pvp-deck-prompt p { color: #94a3b8; margin-bottom: 20px; font-size: 1.05rem; }
.pvp-room-members { margin-top: 24px; }
.pvp-room-members h4 { color: #94a3b8; font-size: .9rem; margin-bottom: 10px; }
.pvp-member { color: #e2e8f0; padding: 6px 0; font-size: 1rem; }

/* ── Playing ──────────────────────────────────────────────── */
.pvp-playing { padding: 0; }
.pvp-game-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #0f172a; border-bottom: 1px solid #1e293b;
}
.pvp-game-info { color: #fbbf24; font-weight: bold; font-size: 1rem; }
.pvp-room-name-sm { color: #64748b; font-size: .8rem; }
.btn-leave-sm {
  background: none; border: none; color: #f87171; font-size: 1.2rem;
  cursor: pointer; padding: 4px 8px;
}

/* Waiting overlay — removed; non-blocking indicator used instead */

/* Non-blocking waiting indicator */
.pvp-subtle-wait {
  text-align: center;
  animation: pvpPulse 2s ease-in-out infinite;
}

/* ── Game Over ────────────────────────────────────────────── */
.pvp-gameover { text-align: center; padding-top: 40px; }
.pvp-gameover-banner { }
.pvp-gameover-icon { font-size: 5rem; margin-bottom: 20px; }
.pvp-gameover-banner h2 { color: #fbbf24; font-size: 2.2rem; }
.pvp-gameover-banner p { color: #94a3b8; margin-top: 10px; font-size: 1.05rem; }

/* ── PvP Reward Selection ────────────────────────────────── */
.pvp-reward-subtitle {
  color: #4ade80 !important;
  font-weight: 600;
  font-size: 1.1rem !important;
}
.pvp-reward-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 700px;
  margin: 24px auto 16px;
  padding: 0 12px;
  max-height: 50vh;
  overflow-y: auto;
}
.pvp-reward-card {
  position: relative;
  width: 110px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.pvp-reward-card:hover {
  border-color: #60a5fa;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(96,165,250,.25);
}
.pvp-reward-card.selected {
  border-color: #4ade80;
  background: linear-gradient(145deg, #14532d, #0f172a);
  box-shadow: 0 0 16px rgba(74,222,128,.35);
}
.pvp-reward-card.spell { border-color: #8b5cf6; }
.pvp-reward-card.spell.selected { border-color: #4ade80; }
.pvp-reward-card.trap { border-color: #f97316; }
.pvp-reward-card.trap.selected { border-color: #4ade80; }
.pvp-reward-card-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 auto 6px;
  display: block;
}
.pvp-reward-card-icon {
  font-size: 3rem;
  margin-bottom: 6px;
}
.pvp-reward-card-name {
  font-size: .72rem;
  color: #e2e8f0;
  font-weight: 600;
  line-height: 1.2;
  min-height: 2.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pvp-reward-card-stats {
  font-size: .68rem;
  color: #94a3b8;
  margin-top: 4px;
}
.pvp-reward-card-type {
  font-size: .68rem;
  color: #c4b5fd;
  margin-top: 4px;
}
.pvp-reward-check {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: #4ade80;
  color: #0f172a;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(74,222,128,.5);
}
.pvp-reward-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pvp-reward-claim-btn {
  padding: 10px 28px;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.pvp-reward-claim-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 16px rgba(34,197,94,.4);
}
.pvp-reward-claim-btn:disabled {
  opacity: .5;
  cursor: default;
}
.pvp-reward-skip-btn {
  padding: 10px 20px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}
.pvp-reward-skip-btn:hover {
  color: #e2e8f0;
  border-color: #64748b;
}

/* ── PvP Game Container ──────────────────────────────────── */
.pvp-game-container {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.pvp-battle-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px; gap: 12px;
  width: 100%;
}
.pvp-turn-indicator {
  display: flex; flex-direction: column; align-items: center;
  color: #fbbf24; font-size: .85rem; gap: 2px;
}

/* .pvp-board no longer needed — using standard .board-scene/.board-wrapper/.board */

/* PvP hand — now using standard .hand-area/.hand classes from styles.css */

/* PvP controls */
.pvp-controls { display: flex; justify-content: center; padding: 10px; }

/* PvP log */
.pvp-log {
  max-height: 140px; overflow-y: auto; padding: 10px;
  background: #0a0a1a; border-top: 1px solid #1e293b;
}
.pvp-log .log-entry {
  font-size: .75rem; color: #94a3b8; padding: 3px 0;
  border-bottom: 1px solid #1e293b11;
}
.pvp-log .log-entry.battle { color: #f87171; }
.pvp-log .log-entry.summon { color: #60a5fa; }
.pvp-log .log-entry.spell  { color: #a78bfa; }
.pvp-log .log-entry.system { color: #fbbf24; }
.pvp-log .log-entry.info   { color: #94a3b8; }

/* ── PvP Game Top Bar (inside Game component) ─────────────── */
.pvp-game-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #0f0b2e, #0a0a1a);
  border-bottom: 1px solid #4338ca33;
}
.pvp-game-topbar .pvp-topbar-leave {
  background: none; border: 1px solid #7f1d1d; color: #f87171;
  padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: .8rem;
  transition: all .2s;
}
.pvp-game-topbar .pvp-topbar-leave:hover { background: #7f1d1d44; }
.pvp-game-topbar .pvp-topbar-turn {
  flex: 1; text-align: center; font-size: .85rem; font-weight: 700;
}
.pvp-game-topbar .pvp-topbar-room {
  color: #64748b; font-size: .75rem;
}

/* ── Ranking card extras ─────────────────────────────────── */
.pvp-ranking-rank-icon { font-size: .85rem; }
.pvp-ranking-more-btn {
  width: 100%; margin-top: 10px; padding: 8px;
  background: linear-gradient(135deg, #92400e22, #78350f33);
  color: #fbbf24; border: 1px solid #92400e44; border-radius: 8px;
  cursor: pointer; font-weight: 600; font-size: .8rem;
  transition: all .2s; letter-spacing: .3px;
}
.pvp-ranking-more-btn:hover { background: linear-gradient(135deg, #92400e44, #78350f55); border-color: #fbbf24; }

/* ── Leaderboard Full Page ───────────────────────────────── */
.lb-page {
  width: 100%; min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, #1a1145 0%, #0a0a1a 60%);
  box-sizing: border-box; display: flex; flex-direction: column;
}
.lb-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px;
  background: linear-gradient(180deg, #0f0b2e, transparent);
  border-bottom: 1px solid #2d1f6e44;
  position: sticky; top: 0; z-index: 10;
}
.lb-topbar-title {
  flex: 1; display: flex; align-items: center; gap: 8px;
  color: #fbbf24; font-size: 1.2rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
}

/* Filters */
.lb-filters {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 16px 24px; align-items: flex-end;
  background: #0f0b2e55; border-bottom: 1px solid #1e1b4b44;
}
.lb-filter-group {
  display: flex; flex-direction: column; gap: 4px; position: relative;
}
.lb-filter-label {
  color: #64748b; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.lb-filter-tabs { display: flex; gap: 4px; }
.lb-filter-tab {
  padding: 6px 14px; border-radius: 6px;
  background: #1e293b; color: #94a3b8; border: 1px solid #1e293b;
  cursor: pointer; font-size: .8rem; font-weight: 600;
  transition: all .15s;
}
.lb-filter-tab:hover { background: #334155; color: #e2e8f0; }
.lb-filter-tab.active {
  background: linear-gradient(135deg, #4338ca, #3730a3);
  color: #fff; border-color: #6366f1;
  box-shadow: 0 2px 8px #4338ca44;
}
.lb-filter-input {
  padding: 6px 12px; background: #0f172a; border: 1px solid #1e293b;
  border-radius: 6px; color: #e2e8f0; font-size: .8rem; outline: none;
  width: 160px; transition: border-color .2s;
}
.lb-filter-input:focus { border-color: #4338ca; }
.lb-filter-clear {
  position: absolute; right: 6px; bottom: 6px;
  background: none; border: none; color: #64748b; cursor: pointer;
  font-size: .75rem; padding: 2px 4px;
}
.lb-filter-clear:hover { color: #f87171; }

/* My rank highlight */
.lb-my-rank {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(90deg, transparent, #4338ca15, transparent);
  color: #a5b4fc; font-size: .9rem;
}
.lb-my-rank-tier { font-weight: 700; }

/* Loading / Empty */
.lb-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 0; gap: 12px;
}
.lb-loading p { color: #94a3b8; font-size: .95rem; }
.lb-empty {
  text-align: center; color: #64748b; padding: 60px 20px;
}
.lb-empty p { margin-top: 12px; }

/* Table */
.lb-table {
  padding: 0 24px 24px; flex: 1;
}
.lb-table-header, .lb-row {
  display: grid;
  grid-template-columns: 50px 1.5fr .8fr 50px 50px 60px 90px 60px;
  align-items: center; gap: 4px;
  padding: 8px 12px;
}
.lb-table-header {
  color: #64748b; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid #1e293b;
  position: sticky; top: 48px; background: #0e0a24; z-index: 5;
}
.lb-row {
  border-bottom: 1px solid #1e293b22;
  border-radius: 6px; transition: background .15s;
  font-size: .85rem; color: #e2e8f0;
}
.lb-row:hover { background: #1e293b44; }
.lb-row-top {
  background: linear-gradient(90deg, #92400e11, transparent);
  border-left: 2px solid #fbbf24;
}
.lb-row-me {
  background: linear-gradient(90deg, #4338ca22, transparent) !important;
  border-left: 2px solid #a5b4fc;
}

/* Columns */
.lb-col-pos { text-align: center; font-weight: 700; font-size: .95rem; }
.lb-col-player { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.lb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #4338ca, #1e1b4b);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  border: 2px solid #4338ca44;
}
.lb-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lb-avatar-letter { color: #a5b4fc; font-weight: 700; font-size: .8rem; }
.lb-player-name {
  font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.lb-col-rank {
  display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: .8rem;
}
.lb-rank-icon { font-size: .9rem; }
.lb-rank-label { font-size: .75rem; }
.lb-col-wins { text-align: center; color: #4ade80; font-weight: 600; }
.lb-col-losses { text-align: center; color: #f87171; font-weight: 600; }
.lb-col-wr { text-align: center; font-weight: 700; color: #fbbf24; }
.lb-col-streak { text-align: center; display: flex; align-items: center; gap: 3px; justify-content: center; }
.lb-streak-fire { color: #f97316; font-weight: 700; }
.lb-streak-max { color: #64748b; font-size: .65rem; }
.lb-col-leader { text-align: center; }
.lb-leader-info { display: flex; align-items: center; justify-content: center; }
.lb-leader-img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }

/* ── Lobby Live Preview (in-progress matches) ─────────────── */
.pvp-room-tile-live {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 2px;
}
.pvp-live-badge {
  font-size: .65rem; font-weight: 700; color: #ef4444;
  background: #ef444418; padding: 2px 8px; border-radius: 8px;
  animation: pvpPulse 2s ease-in-out infinite;
}
.pvp-live-lp { font-size: .75rem; color: #f87171; font-weight: 600; }
.pvp-live-turn { font-size: .7rem; color: #64748b; }

/* ── Spectator Badge ─────────────────────────────────────── */
.spectator-badge {
  background: #4338ca33 !important; color: #a5b4fc !important;
  border: 1px solid #4338ca55;
}

/* ── Spectator Matchup Preview (deck-select) ─────────────── */
.spectator-matchup-preview {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; margin: 24px 0; padding: 20px;
  background: linear-gradient(135deg, #1e1b4b22, #0f172a44);
  border: 1px solid #4338ca33; border-radius: 14px;
}
.spectator-matchup-player {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 120px;
}
.spectator-matchup-icon { font-size: 2rem; }
.spectator-matchup-name { color: #e2e8f0; font-weight: 700; font-size: 1.05rem; }
.spectator-matchup-status { font-size: .8rem; color: #94a3b8; }
.spectator-matchup-vs {
  color: #f59e0b; font-size: 1.4rem; font-weight: 900;
  text-shadow: 0 0 12px #f59e0b44;
}

/* ── Spectator HUD (playing) ─────────────────────────────── */
.spectator-wrapper {
  display: flex; flex-direction: column; width: 100%;
  min-height: 100vh; background: #0a0a1a;
}
.spectator-hud {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(180deg, #1e1b4b, #0f0b2e);
  border-bottom: 2px solid #4338ca44;
  z-index: 20; position: sticky; top: 0;
}
.spectator-hud-left {
  display: flex; align-items: center; gap: 8px;
}
.spectator-hud-badge {
  font-size: .7rem; font-weight: 700; color: #a5b4fc;
  background: #4338ca33; padding: 3px 10px; border-radius: 8px;
  border: 1px solid #4338ca55; letter-spacing: .5px;
  animation: spectatorGlow 3s ease-in-out infinite;
}
@keyframes spectatorGlow {
  0%, 100% { box-shadow: 0 0 6px #4338ca33; }
  50% { box-shadow: 0 0 14px #6366f155; }
}
.spectator-hud-scoreboard {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.spectator-player {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 8px;
  background: #0f172a; border: 1px solid #1e293b;
  transition: all .3s;
}
.spectator-player.active-turn {
  border-color: #fbbf2488;
  background: linear-gradient(135deg, #1a150f, #0f172a);
  box-shadow: 0 0 12px #fbbf2422;
}
.spectator-player-icon { font-size: .9rem; }
.spectator-player-name { color: #e2e8f0; font-weight: 600; font-size: .8rem; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spectator-player-lp { color: #f87171; font-size: .75rem; font-weight: 700; }
.spectator-player-sp { color: #fbbf24; font-size: .75rem; font-weight: 600; }
.spectator-player-info { color: #64748b; font-size: .7rem; }
.spectator-vs {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 40px;
}
.spectator-vs-icon { font-size: .9rem; }
.spectator-turn-num { font-size: .6rem; color: #94a3b8; font-weight: 700; }
.spectator-hud-right {
  display: flex; align-items: center; gap: 8px;
}
.spectator-hud-viewers { color: #a5b4fc; font-size: .75rem; font-weight: 600; }
.spectator-hud-room { color: #64748b; font-size: .7rem; }

/* Spectator topbar inside Game component */
.pvp-game-topbar.spectator-mode {
  background: linear-gradient(180deg, #1e1b4b, #0a0a1a);
  border-bottom-color: #4338ca55;
}
.spectator-turn-label { letter-spacing: .3px; }

/* ── Spectator Viewers Bar (bottom) ──────────────────────── */
.spectator-viewers-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 16px;
  background: #0f0b2e; border-top: 1px solid #4338ca22;
}
.spectator-viewers-label { color: #64748b; font-size: .75rem; font-weight: 600; }
.spectator-viewer-name {
  background: #1e293b; color: #a5b4fc; font-size: .75rem;
  padding: 3px 10px; border-radius: 6px;
  border: 1px solid #4338ca33;
}

/* ── Spectator Game Over Detail ──────────────────────────── */
.spectator-gameover-detail { margin-top: 12px; }
.spectator-gameover-winner { color: #fbbf24; font-size: 1.15rem; font-weight: 700; }
.spectator-gameover-loser { color: #94a3b8; font-size: .95rem; margin-top: 4px; }
.spectator-gameover-turns { color: #64748b; font-size: .8rem; margin-top: 8px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pvp-arena-grid { grid-template-columns: 1fr 1fr; }
  .pvp-ranking-card { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .lb-table-header, .lb-row {
    grid-template-columns: 40px 1.2fr .7fr 40px 40px 50px 70px 40px;
    font-size: .78rem; padding: 6px 8px;
  }
  .lb-rank-label { display: none; }
  .lb-streak-max { display: none; }
}
@media (max-width: 700px) {
  .pvp-arena-grid { grid-template-columns: 1fr; padding: 16px; }
  .pvp-rooms-section { padding: 16px; }
  .pvp-topbar { padding: 10px 16px; }
  .pvp-topbar-title { font-size: 1rem; }
  .pvp-rooms-grid { grid-template-columns: 1fr; }
  .spectator-hud { flex-wrap: wrap; padding: 6px 8px; }
  .spectator-hud-scoreboard { order: 3; width: 100%; justify-content: center; }
  .spectator-player-name { max-width: 60px; }
  .spectator-matchup-preview { flex-direction: column; gap: 12px; }
  .lb-filters { padding: 12px 16px; gap: 10px; }
  .lb-table { padding: 0 12px 16px; }
  .lb-table-header, .lb-row {
    grid-template-columns: 32px 1fr 32px 36px 36px 45px;
    font-size: .75rem;
  }
  .lb-col-rank { display: none; }
  .lb-col-leader { display: none; }
  .lb-col-streak .lb-streak-max { display: none; }
  .lb-topbar { padding: 10px 16px; }
  .lb-topbar-title { font-size: 1rem; }
}
@media (max-width: 600px) {
  .pvp-lobby { padding: 12px 14px; }
  .pvp-lobby-header h2 { font-size: 1.2rem; }
  .pvp-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pvp-create-form { flex-direction: column; }
  .pvp-room-grid { grid-template-columns: 1fr; }
  .pvp-room-card { flex-direction: column; gap: 10px; align-items: stretch; }
  .pvp-room-actions { flex-direction: row; justify-content: space-between; margin-left: 0; }
  .pvp-room { padding: 12px 14px; }
  .pvp-room-header h2 { font-size: 1.2rem; }
}
