/* ============================================================
   DESMOCHEE · TABLE ARENA APPLY
   ------------------------------------------------------------
   Integración visual del concepto Arena sobre la mesa real.
   Cambios intencionales:
   - abrir más espacio entre bots
   - bajar el motivo/SVG del tapete para que no compita con mazo/descarte
   - hacer el centro más abierto para apreciar el fondo
   - subir visualmente la mano del jugador
   - no tocar JavaScript ni IDs funcionales
   ============================================================ */

.game-screen.game-screen-arena .pilot-table {
  gap: 8px !important;
}

/* El motivo del tapete baja un poco en la composición Arena. */
.game-screen.game-screen-arena.collection-game-skin.collection-table-has-motif .pilot-table::before {
  inset: 6% 6% 13% !important;
  opacity: .46 !important;
  -webkit-mask-position: center 57% !important;
  mask-position: center 57% !important;
  -webkit-mask-size: min(62vw, 270px) min(62vw, 270px) !important;
  mask-size: min(62vw, 270px) min(62vw, 270px) !important;
}

.game-screen.game-screen-arena.collection-game-skin:not(.collection-table-has-motif) .pilot-table::before {
  opacity: .34 !important;
}

/* Anillo suave Arena dentro del tapete. */
.game-screen.game-screen-arena .pilot-table::after {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  left: 10px !important;
  right: 10px !important;
  top: 90px !important;
  bottom: 158px !important;
  pointer-events: none !important;
  border: 1px solid rgba(255,255,255,.055) !important;
  border-radius: 44px 44px 26px 26px / 28px 28px 18px 18px !important;
  background: radial-gradient(circle at 50% 36%, rgba(255,255,255,.030), transparent 43%) !important;
  box-shadow:
    inset 0 0 0 6px rgba(0,0,0,.05),
    inset 0 22px 46px rgba(255,255,255,.010),
    inset 0 -22px 44px rgba(0,0,0,.10) !important;
}

.game-screen.game-screen-arena .pilot-header,
.game-screen.game-screen-arena .lab-toolbar,
.game-screen.game-screen-arena .bots-area,
.game-screen.game-screen-arena .table-center,
.game-screen.game-screen-arena .human-zone,
.game-screen.game-screen-arena .pilot-actions {
  z-index: 2 !important;
}

/* -----------------------------
   BOTS · más separados, más sensación de arena
   ----------------------------- */
.game-screen.game-screen-arena .bots-area {
  gap: 16px !important;
  padding: 0 6px 2px !important;
  align-items: start !important;
}

.game-screen.game-screen-arena .bots-area.count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(1),
.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(3) {
  margin-top: 24px !important;
}

.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(2) {
  margin-top: 0 !important;
  transform: translateY(-4px) !important;
}

.game-screen.game-screen-arena .bots-area.count-2 {
  gap: 22px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.game-screen.game-screen-arena .bots-area.count-1 {
  padding-left: 32px !important;
  padding-right: 32px !important;
}

.game-screen.game-screen-arena .bot-seat {
  padding: 7px 6px 8px !important;
  border-radius: 14px !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.028), rgba(255,255,255,.008)),
    rgba(4, 25, 18, .28) !important;
}

/* -----------------------------
   CENTRO · menos caja, más mesa visible
   ----------------------------- */
.game-screen.game-screen-arena .table-center {
  min-height: 188px !important;
  padding: 10px 10px 8px !important;
  justify-content: flex-start !important;
  border-color: rgba(255,255,255,.05) !important;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.018), transparent 50%),
    rgba(2, 16, 12, .14) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.025),
    inset 0 12px 28px rgba(255,255,255,.008),
    0 10px 22px rgba(0,0,0,.08) !important;
}

.game-screen.game-screen-arena .turn-message {
  margin-bottom: 12px !important;
}

.game-screen.game-screen-arena .piles {
  gap: 38px !important;
  justify-content: center !important;
}

.game-screen.game-screen-arena .pilot-status {
  margin-top: 10px !important;
  text-align: center !important;
}

/* -----------------------------
   ZONA HUMANA · mano un poco más arriba
   ----------------------------- */
.game-screen.game-screen-arena .human-zone {
  padding: 9px 8px 7px !important;
}

.game-screen.game-screen-arena .human-title {
  padding-bottom: 6px !important;
}

.game-screen.game-screen-arena .human-melds-zone {
  margin-bottom: 6px !important;
}

.game-screen.game-screen-arena .hand-workspace {
  min-height: 136px !important;
  gap: 6px !important;
  align-items: start !important;
}

.game-screen.game-screen-arena .human-hand {
  min-height: 128px !important;
  padding: 54px 0 0 !important;
}

.game-screen.game-screen-arena .special-card-slot {
  min-height: 126px !important;
}

.game-screen.game-screen-arena .hand-hint {
  margin-top: -1px !important;
}

.game-screen.game-screen-arena .human-draft-zone {
  margin-top: 5px !important;
}

.game-screen.game-screen-arena .pilot-actions {
  margin-top: -2px !important;
}

/* Display-fit también usa Arena. */
.game-screen.game-screen-arena.display-fit .bots-area {
  gap: 14px !important;
  padding: 0 5px 1px !important;
}

.game-screen.game-screen-arena.display-fit .bots-area.count-3 .bot-seat:nth-child(1),
.game-screen.game-screen-arena.display-fit .bots-area.count-3 .bot-seat:nth-child(3) {
  margin-top: 18px !important;
}

.game-screen.game-screen-arena.display-fit .table-center {
  min-height: 170px !important;
}

.game-screen.game-screen-arena.display-fit .human-zone {
  padding-top: 8px !important;
}

.game-screen.game-screen-arena.display-fit .human-hand {
  min-height: 118px !important;
  padding-top: 48px !important;
}

@media (max-width: 390px) {
  .game-screen.game-screen-arena .pilot-table::after {
    top: 86px !important;
    bottom: 152px !important;
    left: 8px !important;
    right: 8px !important;
  }

  .game-screen.game-screen-arena .bots-area {
    gap: 12px !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(1),
  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(3) {
    margin-top: 18px !important;
  }

  .game-screen.game-screen-arena .bot-seat-title {
    font-size: .66rem !important;
  }

  .game-screen.game-screen-arena .bot-seat-count {
    font-size: .53rem !important;
  }

  .game-screen.game-screen-arena .piles {
    gap: 28px !important;
  }
}

/* ============================================================
   ARENA 2.2 · CORRECCIÓN DE FIDELIDAD AL MOCKUP APROBADO
   ------------------------------------------------------------
   La primera aplicación todavía conservaba demasiados paneles.
   Esta capa abre el centro y aligera la zona humana para que el
   tapete y su motivo sean realmente visibles.
   ============================================================ */

/* 1) El tapete manda: más aire y menos cajas superpuestas. */
.game-screen.game-screen-arena .pilot-table {
  gap: 4px !important;
}

/* Anillo Arena más visible y colocado en la zona de juego. */
.game-screen.game-screen-arena .pilot-table::after {
  left: 14px !important;
  right: 14px !important;
  top: 92px !important;
  bottom: 214px !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 46% 46% 32% 32% / 23% 23% 18% 18% !important;
  background:
    radial-gradient(circle at 50% 37%, rgba(255,255,255,.030), transparent 46%) !important;
  box-shadow:
    inset 0 0 0 8px rgba(0,0,0,.040),
    inset 0 0 42px rgba(0,0,0,.065) !important;
}

/* El SVG baja detrás de mazo/mano y gana presencia. */
.game-screen.game-screen-arena.collection-game-skin.collection-table-has-motif .pilot-table::before {
  inset: 7% 5% 10% !important;
  opacity: .58 !important;
  -webkit-mask-position: center 58% !important;
  mask-position: center 58% !important;
  -webkit-mask-size: min(68vw, 292px) min(68vw, 292px) !important;
  mask-size: min(68vw, 292px) min(68vw, 292px) !important;
}

/* 2) BOTs: pequeños, separados y flotando sobre la mesa. */
.game-screen.game-screen-arena .bots-area {
  gap: 20px !important;
  padding: 0 10px 0 !important;
  align-items: start !important;
}

.game-screen.game-screen-arena .bot-seat {
  padding: 5px 4px 6px !important;
  border-color: rgba(255,255,255,.045) !important;
  background: rgba(4, 23, 17, .20) !important;
  box-shadow: none !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}

.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(1),
.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(3) {
  margin-top: 31px !important;
}

.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(2) {
  margin-top: 0 !important;
  transform: translateY(-2px) !important;
}

.game-screen.game-screen-arena .bot-hand {
  margin-top: 4px !important;
  min-height: 31px !important;
}

/* 3) Centro Arena: NO es una tarjeta. Mazo/descarte flotan. */
.game-screen.game-screen-arena .table-center {
  flex: 1 1 auto !important;
  min-height: 205px !important;
  margin: -2px 10px 0 !important;
  padding: 16px 6px 8px !important;
  justify-content: flex-start !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.game-screen.game-screen-arena .turn-message {
  width: fit-content !important;
  max-width: calc(100% - 20px) !important;
  margin: 0 auto 14px !important;
  padding: 6px 11px !important;
  border: 1px solid rgba(255,255,255,.05) !important;
  border-radius: 999px !important;
  background: rgba(3, 19, 14, .25) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

.game-screen.game-screen-arena .piles {
  gap: 48px !important;
  justify-content: center !important;
  margin-top: 2px !important;
}

.game-screen.game-screen-arena .pilot-status {
  max-width: 350px !important;
  margin: 10px auto 0 !important;
  line-height: 1.25 !important;
  opacity: .76 !important;
}

/* Mensajes de decisión siguen siendo tarjetas funcionales cuando aparecen. */
.game-screen.game-screen-arena .discard-choice,
.game-screen.game-screen-arena .new-card-choice,
.game-screen.game-screen-arena .claim-event-banner {
  position: relative !important;
  z-index: 4 !important;
}

/* 4) Zona humana: deja de ser un bloque sólido; parece borde del jugador. */
.game-screen.game-screen-arena .human-zone {
  flex: 0 0 auto !important;
  margin: -2px 2px 0 !important;
  padding: 6px 6px 5px !important;
  border-left: 1px solid rgba(87,212,154,.14) !important;
  border-right: 1px solid rgba(87,212,154,.14) !important;
  border-top: 1px solid rgba(87,212,154,.12) !important;
  border-bottom: 1px solid rgba(87,212,154,.10) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(4,27,19,.18), rgba(3,20,15,.08)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.018) !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}

.game-screen.game-screen-arena .human-zone.active-turn {
  border-color: rgba(87,212,154,.24) !important;
  box-shadow: 0 0 18px rgba(87,212,154,.025) !important;
}

.game-screen.game-screen-arena .human-title {
  padding: 0 4px 4px !important;
  border-bottom-color: rgba(255,255,255,.025) !important;
}

/* Mesa del jugador como línea/área, no panel dentro de panel. */
.game-screen.game-screen-arena .human-melds-zone,
.game-screen.game-screen-arena .human-melds-zone.show {
  margin: 0 1px 3px !important;
  padding: 5px !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-top: 1px solid rgba(255,255,255,.035) !important;
  border-bottom: 1px solid rgba(255,255,255,.035) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Mano más arriba y con menos altura desperdiciada. */
.game-screen.game-screen-arena .hand-workspace {
  min-height: 120px !important;
  gap: 5px !important;
  align-items: start !important;
}

.game-screen.game-screen-arena .human-hand {
  min-height: 113px !important;
  padding: 38px 0 0 !important;
}

.game-screen.game-screen-arena .special-card-slot {
  min-height: 112px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  background: rgba(41,39,24,.18) !important;
  border-color: rgba(224,199,119,.09) !important;
}

.game-screen.game-screen-arena .special-card-visual {
  min-height: 68px !important;
}

.game-screen.game-screen-arena .hand-hint {
  margin: -1px 0 1px !important;
  opacity: .68 !important;
}

/* Posible jugada más ligera. */
.game-screen.game-screen-arena .human-draft-zone {
  margin-top: 2px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  background: transparent !important;
  border-color: rgba(255,255,255,.04) !important;
}

/* Botonera: sin caja exterior pesada. */
.game-screen.game-screen-arena .pilot-actions {
  margin-top: 0 !important;
  padding-top: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Ajustes para modo Ajustar a pantalla. */
.game-screen.game-screen-arena.display-fit .pilot-table::after {
  top: 80px !important;
  bottom: 176px !important;
}

.game-screen.game-screen-arena.display-fit .bots-area {
  gap: 14px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.game-screen.game-screen-arena.display-fit .bots-area.count-3 .bot-seat:nth-child(1),
.game-screen.game-screen-arena.display-fit .bots-area.count-3 .bot-seat:nth-child(3) {
  margin-top: 22px !important;
}

.game-screen.game-screen-arena.display-fit .table-center {
  min-height: 172px !important;
  padding-top: 10px !important;
}

.game-screen.game-screen-arena.display-fit .turn-message {
  margin-bottom: 8px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.game-screen.game-screen-arena.display-fit .human-zone {
  padding-top: 5px !important;
}

.game-screen.game-screen-arena.display-fit .hand-workspace {
  min-height: 104px !important;
}

.game-screen.game-screen-arena.display-fit .human-hand {
  min-height: 100px !important;
  padding-top: 32px !important;
}

@media (max-width: 390px) {
  .game-screen.game-screen-arena .pilot-table::after {
    left: 10px !important;
    right: 10px !important;
    top: 88px !important;
    bottom: 202px !important;
  }

  .game-screen.game-screen-arena .bots-area {
    gap: 13px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(1),
  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(3) {
    margin-top: 25px !important;
  }

  .game-screen.game-screen-arena .piles {
    gap: 34px !important;
  }

  .game-screen.game-screen-arena .human-hand {
    padding-top: 34px !important;
  }
}

/* ============================================================
   ARENA 2.3 · SIN CAJONES EXTERIORES
   ------------------------------------------------------------
   Corrección visual solicitada:
   - elimina el marco grande del jugador
   - aligera las tarjetas de bots
   - mantiene únicamente zonas funcionales internas
   - refuerza el anillo como estructura visual principal
   ============================================================ */

/* El anillo pasa a ser la estructura que organiza la mesa. */
.game-screen.game-screen-arena .pilot-table::after {
  left: 12px !important;
  right: 12px !important;
  top: 86px !important;
  bottom: 150px !important;
  border: 1px solid rgba(255,255,255,.085) !important;
  border-radius: 48% 48% 34% 34% / 24% 24% 18% 18% !important;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.026), transparent 47%) !important;
  box-shadow:
    inset 0 0 0 7px rgba(0,0,0,.032),
    inset 0 0 52px rgba(0,0,0,.055) !important;
}

/* Bots: flotan; se elimina la sensación de tres tarjetas grandes. */
.game-screen.game-screen-arena .bot-seat,
.game-screen.game-screen-arena .bot-seat.active-turn {
  border-color: transparent !important;
  background: rgba(3, 20, 15, .10) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.game-screen.game-screen-arena .bot-seat.active-turn {
  background: rgba(87,212,154,.025) !important;
}

/* CENTRO: ninguna caja exterior. */
.game-screen.game-screen-arena .table-center,
.game-screen.game-screen-arena.collection-game-skin.collection-table-has-motif .table-center {
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* El mensaje de turno queda como chip discreto, no panel. */
.game-screen.game-screen-arena .turn-message {
  border-color: rgba(255,255,255,.045) !important;
  background: rgba(2,16,12,.20) !important;
  box-shadow: none !important;
}

/* JUGADOR: se elimina por completo el rectángulo verde exterior. */
.game-screen.game-screen-arena .human-zone,
.game-screen.game-screen-arena .human-zone.active-turn,
.game-screen.game-screen-arena.display-fit .human-zone,
.game-screen.game-screen-arena.display-fit .human-zone.active-turn {
  margin-left: 7px !important;
  margin-right: 7px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Solo una línea horizontal marca dónde empieza la zona del jugador. */
.game-screen.game-screen-arena .human-title {
  position: relative !important;
  padding: 7px 3px 6px !important;
  border: 0 !important;
  background: transparent !important;
}

.game-screen.game-screen-arena .human-title::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(87,212,154,.18) 14%,
    rgba(87,212,154,.18) 86%,
    transparent
  );
}

/* Mesa del jugador: tampoco es una tarjeta. */
.game-screen.game-screen-arena .human-melds-zone,
.game-screen.game-screen-arena .human-melds-zone.show,
.game-screen.game-screen-arena .human-melds-zone.active-turn {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
}

/* Conservamos las zonas internas porque son drop targets reales,
   pero bajamos su peso para que parezcan marcas sobre el tapete. */
.game-screen.game-screen-arena .melds-scroll,
.game-screen.game-screen-arena .draft-cards {
  background: transparent !important;
}

.game-screen.game-screen-arena .human-draft-zone {
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Mano un poco más arriba todavía, como el mockup Arena. */
.game-screen.game-screen-arena .hand-workspace {
  min-height: 112px !important;
}

.game-screen.game-screen-arena .human-hand {
  min-height: 106px !important;
  padding-top: 30px !important;
}

.game-screen.game-screen-arena .special-card-slot {
  min-height: 106px !important;
  border-color: rgba(224,199,119,.075) !important;
  background: rgba(38,35,22,.12) !important;
}

/* Botonera sin contenedor; solo sobreviven los botones individuales. */
.game-screen.game-screen-arena .pilot-actions {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Ajuste específico para pantallas angostas. */
@media (max-width: 390px) {
  .game-screen.game-screen-arena .pilot-table::after {
    left: 9px !important;
    right: 9px !important;
    top: 84px !important;
    bottom: 146px !important;
  }

  .game-screen.game-screen-arena .human-zone,
  .game-screen.game-screen-arena .human-zone.active-turn {
    margin-left: 5px !important;
    margin-right: 5px !important;
  }

  .game-screen.game-screen-arena .human-hand {
    padding-top: 27px !important;
  }
}


/* ============================================================
   ARENA 2.3.1 · AJUSTE FINO POST-PRUEBA
   ------------------------------------------------------------
   - baja los bots un poco más
   - elimina la línea horizontal sobre el jugador
   - oculta la carta origen durante la animación de CAMBIO
   ============================================================ */

.game-screen.game-screen-arena .bots-area {
  padding-top: 8px !important;
}

.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(1),
.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(3) {
  margin-top: 40px !important;
}

.game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(2) {
  margin-top: 10px !important;
  transform: none !important;
}

.game-screen.game-screen-arena .human-title::before {
  content: none !important;
  display: none !important;
}

.game-screen .playing-card.exchange-source-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

@media (max-width: 390px) {
  .game-screen.game-screen-arena .bots-area {
    padding-top: 6px !important;
  }

  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(1),
  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(3) {
    margin-top: 32px !important;
  }

  .game-screen.game-screen-arena .bots-area.count-3 .bot-seat:nth-child(2) {
    margin-top: 8px !important;
  }
}
