/* =============================
   BASE
============================= */
:root{
  --ui-gap: 14px;
  --sb-width: 240px;
  --sb-gutter: 16px;
  --hand-pad: 10px;
}

*{ box-sizing: border-box; }

body{
  font-family: Arial, sans-serif;
  background: #0b3d2e;
  background-image: url("/assets/image/bg-g.png"); /* fundo verde da página de mesas */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  margin: 0;
}

.hidden{ display: none !important; }


/* =============================
   GAME (container)
============================= */
#game{
  min-height: 100vh; 
  background: #0b3d2e;
  background-image: url("/assets/image/table-pon.png");/* fundo roxo/mesa gigante */
  background-size: 95% 580px;
  background-position: center top;
  background-repeat: no-repeat;  
  display: flex;/* layout */
  flex-direction: column;
  gap: var(--ui-gap);
  padding: 14px 16px;
}

/* Responsivo: GAME */
@media (max-width: 900px){
  #game{
    padding: 12px 10px;
    background-size: 110% 560px;
  }
}


/* =============================
   TOP BAR
============================= */
#top-bar{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

/* Responsivo: TOP BAR */
@media (max-width: 900px){
  #top-bar{ flex-wrap: wrap; justify-content: center; }
}


/* =============================
   TABLE (área central dentro do roxo)
============================= */
#table{
  width: min(900px, 92vw);
  margin: 0 auto;
  /*border: 1px solid #f30808;*/
  /* “miolo” dentro do roxo */
  min-height: 300px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 0;
}

/* Responsivo: TABLE */
@media (max-width: 900px){
  #table{
    width: min(980px, 96vw);
    min-height: 260px;
    max-height: none;
    flex-wrap: wrap;
    gap: 10px;
  }
}


/* =============================
   PILES / DECK AREA
============================= */
#deck-area{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 10px 0;
}

/* slot do monte/lixo */
.pile-slot{
  width: 80px;
  height: 100px;
  border-radius: 6px;
  border: 2px solid #84e615;
  display: flex;
  align-items: center;
  justify-content: center;
}

#monte, #lixo{
  width: 75px;
  height: 100px;
  border-radius: 6px;
  background-size: cover;
  border: 2px solid #84e615;
}

/* Responsivo: PILES */
@media (max-width: 900px){
  #deck-area{ margin: 6px 0; gap: 12px; }
}

/* =============================
   BOTTOM AREA (mão + placar)
============================= */
#bottomArea{
  position: relative !important;   /* ✅ âncora do scoreboard */
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-end !important; 
  /*border: 1px solid #84e615 !important;*/
  padding: 0 12px 10px !important;
}

/* Responsivo: BOTTOM AREA */
@media (max-width: 900px){
  #bottomArea{
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
  }
}


/* =============================
   HAND
============================= */
#hand{
  width: 100% !important;
  max-width: 980px !important;
  margin: 0 auto !important;
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  padding: 6px 8px !important;
  transform: translateY(-8px) !important; /* Sobe a mão - ajuste fino: -12px a -30px */
}


#hand::-webkit-scrollbar{ height: 10px; }
#hand::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
}

/* Responsivo: HAND */
@media (max-width: 900px){
  #hand{
    justify-content: flex-start;
    padding: 8px 6px;
  }
}

/* =============================
   SCOREBOARD
============================= */
/* scoreboard flutuante */
#scoreboard{
  position: absolute !important;

  /* ✅ ajuste fino de posição (aproxima e sobe) */
  right: 10px !important;          /* menor = mais perto da borda direita */
  bottom: 40px !important;         /* maior = mais pra cima */
  width: 290px !important;
  height: 200px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 50 !important;
}

#scoreboard::-webkit-scrollbar{ width: 10px; }
#scoreboard::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
}

/* =============================
   TURN TIMER BAR
============================= */
.sb-turnbar{
  width: 100% !important;
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.20) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  overflow: hidden !important;
  margin: 6px 0 10px 0 !important;
}
.sb-turnbar-fill{
  height: 100% !important;
  background: rgba(255,255,255,0.75) !important;
  border-radius: 999px !important;
  transition: width 160ms linear !important;
}

/* Responsivo: SCOREBOARD */
@media (max-width: 900px){
  #scoreboard{
    position: static !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    margin-top: 10px !important;
  }
  #hand{
    transform: none !important;
  }
}

/* =============================
   PLAYER INFO
============================= */
#playerInfo{
  color: #fff;
  font-size: 18px;
  margin-bottom: 6px;
}


/* =============================
   CARTAS (SPRITES PNG)
============================= */
.card{
  width: 72px;
  height: 100px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  border: rgba(236, 224, 50, 0.4);
}

.card.hand{
  cursor: pointer;
  transition: transform 0.15s;
}

.card.hand:hover{
  transform: translateY(-2px);
}

.card.selected{
  outline: 3px solid #ffd700;
  transform: translateY(-2px);
}

#mao{
  display: flex;
  gap: 8px;
  margin-top: 16px;
}


/* =============================
   GRUPOS NA MESA
============================= */
.grupo-table{
  position: relative;
  display: flex;
}

.grupo-table .card{
  position: relative;
  margin-left: -50px; /* controla o quanto sobrepõe */
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  border-radius: 6px;
  transition: transform 0.10s;
}

.grupo-table .card:first-child{ margin-left: 0; }

.grupo-table .card:hover{
  transform: translateY(-2px);
  z-index: 10;
}


/* =============================
   ANIMAÇÕES (cartas)
============================= */
@keyframes cardDeal{
  0%   { transform: translateY(18px) scale(0.92); opacity: 0; filter: brightness(1.2); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: brightness(1); }
}
@keyframes cardToTable{
  0%   { transform: translateY(10px) scale(0.98); opacity: 0.2; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes cardDiscard{
  0%   { transform: translate(0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate(10px,10px) rotate(6deg); opacity: 0; }
}
.anim-deal   { animation: cardDeal 220ms ease-out; }
.anim-table  { animation: cardToTable 220ms ease-out; }
.anim-discard{ animation: cardDiscard 180ms ease-in; }

/* =============================
   TELA DE MESAS
============================= */
#tablesScreen{ padding: 16px; }

#tablesGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.table-card{
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* área visual da mesa (imagem + assentos em cima) */
.table-visual{
  position: relative;
  width: 100%;
  height: 150px;             /* ✅ aumenta pra caber a imagem inteira */
  display: grid;
  place-items: center;
}

.table-visual img{
  width: 100%;
  height: 100%;
  object-fit: contain;        /* ✅ não corta a mesa */
  display: block;
  border-radius: 12px;
  
}

/* overlay que recebe os assentos criados no app.js */
.seats-overlay{
  position: absolute;
  inset: 0;
}

/* assentos */
.seats-overlay .seat{
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.12);
  color: #fff;
  user-select: none;
  cursor: pointer;
  overflow: hidden;
}


.seats-overlay .seat .seat-avatar-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 999px;
}

.seats-overlay .seat .seat-avatar-fallback{
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.seats-overlay .seat.empty{
  background: rgba(255,255,255,0.12);
}

/* estado selecionado (igual ao que você já faz no JS) */
.seats-overlay .seat.selected{
  outline: 3px solid rgba(255,255,255,0.7);
  outline-offset: 2px;
}


.seat.occupied{
  border: 2px solid rgba(0,255,120,0.6);
  box-shadow: 0 0 6px rgba(0,255,120,0.4);
}






/*Botão Assistir*/
.table-actions{
  display:flex;
  gap: 8px;
}

.table-actions .secondary{
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.28);
}
/*botão assistir*/



/* ✅ posições (casam com positions = ["pos1","pos2"...] do app.js)*/
.seat.pos1 { left: 3%;  top: 52%; transform: translate(-50%, -50%); }  /* esquerda */
.seat.pos2 { left: 20%; top: 8%; transform: translate(-50%, -50%); }  /* topo-esq */
.seat.pos3 { left: 50%; top: 7%;  transform: translate(-50%, -50%); }  /* topo */
.seat.pos4 { left: 80%; top: 8%; transform: translate(-50%, -50%); }  /* topo-dir */
.seat.pos5 { left: 98%; top: 52%; transform: translate(-50%, -50%); }  /* direita */
.seat.pos6 { left: 50%; top: 92%; transform: translate(-50%, -50%); }  /* baixo */

.table-title{ font-weight: 900; font-size: 16px; text-align: center; }
.table-value{ font-size: 14px; opacity: 0.95; text-align: center; }
.table-hint { font-size: 12px; opacity: 0.8; line-height: 1.3; text-align: center; }

.table-actions{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.table-actions button{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.10);
  color: inherit;
  cursor: pointer;
  font-weight: 800;
}
.table-actions button.primary{
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.22);
}
@media (max-width: 900px){
  #tablesGrid{
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
  .table-visual{
    height: 240px;
  }
}

@media (max-width: 520px){
  #tablesGrid{
    grid-template-columns: 1fr;
  }
  .table-visual{
    height: 220px;  /* um pouco menor no celular */
  }
}

/* =============================
   SCOREBOARD (interno)
============================= */
.sb-title{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 8px;
}

.sb-timer{
  font-size: 12px;
  opacity: .9;
}

.sb-card{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}

.sb-avatar{
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.18);
}

.sb-avatar img{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sb-info{ flex: 1; }

#scoreboard .sb-name{
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.3px;

  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.sb-sub{
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.9;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sb-pill.sb-bati-btn{
  cursor: pointer;
  user-select: none;
  font-weight: 900;
  opacity: 1;

  background: linear-gradient(180deg, #1a73e8, #0d47a1) !important;
  color: #fff !important;

  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: all 0.15s ease;
}

.sb-pill.sb-bati-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.sb-pill.sb-bati-btn.is-disabled-ui{
  background: linear-gradient(180deg, #e53935, #b71c1c) !important;
  color: #fff !important;
  opacity: 1;
}

.sb-pill.sb-bati-btn.is-active{
  background: linear-gradient(180deg, #2ecc71, #27ae60) !important;
  color: #fff !important;
}

#batidaBanner{
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);

  background: linear-gradient(180deg, #1a73e8, #0d47a1);
  color: #fff;

  padding: 8px 16px;
  border-radius: 12px;

  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.2px;
  line-height: 1;

  box-shadow: 0 8px 24px rgba(0,0,0,0.28);

  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

@media (max-width: 520px) and (orientation: portrait){
  #batidaBanner{
    top: 8%;
    font-size: 13px;
    padding: 7px 12px;
    max-width: calc(100vw - 24px);
    text-align: center;
    white-space: nowrap;
  }
}

#scoreboard .sb-pill{
  font-size: 12px;
  padding: 4px 8px;

  background: rgba(255,255,255,0.12);
  color: #fff;

  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.15);

  backdrop-filter: blur(4px);
}

/* extra do placar (elim/rebuy) */
.sb-elims{
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.sb-elims-title{
  font-weight: 900;
  font-size: 13px;
  opacity: .95;
  margin-bottom: 8px;
}
.sb-eli-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(255,255,255,0.10);
}
.sb-eli-name{ font-weight: 800; font-size: 12px; opacity: .95; }
.sb-eli-when{ font-size: 12px; opacity: .85; }


/* =============================
   FICHAS / POTE
============================= */
.potBox{
  width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.chip-stack{
  position: relative;
  width: 70px;
  height: 90px;
  border-radius: 10px;
  display: grid;
  place-items: end center;
}

.chip{
  position: absolute;
  bottom: calc(var(--i) * 7px);
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  border-radius: 999px;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,0.35));
}

/* imagens por denominação */
.chip-1    { background-image: url("/assets/image/chip-1.png"); }
.chip-5    { background-image: url("/assets/image/chip-5.png"); }
.chip-25   { background-image: url("/assets/image/chip-25.png"); }
.chip-50   { background-image: url("/assets/image/chip-50.png"); }
.chip-100  { background-image: url("/assets/image/chip-100.png"); }
.chip-500  { background-image: url("/assets/image/chip-500.png"); }
.chip-1000 { background-image: url("/assets/image/chip-1000.png"); }
.chip-5000 { background-image: url("/assets/image/chip-5000.png"); }

.pot-label{
  font-size: 12px;
  opacity: 0.9;
  user-select: none;
  white-space: nowrap;
}


/* =============================
   REBUY (popup)
============================= */
.rebuy-overlay{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 10000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}

.rebuy-modal{
  width: min(520px, 92vw);
  border-radius: 18px;
  padding: 14px;
  background: rgba(20,20,20,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  color: #fff;
}

.rebuy-title{ font-weight: 900; font-size: 16px; }

.rebuy-sub{
  margin-top: 6px;
  font-size: 13px;
  opacity: .92;
}

.rebuy-list{
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rebuy-row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.rebuy-name{ font-weight: 900; font-size: 14px; }

.rebuy-meta{
  margin-top: 4px;
  font-size: 12px;
  opacity: .9;
}

.rebuy-actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.rebuy-btn, .rebuy-skip{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.10);
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

.rebuy-btn:hover, .rebuy-skip:hover{
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
}

.rebuy-btn:active, .rebuy-skip:active{ transform: translateY(1px); }

.rebuy-foot{
  margin-top: 10px;
  font-size: 12px;
  opacity: .85;
}

.endmatch-overlay{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: auto;
  z-index: 999999;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}

.endmatch-modal{
  position: relative;
  z-index: 1000000;
  isolation: isolate;
  overflow: hidden;

  width: min(520px, 92vw);
  border-radius: 16px;
  padding: 22px 20px;

  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  animation: endmatchPop 140ms ease-out;
  color: #fff;
  text-align: center;
}

@keyframes endmatchPop{
  from { transform: scale(0.98); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.endmatch-title{
  position: relative;
  z-index: 2;
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
}

.endmatch-body{
  position: relative;
  z-index: 2;
  font-size: 16px;
  opacity: 0.95;
}

.endmatch-line{ margin: 6px 0; }
.endmatch-sub{ margin-top: 10px; font-size: 13px; opacity: 0.85; }

.endmatch-actions{
  margin-top: 18px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.endmatch-btn{
  padding: 12px 28px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  color: inherit;
  cursor: pointer;
  font-weight: 900;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.endmatch-btn:hover{
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.30);
}

.endmatch-btn:active{
  transform: translateY(1px);
}

/* =========================================================
   FIX: SALA DE MESAS NO MOBILE (mostrar as 6 mesas)
   - libera scroll na página
   - deixa o scroll travado apenas no #game
========================================================= */
@media (max-width: 600px){

  /* ✅ precisa rolar na sala de mesas */
  html, body{
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* garante espaço pra rolagem */
  #tablesScreen{
    min-height: 100vh !important;
    padding-bottom: 24px !important;
  }

  /* 1 coluna no mobile e sem limites de altura */
  #tablesGrid{
    grid-template-columns: 1fr !important;
    max-width: 520px !important;
    margin: 0 auto !important;
  }

  /* ✅ quando estiver no jogo, aí sim não deixa rolar a página */
  #game{
    height: 100vh !important;
    overflow: hidden !important;
  }
}
/* página inicial do celular*/

/* ===== HOME SCREEN (mobile) ===== */
#homeScreen{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 24px 16px;
  background: hsl(0, 14%, 96%); /* ou seu fundo verde */
}

.home-logo img{
  max-width: 280px;
  width: 80%;
  height: auto;
  margin-top: 20px;
}

.home-menu{
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-menu button{
  padding: 18px 16px;
  font-size: 22px;
  font-weight: 900;
  border-radius: 14px;
  border: none;
  background: #1fb455;
  color: #fff;
  cursor: pointer;
}

.home-menu button.primary{
  background: #1fb455;
}

.home-menu button:active{
  transform: translateY(1px);
}
/* =============================
   HOME DESKTOP CHEIA (portal)
============================= */

@media (min-width: 900px){

  /* hero: logo | menu | status */
  #homeScreen .home-shell{
    width: min(1120px, 96vw);
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.6fr; /* logo | botões | status */
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 18px 50px rgba(0,0,0,0.10);
  }

  /* menu fica “coluna” e centralizado */
  #homeScreen .home-menu{
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  #homeScreen .home-menu button{
    padding: 14px 14px;
    border-radius: 16px;
    border: none;
    background: #21b455;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
  }

  #homeScreen #btnOnline{
    padding: 16px 14px;
    font-size: 20px;
  }

  /* status à direita (compacto) */
  #homeScreen .home-status{
    border-radius: 16px;
    padding: 14px;
    background: rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(180deg, rgba(10,70,120,1) 0%, rgba(6,52,92,1) 100%);
  }

  #homeScreen .panel-title{
    font-weight: 900;
    font-size: 16px;
    margin-bottom: 10px;

  }
/* Painel Status*/
  #homeScreen .panel-row{
    display:flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.70);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 8px;
    color: black;
    
  }

  /* banner */
  #homeScreen .home-banner{
    width: min(1120px, 96vw);
    border-radius: 16px;
    padding: 14px 18px;
    background: linear-gradient(180deg, rgba(10,70,120,1) 0%, rgba(6,52,92,1) 100%);
  }

  /* últimas mesas: 3 em uma linha */
  #homeScreen .home-lastrow{
    width: min(1120px, 96vw);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    
  }

  #homeScreen .home-panel{
    border-radius: 16px;
    padding: 14px;
    background: rgba(248, 190, 124, 0.95);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
  }

  #homeScreen .last-table{
    display:flex;
    justify-content: space-between;
    align-items:center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    background: rgba(209, 7, 7, 0.04);
    border: 1px solid rgba(0,0,0,0.05);
  }

  #homeScreen .lt-name{ font-weight: 900; }
  #homeScreen .lt-sub{ font-size: 12px; opacity: .85; margin-top: 2px; }

  #homeScreen .lt-btn{
    padding: 10px 12px;
    border-radius: 12px;
    border: none;
    background: #21b455;
    color: #f5c542;
    font-weight: 900;
    cursor: pointer;
  }
}
@media (min-width: 900px){

  .watch-btn{
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.15);
    color: white;
    font-weight: 700;
    cursor: pointer;
  }

  .watch-icon{
    width: 16px;
    height: 16px;
    fill: yellow;
  }

  .watch-text{
    display: inline;
  }
}

/* =============================
   HOME DESKTOP: centralizar + background nas laterais
============================= */
@media (min-width: 900px){

  /* background que aparece nas laterais (fora dos cards brancos) */
  html, body{
    height: 100%;
    /*background: radial-gradient(circle at top, #0b5a3a 0%, #063020 60%, #041a12 100%);*/
    
    background-image: url("./assets/image/bg-g.png") center/cover fixed no-repeat;
    
  }

  /* container da home ocupa a tela e centraliza tudo */
  #homeScreen{
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;     /* ✅ centraliza horizontal */
    justify-content: flex-start;
    padding: 26px 18px 36px;
    gap: 16px;
    background: transparent; /* deixa o background do body aparecer nas laterais */
  }

  /* garante que os “blocos” ficam centrados */
  #homeScreen .home-shell,
  #homeScreen .home-banner,
  #homeScreen .home-lastrow{
    margin-left: auto;
    margin-right: auto;
  }
}
.seat.occupied{
  opacity: 1;
  filter: grayscale(1);
  pointer-events: auto;
  cursor: pointer;
}

/*animação do pote*/
/*
.pot-update {
  transform: scale(1.15);
  transition: transform 0.2s ease;
}*/

/* Contador Jogador - relogio*/
.table-visual{
  position: relative;
}

.table-center-info{
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 3;
}

.table-players-count{
  min-width: 44px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255,255,255,0.16);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.table-start-timer{
  min-width: 42px;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: rgba(25, 110, 25, 0.72);
  border: 1px solid rgba(255,255,255,0.16);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}

.seat-empty-number{
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
/* Termina aqui*/


/* Barra de tempo*/
.table-start-wrap{
  width: 120px; /* tamanho*/
  display: flex;
  align-items: center;
  justify-content: center;
}

/* trilho (fundo) */
.table-start-bar{
  width: 100%;
  height: 8px; /*Espessura*/
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

/* preenchimento */
.table-start-bar-fill{
  width: 100%;
  height: 100%;
  border-radius: 999px;

  /*background: linear-gradient(90deg,#1aff66,#00c853 ); /*Verde*/
  /*background: linear-gradient(90deg,#00c6ff, #0072ff ); /*Azul*/
  background: linear-gradient(90deg,#ffd700, #ffb300 ); /*Dourado*/


  box-shadow:
    0 0 6px rgba(0,255,100,0.6),
    0 0 12px rgba(0,255,100,0.3);

  transition: width 0.5s linear;
  position: relative;
}

/* brilho passando (efeito premium) */
.table-start-bar-fill::after{
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );

  animation: bar-shine 1.5s linear infinite; /*Velocidade do brilho*/
}

@keyframes bar-shine {
  0% { left: -40%; }
  100% { left: 120%; }
}
/* Termina aqui*/


/* Botão Valor/Naipe*/
.sort-btn{
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.sort-btn img{
  width: 28px;
  height: 28px;
  display: block;
}
/* Termina aqui*/

/* Estilo dos Avisos*/
.game-notice{
  position: fixed;
  left: 50%;
  top: 14px;
  transform: translateX(-50%) translateY(-8px);
  z-index: 99999;

  max-width: min(92vw, 420px);
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 12px;

  background: rgba(20, 20, 24, 0.94);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 26px rgba(0,0,0,0.22);

  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(8px);
}

.game-notice.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.game-notice.warn{
  background: rgba(55, 42, 20, 0.95);
  border-color: rgba(255, 202, 95, 0.25);
}

.game-notice.error{
  background: rgba(58, 22, 22, 0.95);
  border-color: rgba(255, 120, 120, 0.26);
}

.game-notice.ok{
  background: rgba(20, 52, 30, 0.95);
  border-color: rgba(120, 255, 170, 0.24);
}

@media (max-width: 520px){
  .game-notice{
    top: 10px;
    max-width: 94vw;
    min-width: 0;
    padding: 9px 12px;
    font-size: 13px;
    border-radius: 10px;
  }
}

/* Termina aqui*/

/* Variant começa aqui*/

.table-variant {
  margin-left: 6px;
  font-size: 12px;
  opacity: 0.8;
}

.home-variant-chooser{
  width: min(92vw, 520px);
  margin: 24px auto 0;
  padding: 18px;
  border-radius: 16px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
  text-align: center;
}

.home-variant-title{
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
}

.home-variant-actions{
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.home-variant-actions button{
  min-width: 180px;
}

/*Termina aqui*/

/* Feed*/
.home-status-feed{
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);

  min-height: 40px;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}
.home-status-feed-text{
  display: block;
}
/* Termina aqui*/

/* Mesa Azul*/
#tablesScreen.tables-crazy-mode{
  background: linear-gradient(rgba(10, 35, 70, 0.72), rgba(10, 35, 70, 0.72));
  background-image: url("/assets/image/bg-b.jpg");
  background-size: cover;
  background-position: center;
}

#tablesScreen.tables-crazy-mode .tables-title,
#tablesScreen.tables-crazy-mode .table-title,
#tablesScreen.tables-crazy-mode .table-value,
#tablesScreen.tables-crazy-mode .table-hint{
  color: #eaf4ff;
}
/* termina aqui*/

/* Home*/
.home-userbar {
  width: min(92vw, 520px);
  margin: 0 auto 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-userinfo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.18);
}

.home-user-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#homeUserName {
  font-weight: 800;
}

#homeUserBalance {
  font-size: 13px;
  opacity: 0.9;
}

.home-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .home-userbar {
    flex-direction: column;
    align-items: stretch;
  }

  .home-user-actions {
    justify-content: center;
  }
}
/* Termina aqui*/

.home-status-wrap{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-usercard{
  background: #154d84;
  border-radius: 20px;
  padding: 12px 14px;
  color: #fff;
  box-sizing: border-box;
}

.home-usercard-row{
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-user-avatar{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.home-user-meta{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#homeUserName{
  font-weight: 800;
}

#homeUserBalance{
  font-size: 13px;
  opacity: 0.92;
}

/* =========================================================
   SCOREBOARD DESKTOP - 3 LINHAS FIXAS
========================================================= */
#scoreboard .sb-sub-desktop{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

#scoreboard .sb-sub-desktop .sb-sub-row{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

#scoreboard .sb-bati-placeholder{
  visibility: hidden;
  min-width: 72px;
}


@media (max-width: 520px) and (orientation: portrait){
  #scoreboard .sb-sub-desktop{
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  #scoreboard .sb-sub-desktop .sb-sub-row{
    display: contents !important;
  }

  #scoreboard .sb-bati-placeholder{
    display: none !important;
  }
}

#scoreboard .sb-card{
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;
  border-radius: 14px;

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);

  border: 1px solid rgba(255,255,255,0.12);

  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}


/* baralho acabou*/

#roundBanner{
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);

  padding: 10px 18px;
  border-radius: 12px;

  background: rgba(0,0,0,0.85);
  color: #fff;

  font-weight: 900;
  font-size: 14px;

  z-index: 999999;
  pointer-events: none;

  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
/* Termina aqui*/