/* Mesa — estilos de la plataforma multijugador de Arena */
.mesa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .mesa-grid { grid-template-columns: 1fr; } }

.card { background: #101827; border: 1px solid #1d2740; border-radius: 14px; padding: 16px; }
.card h2 { margin: 0 0 10px; font-size: 1.05rem; }

.jg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.jg-b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px;
  background: #0c1424; border: 1px solid #1d2740; border-radius: 12px; color: #e7ecf5;
  cursor: pointer; text-align: left; transition: border-color .15s, transform .1s; }
.jg-b:hover { border-color: #2f4470; }
.jg-b.on { border-color: #f5b301; box-shadow: 0 0 0 1px #f5b301 inset; }
.jg-i { font-size: 1.5rem; }
.jg-n { font-weight: 700; }
.jg-d { font-size: .78rem; }

.lista { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.fila { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #0c1424;
  border: 1px solid #1d2740; border-radius: 10px; }
.fila .grow { flex: 1; display: flex; flex-direction: column; }
.fila .fi { font-size: 1.2rem; }
.av-b { width: 34px; height: 34px; border-radius: 50%; background: #1d2740; color: #cdd7e8;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.chk { display: flex; align-items: center; gap: 6px; color: #a9b6cf; font-size: .9rem; }

/* overlay de sala de espera */
.overlay { position: fixed; inset: 0; background: rgba(6,10,20,.72); display: flex;
  align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.overlay.hide { display: none; }
.ov-card { max-width: 460px; width: 100%; }
.espera-jg { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.espera-j { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #0c1424;
  border: 1px solid #1d2740; border-radius: 10px; }
.espera-j.listo { border-color: #37d67a; }
.espera-j b { flex: 1; }

/* juego */
.mesa-juego { margin-top: 14px; }
.oponentes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.op { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 12px;
  background: #0c1424; border: 1px solid #1d2740; border-radius: 12px; min-width: 96px; }
.op.turno { border-color: #f5b301; box-shadow: 0 0 0 1px #f5b301 inset; }
.op.yo { background: #16223a; }
.op .nm { font-size: .86rem; font-weight: 600; }
.op .mut { font-size: .72rem; }

.tablero-wrap { display: flex; justify-content: center; margin: 6px 0 10px; }
.board { position: relative; }
.board.b-tresenraya { display: grid; grid-template-columns: repeat(3, 84px); grid-gap: 6px; }
.c3 { width: 84px; height: 84px; background: #0c1424; border: 1px solid #1d2740; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 2.4rem; cursor: pointer; }
.c3.jugable:hover { border-color: #f5b301; background: #16223a; }
.c3.f0 { color: #4f8cff; } .c3.f1 { color: #ff7a7a; }

.board.b-chess8, .board.b-checkers8 { display: grid; grid-template-columns: repeat(8, 48px);
  grid-template-rows: repeat(8, 48px); border: 2px solid #1d2740; border-radius: 8px; overflow: hidden; }
.c8 { display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.c8.light { background: #cdd5e4; } .c8.dark { background: #5b6b8c; }
.c8.sel { box-shadow: 0 0 0 3px #f5b301 inset; }
.c8.dst::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(245,179,1,.75); }
.c8 .pz { font-size: 1.9rem; line-height: 1; }
.c8 .pz.w { color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; }
.c8 .pz.b { color: #1a1f2b; }
.c8 .ficha.wP, .c8 .ficha.wK { color: #f5f7fb; text-shadow: 0 0 2px #000; }
.c8 .ficha.bP, .c8 .ficha.bK { color: #11151f; }
@media (max-width: 460px) {
  .board.b-chess8, .board.b-checkers8 { grid-template-columns: repeat(8, 38px); grid-template-rows: repeat(8, 38px); }
  .c8 .pz { font-size: 1.5rem; }
  .board.b-tresenraya { grid-template-columns: repeat(3, 72px); } .c3 { width: 72px; height: 72px; }
}

.star-svg { width: min(92vw, 460px); height: auto; touch-action: manipulation; }
.star-red line { stroke: #24314f; stroke-width: .085; pointer-events: none; }
.star-meta circle { fill: rgba(245,179,1,.13); pointer-events: none; }
.star-ultima circle { fill: none; stroke: #f59e0b; stroke-width: .16; stroke-dasharray: .5 .35;
  stroke-opacity: .85; pointer-events: none; }
.star-h { cursor: pointer; }
.star-h:hover { stroke: #f5b301; stroke-width: .8; }
.star-h.f0 { fill: #4f8cff; } .star-h.f1 { fill: #ff7a7a; } .star-h.f2 { fill: #37d67a; }
.star-h.f3 { fill: #f5b301; } .star-h.f4 { fill: #b98bff; } .star-h.f5 { fill: #41d3dd; }
.star-h.mia { stroke: #f5f7fb; stroke-width: .3; }
.star-h.sel { stroke: #f5b301; stroke-width: .95; }
.star-h.dst { stroke: #37d67a; stroke-width: .8; }
.star-h.dst.salto { stroke-dasharray: .55 .4; }
.star-ruta-p { fill: none; stroke: #f5b301; stroke-width: .34; stroke-linecap: round;
  stroke-opacity: .9; pointer-events: none; }
.star-paso { fill: #f5b301; fill-opacity: .55; pointer-events: none; }

.barra-turno { text-align: center; margin: 8px 0; }
.dom-turno { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #0c1424;
  border: 1px solid #1d2740; font-weight: 700; }
.dom-turno.mio { background: #1c2e1f; border-color: #37d67a; color: #b6f0c9; }

.chat-box { margin-top: 16px; }
.chat { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 4px;
  padding: 8px; background: #0a1120; border-radius: 10px; }
.chat-m { font-size: .9rem; }
.chat-m.sis { color: #8ea0c0; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form input { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid #1d2740;
  background: #0c1424; color: #e7ecf5; }

/* en vivo */
.vivo-cab { display: flex; align-items: center; gap: 8px; margin: 8px 0 14px; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: #37d67a; display: inline-block;
  box-shadow: 0 0 8px #37d67a; animation: pulso 1.6s infinite; }
.punto.gris { background: #6b7794; box-shadow: none; animation: none; }
@keyframes pulso { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.vivo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.vivo-card { display: block; padding: 12px; background: #101827; border: 1px solid #1d2740;
  border-radius: 12px; color: #e7ecf5; text-decoration: none; transition: border-color .15s, transform .1s; }
.vivo-card:hover { border-color: #2f4470; transform: translateY(-1px); }
.vivo-card.fin { opacity: .7; }
.vc-top { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.vc-tag { font-size: .7rem; color: #8ea0c0; border: 1px solid #24314f; border-radius: 6px; padding: 1px 6px; }
.vc-n { margin-left: auto; font-size: .82rem; color: #a9b6cf; }
.vc-jugs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.vc-j { font-size: .82rem; background: #0c1424; border: 1px solid #1d2740; border-radius: 999px;
  padding: 2px 8px; }
.vc-bot { display: flex; justify-content: space-between; font-size: .8rem; color: #a9b6cf; }
.ver-cab { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }

/* toasts (compartidos con el dominó) */
.toasts { position: fixed; right: 14px; bottom: 74px; display: flex; flex-direction: column; gap: 8px;
  z-index: 80; }
.dom-toast { background: #16223a; border: 1px solid #2f4470; border-radius: 10px; padding: 9px 13px;
  color: #e7ecf5; font-size: .9rem; max-width: 300px; }
.dom-toast.err { border-color: #85404a; background: #2a1418; }
.dom-toast.ok { border-color: #2f6b45; background: #14251b; }
