/* ================= INÍCIO DO CSS ================= */

/* =====================================================
   ESTRUTURA GERAL E RESET
   ===================================================== */
body,
html {
  height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  /* background removed -> moved to #parallax-container */
  background: #181c24 url("../img/backgrounds/Fundo.jpg") no-repeat center center fixed;
  background-size: cover;
  color: #f1f1f1;
  font-family: "Segoe UI", Arial, sans-serif;
  cursor: url("../img/ui/cursor_opt.png") 0 0, auto;
  overflow: hidden;
  /* Prevent scrollbars from moving layers */
}

/* =====================================================
           PARALLAX BACKGROUND (DISABLED)
           ===================================================== */


/* Removed breathe animation */

button,
.token,
.pedra-oficial,
a,
.clickable {
  cursor: url("../img/ui/cursor_opt.png") 0 0, pointer !important;
}

/* ... skipped ... */

#start-screen #tutorial-btn {
  background: url("../img/ui/borders/Borda_Verde.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 300px;
  height: 75px;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#start-screen #bot-pve-btn {
  background: url("../img/ui/borders/Borda_Dourada.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 300px;
  height: 75px;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#start-screen #online-menu-btn {
  background: url("../img/ui/borders/Borda_Preta.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 300px;
  height: 75px;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Side by Side Buttons */
#start-screen #create-room-btn {
  background: url("../img/ui/colors/Laranja.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 260px;
  height: 65px;
  font-size: 1.15em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#start-screen #join-room-btn {
  background: url("../img/ui/colors/Ciano.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 260px;
  height: 65px;
  font-size: 1.15em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ... skipped ... */

/* Action Buttons */
#start-screen #start-game-btn {
  background: url("../img/ui/colors/Roxo.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 300px;
  height: 75px;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-family: "Cinzel Decorative", serif;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  /* Ensure centering works like entered button */
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  padding: 0;
}

#start-screen #enter-room-btn {
  background: url("../img/ui/colors/Verde.webp?v=4.4") no-repeat center center;
  background-size: 100% 100%;
  width: 300px;
  height: 75px;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  font-family: "Cinzel Decorative", serif;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  padding: 0;
}

#start-screen #tutorial-btn:hover,
#start-screen #bot-pve-btn:hover,
#start-screen #online-menu-btn:hover,
#start-screen #create-room-btn:hover,
#start-screen #join-room-btn:hover,
#start-screen #start-game-btn:hover,
#start-screen #enter-room-btn:hover {
  filter: brightness(1.2);
  transform: scale(1.02);
  box-shadow: none;
}

#btn-mute-global {
  position: fixed;
  top: 10px;
  right: 5px;
  /* Pushed to right edge */
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 3000;
  transition: transform 0.2s;
}

/* CHANGELOG BOX */
#changelog-box {
  position: fixed;
  right: 0;
  /* Align to right edge */
  top: 0;
  transform: none;
  width: 220px;
  max-height: 35vh;
  /* Revert to defined size */
  overflow-y: auto;
  background: transparent;
  border: none;
  padding: 10px 28px 10px 10px;
  /* Right padding for text breathing room */
  padding-top: 10px;
  /* Removed large top margin */
  color: #dfdfdf;
  font-family: "Segoe UI", sans-serif;
  /* Medieval font */
  box-shadow: none;
  text-align: right;
  z-index: 3000;
  transition: opacity 0.3s;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 1);
  /* Scrollbar hiding for Firefox */
  scrollbar-width: none;
}

/* Hide scrollbar for Chrome/Safari */
#changelog-box::-webkit-scrollbar {
  display: none;
}

/* Hide changelog if start screen is not active */
#start-screen:not(.active)~#changelog-box {
  display: none !important;
}

#changelog-box h3 {
  color: #ffd700;
  font-family: "Cinzel Decorative", serif;
  border-bottom: none;
  /* Remove blue line */
  padding-bottom: 5px;
  margin-top: 5px;
  /* Space for mute button visually */
  font-size: 1.4em;
  text-align: center;
  /* Centered title */
  letter-spacing: 2px;
}

#changelog-box ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  font-size: 0.95em;
}

#changelog-box li {
  margin-bottom: 20px;
  line-height: 1.3;
}

#changelog-box li strong {
  color: #ffd700;
  /* Gold version number */
  display: block;
  margin-bottom: 4px;
  font-size: 1.1em;
  border-bottom: none;
  /* Remove blue line */
  text-align: right;
  /* Center version number too */
  margin-right: 00px;
}

#changelog-box ul ul li {
  margin-bottom: 4px;
  padding-left: 0;
  position: relative;
  font-size: 0.95em;
  opacity: 0.9;
}

#changelog-box ul ul li::before {
  content: none;
  /* Remove golden dots */
}

#changelog-box small {
  display: block;
  margin-top: 15px;
  text-align: center;
  opacity: 0.5;
  font-size: 0.8em;
  font-style: italic;
}

@media (max-width: 900px) {
  #changelog-box {
    display: none !important;
  }
}

/* =====================================================
           ÁREA DE CRÉDITOS
           ===================================================== */
#creditos {
  position: fixed;
  right: 20px;
  bottom: 10px;
  color: #f8f8ff;
  font-size: 0.95em;
  opacity: 0.7;
  z-index: 100;
  pointer-events: none;
  font-family: "Segoe UI", Arial, sans-serif;
  text-shadow: 0 1px 4px #000a;
  zoom: 0.8;
}

/* =====================================================
           ÁREA DO TABULEIRO E PEDRAS
           ===================================================== */
#tabuleiro {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 30px 0 10px 0;
  min-height: 70px;
}

.token {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #222 linear-gradient(145deg, #333 60%, #111 100%);
  border: 2px solid #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  color: #fff;
  box-shadow: 0 2px 8px #000a;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, border 0.2s;
}

.token.revealed {
  background: #2d8cff;
  border: 2px solid #fff;
  color: #fff;
}

#room-options,
#join-room {
  margin-top: 20px;
}

#game-mesa {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 30px 0 10px 0;
  min-height: 120px;
  gap: 32px;
}

#pedras-oficiais {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

.pedra-oficial {
  width: 60px;
  height: 60px;
  background-size: cover;
  border-radius: 50%;
  background: #fff;
  /* FIX: Restore white background */
  border: 2px solid #2d8cff;
  /* FIX: Restore border */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s, top 0.3s, left 0.3s;
  /* FIX: Ensure stones are above overlays */
  z-index: 100 !important;
  position: relative;
  pointer-events: auto !important;
}

.pedra-oficial img,
.pedra-oficial svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: auto;
  box-sizing: border-box;
}

#pano-mesa {
  width: 320px;
  height: 100px;
  background: linear-gradient(135deg, #eaeaea 80%, #b0b0b0 100%);
  border: 4px solid #2d8cff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0005;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#moeda-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #ffd700;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 2.2em;
  font-weight: bold;
  box-shadow: none;
  cursor: pointer;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s, opacity 0.5s;
  outline: none !important;
  border: none !important;
  background: none !important;
}

#moeda-btn:hover {
  background: #ffe066;
  box-shadow: none;
}

#moeda-btn:focus,
#moeda-btn:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

#moeda-btn {
  outline: none !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}

#resultado-moeda {
  margin-top: 10px;
  font-size: 1.1em;
  color: #ffd700;
  text-shadow: 0 2px 8px #000a;
}

/* Cards de regras e ações */
#cards-info {
  position: fixed;
  top: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 20;
}

.card-info {
  background: rgba(24, 28, 36, 0.98);
  border: 2px solid #2d8cff;
  border-radius: 12px;
  box-shadow: 0 2px 16px #2226;
  padding: 16px 18px;
  min-width: 220px;
  max-width: 320px;
  font-size: 0.98em;
  color: #f1f1f1;
}

.card-info h3 {
  margin: 0 0 8px 0;
  color: #2d8cff;
  font-size: 1.1em;
}

.card-info ul {
  margin: 0 0 0 16px;
  padding: 0;
}

.card-info li {
  margin-bottom: 6px;
}

/* Botões de ação com identidade visual */
.acao-btn {
  /* FIX: Ensure buttons are clickable */
  position: relative;
  z-index: 1050 !important;
  pointer-events: auto !important;
  background: linear-gradient(135deg, #2d8cff 70%, #1a5fb4 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 18px 28px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 12px #0005;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.acao-btn:hover {
  background: linear-gradient(135deg, #1a5fb4 70%, #2d8cff 100%);
  transform: scale(1.05);
  box-shadow: 0 4px 18px #2224;
}

.acao-btn i {
  font-size: 1.2em;
  margin-right: 4px;
}

#painel-acoes {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
}

/* Tabuleiro maior */
#game-mesa {
  min-width: 95vw;
  /* Allow shrinking */
  max-width: 100vw;
  padding: 24px 0;
  gap: 48px;
}

#pedras-oficiais {
  gap: 32px;
  flex-direction: row;
  align-items: center;
}

/* Código da sala no canto superior esquerdo */
#codigo-sala-fixo {
  position: fixed;
  top: 18px;
  left: 18px;
  background: rgba(24, 28, 36, 0.92);
  color: #8ecfff;
  font-size: 1em;
  border-radius: 6px;
  padding: 6px 14px;
  z-index: 30;
  border: 1.5px solid #2d8cff;
  box-shadow: 0 2px 8px #0004;
  opacity: 0.85;
}

/* Esconder listas de jogadores/espectadores após início do jogo */
#game-jogadores,
#game-espectadores {
  display: none !important;
}

/* Ícones flutuantes para abrir cards */
#icones-flutuantes {
  position: fixed;
  top: 60px;
  right: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  gap: 18px;
  gap: 18px;
  z-index: 1050;
  /* FORCE ABOVE CARD (1000) */
}

.icone-flutuante {
  width: 48px;
  height: 48px;
  background: #fff;
  border: 2px solid #2d8cff;
  border-radius: 50%;
  box-shadow: 0 2px 12px #0004;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  color: #2d8cff;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.icone-flutuante:hover {
  background: #e6f0ff;
  box-shadow: 0 4px 18px #2224;
}

/* Cards pop-up (regras e ações) */
.card-popup {
  position: fixed;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  background: rgba(255, 255, 255, 0.98);
  color: #222;
  border: 2px solid #2d8cff;
  border-radius: 14px;
  box-shadow: 0 4px 32px #0005;
  min-width: 320px;
  max-width: 420px;
  padding: 28px 32px 22px 32px;
  z-index: 1000;
  display: none;
  animation: popupIn 0.2s;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translate(50%, -60%);
  }

  to {
    opacity: 1;
    transform: translate(50%, -50%);
  }
}

.card-popup h3 {
  margin-top: 0;
  color: #2d8cff;
  font-size: 1.2em;
}

.card-popup .fechar-popup {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 1.3em;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
}

/* Área de reserva de pedras à esquerda */
#reserva-pedras {
  display: none !important;
}

/* Toast interno */
#toast-interno {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: #2d8cff;
  color: #fff;
  padding: 18px 36px;
  border-radius: 10px;
  font-size: 1.1em;
  box-shadow: 0 2px 16px #0007;
  z-index: 2100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#toast-interno.mostrar {
  opacity: 1;
  pointer-events: auto;
}

/* Organização circular das pedras da reserva */
.circle-pedras {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto;
  overflow-y: auto;
  max-height: 90vh;
}

.pedra-reserva {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-size: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.2s;
  /* FIX: Ensure reserve stones are clickable */
  z-index: 100 !important;
  position: relative;
  pointer-events: auto !important;
}

.pedra-pos0 {
  left: 50%;
  top: 0%;
  transform: translate(-50%, 0);
}

.pedra-pos1 {
  left: 90%;
  top: 22%;
  transform: translate(-50%, 0);
}

.pedra-pos2 {
  left: 90%;
  top: 68%;
  transform: translate(-50%, 0);
}

.pedra-pos3 {
  left: 50%;
  top: 90%;
  transform: translate(-50%, -100%);
}

.pedra-pos4 {
  left: 10%;
  top: 68%;
  transform: translate(-50%, -100%);
}

.pedra-pos5 {
  left: 10%;
  top: 22%;
  transform: translate(-50%, 0);
}

.pedra-pos6 {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* DESKTOP ZOOM: Scale the BOARD wrapper only, keeping HUD safe */
#tabuleiro-wrapper {
  transform: scale(1.1);
  /* 110% Board Zoom */
  transform-origin: center center;
}

/* Ensure Game container is full layout surface */
#game {
  width: 100%;
  height: 100%;
  transform: none;
  /* No global transform to allow fixed children */
}

/* FIX: Target Mobile Landscape explicitly */
/* FIX: Target Mobile Landscape explicitly (Width OR Height triggers) */
@media (max-width: 1025px) and (orientation: landscape),
(max-height: 600px) {

  /* Unset Desktop Zoom on Wrapper, set Mobile Zoom on Wrapper explicitly to avoid traping fixed children */
  #tabuleiro-wrapper {
    transform: scale(0.80);
    /* Apply zoom here */
    transform-origin: center center;
  }

  #tabuleiro-center {
    transform: none;
    /* Remove transform to allow fixed children to break out of stacking context */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #game {
    transform: none;
    overflow: hidden;
    /* Prevent scroll */
  }

  /* 1. Código da sala no canto superior ESQUERDO (HUD - Safe outside wrapper) */
  #info-sala {
    position: fixed;
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    width: auto;
    text-align: left;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 0 0 8px 0;
    z-index: 250;
    pointer-events: auto;
  }

  /* Botão Sair - logo abaixo do info sala */
  #info-sala-local {
    top: 60px !important;
    bottom: auto !important;
    left: 10px !important;
    right: auto !important;
  }



  /* 3. Botões de Desafiar e Se Gabar (Inside Wrapper) */
  #botoes-acoes-laterais {
    position: absolute;
    top: 50%;
    right: -130px !important;
    transform: translateY(-50%);
    flex-direction: column;
    display: flex;
    gap: 12px;
    z-index: 250;
  }

  #botoes-acoes-laterais button {
    min-width: 100px;
    font-size: 1em;
    padding: 10px 16px;
  }

  /* 4. Pedras da Reserva */
  #reserva-pedras,
  #pedras-reserva,
  #circle-pedras {
    position: fixed !important;
    left: 10px !important;
    top: 60% !important;
    transform: translateY(-50%) !important;
    width: 60px !important;
    height: auto !important;
    flex-direction: column !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    background: none !important;
    pointer-events: auto !important;
    z-index: 150 !important;
    /* Ensure it is above info-sala (1000) */
  }

  .pedra-reserva,
  .pedra-circulo.pedra-reserva {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin-bottom: 5px !important;
    transform: none !important;
    width: 38px !important;
    /* Force resize */
    height: 38px !important;
  }

  .pedra-reserva img {
    width: 32px !important;
    height: 32px !important;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  #rotate-device-overlay {
    display: flex !important;
  }
}

@media (max-width: 900px) {
  #cards-info {
    position: static;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0 auto;
    top: unset;
    right: unset;
  }

  /* SCALE THE BOARD TO FIT SCREEN */
  #tabuleiro-center {
    transform-origin: center top;
    transform: scale(0.85);
    /* Default scale for tablets */
    margin-top: 10px;
  }

  #game-mesa {
    min-width: 100%;
    /* Was 100vw, changed to 100% to respect parent constraints */
    padding: 8px 0;
    gap: 12px;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
  }

  /* UI ADJUSTMENTS */
  #info-sala {
    top: 0px;
    left: 0px;
    padding: 6px 10px;
    font-size: 0.85em;
    max-width: 140px;
    /* Prevent overlap with exit btn */
  }

  #info-sala-local {
    top: 10px !important;
    right: 10px !important;
  }

  #btn-sair-partida {
    font-size: 0.8em !important;
    padding: 6px 10px !important;
  }

  .card-info {
    min-width: 0;
    max-width: 100vw;
    font-size: 0.95em;
  }

  #icones-flutuantes {
    top: unset;
    bottom: 24px;
    right: 16px;
    flex-direction: row;
    gap: 10px;
  }

  #reserva-pedras {
    left: 8px;
    top: 80px;
    gap: 10px;
  }

  .pedra-reserva {
    width: 50px !important;
    height: 50px !important;
  }

  #reserva-pedras {
    left: 4px !important;
    top: 60px !important;
    gap: 4px !important;
  }

  .card-popup {
    min-width: 90vw;
    max-width: 98vw;
    padding: 18px 8px 14px 8px;
  }
}

@media (max-width: 600px) {
  #tabuleiro-center {
    transform: scale(0.45);
    /* Aggressive reduction to 45% */
    margin-top: -30px;
  }

  #info-sala {
    font-size: 0.75em;
    background: rgba(24, 28, 36, 0.6);
    /* Less intrusive */
  }

  #icone-acoes {
    width: 48px !important;
    height: 48px !important;
    top: 10px !important;
    /* Move to top aligned with other buttons */
    right: 70px !important;
    /* Beside Exit Button */
  }

  #icone-acoes img {
    width: 38px !important;
    height: 38px !important;
  }

  /* Fix Right Side Buttons (Desafiar/Se Gabar) */
  #botoes-acoes-laterais {
    right: 40px !important;
    /* Pull aggressively inwards */
    top: 50% !important;
    transform: translateY(-50%) scale(0.9) !important;
    /* Reduce scale */
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* FIX: Ensure container is above overlays */
    z-index: 250 !important;
    pointer-events: auto !important;
    /* FIX: Ensure container is above overlays */
    z-index: 250 !important;
    pointer-events: auto !important;
    position: absolute !important;
  }

  #tabuleiro-wrapper {
    transform: scale(0.9);
    /* Scale internal wrapper slightly */
  }
}

#info-sala {
  position: fixed;
  top: 18px;
  left: 18px;
  background: rgba(24, 28, 36, 0.92);
  color: #8ecfff;
  font-size: 1em;
  border-radius: 8px;
  padding: 10px 18px;
  z-index: 30;
  border: 1.5px solid #2d8cff;
  box-shadow: 0 2px 8px #0004;
  opacity: 0.95;
}

#espectadores {
  font-size: 0.95em;
  color: #b0e0ff;
  margin-top: 6px;
}

#icone-acoes {
  position: fixed;
  top: 18px;
  right: 24px;
  font-size: 2.2em;
  background: #fff;
  border: 2px solid #2d8cff;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px #0004;
  z-index: 250 !important;
  transition: background 0.2s, box-shadow 0.2s;
  width: 60px !important;
  height: 60px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
}

#icone-acoes:hover {
  background: #e6f0ff;
  box-shadow: 0 4px 18px #2224;
}

#icone-acoes img {
  width: 54px !important;
  height: 54px !important;
  object-fit: contain;
  display: block;
}

#box-acoes {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  background: #fff;
  color: #222;
  border: 2px solid #2d8cff;
  border-radius: 14px;
  box-shadow: 0 4px 32px #0005;
  min-width: 180px;
  max-width: 260px;
  padding: 24px 22px 18px 22px;
  z-index: 1000;
  display: none;
}

#box-acoes h3 {
  margin-top: 0;
  color: #2d8cff;
  font-size: 1.1em;
}

#box-acoes ul {
  margin: 0 0 0 12px;
  padding: 0;
}

#box-acoes li {
  margin-bottom: 8px;
  font-size: 1em;
}

#tabuleiro-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  width: auto;
  height: auto;
}

#tabuleiro-wrapper {
  position: relative;
  display: inline-block;
  width: 420px;
  height: 229px;
  /* Debug border removed */
  margin: 0 !important;
  padding: 0 !important;
  vertical-align: top;
  box-sizing: content-box;
  border-left: 40px solid #2d8cff;
  border-right: 40px solid #2d8cff;
}

#pedras-mesa {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  margin: 0 !important;
  padding: 0 !important;
}

#tabuleiro {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

#linha-central,
#pedras-mesa {
  position: absolute;
  left: 0;
  top: 0;
}

#moeda-btn {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  background: #ffd700;
  color: #222;
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 1.5em;
  font-weight: bold;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.5s;
  z-index: 150;
}

#moeda-btn:hover {
  background: #ffe066;
}

#circle-pedras {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 260px;
  height: 260px;
  z-index: 31;
  pointer-events: auto;
}

.pedra-circulo,
.pedra-reserva {
  position: absolute;
  width: 68.39px;
  height: 68.39px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2d8cff;
  box-shadow: 0 2px 8px #0006 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transition: top 0.7s cubic-bezier(0.77, 0, 0.175, 1),
    left 0.7s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 31;
}

.pedra-reserva img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.pedra-reserva.dragging {
  opacity: 0.6;
  box-shadow: 0 4px 24px #2225;
  border: 2.5px solid #ffd700;
}

#reserva-pedras {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 30;
  align-items: center;
  pointer-events: auto;
  width: 80px;
  height: 260px;
  /* igual ao círculo */
  justify-content: center;
}

@media (max-width: 700px) {
  #tabuleiro {
    width: 98vw;
    min-width: 0;
  }

  #tabuleiro-container {
    width: 100vw;
    left: 50vw;
    top: 50vh;
    transform: translate(-50%, -50%);
  }

  #moeda-btn {
    width: 44px;
    height: 44px;
    font-size: 1em;
    top: 8px;
  }

  #circle-pedras {
    width: 180px;
    height: 180px;
    left: 2px;
  }

  .pedra-circulo,
  #pedra-central-animada {
    width: 48px;
    height: 48px;
  }

  .pedra-circulo img,
  #pedra-central-animada img {
    width: 40px;
    height: 40px;
  }

  .pedra-reserva {
    width: 42px;
    height: 42px;
    margin-bottom: 4px !important;
    /* Reduced spacing */
  }

  .pedra-reserva img {
    width: 36px;
    height: 36px;
  }
}

#tabuleiro-center {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  /* Stack UI above board */
  align-items: center;
  justify-content: center;
  z-index: 40;
  /* Higher than Info Sala (30) */
  pointer-events: none;
  /* Let clicks pass through empty areas */
}

#tabuleiro-wrapper {
  position: relative;
  display: inline-block;
  width: 420px;
  height: 229px;
  border: 2px dashed red !important;
  margin: 0;
  padding: 0;
  vertical-align: top;
  box-sizing: content-box;
}

#tabuleiro {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  padding: 0;
}

#linha-central {
  position: absolute;
  left: 0;
  width: 100%;
  top: 50%;
  height: 2px;
  background: #2d8cff;
  opacity: 0.7;
  z-index: 10;
  pointer-events: none;
  transform: translateY(-50%);
}

#pedras-mesa {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  margin: 0 !important;
  padding: 0 !important;
}

.pedra-mesa {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* left é definido via JS */
  border: 2px solid #2d8cff;
  z-index: 100 !important;
}

#pontos-centrais {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}

#notificacao-moeda {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  background: #2d8cff;
  color: #fff;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1.2em;
  box-shadow: 0 2px 16px #0007;
  z-index: 2100;
  display: none;
}

@keyframes animarPedraMesa {
  0% {
    left: 0px;
    top: 50%;
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    left: 50%;
    top: 50%;
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.pedra-animada-mesa {
  position: absolute;
  z-index: 110;
  width: 80px;
  height: 80px;
  pointer-events: none;
  animation: animarPedraMesa 2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

#carta-acoes {
  position: fixed;
  right: 32px;
  top: 90px;
  left: auto;
  transform: none;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 370px;
  max-width: 95vw;
  pointer-events: auto;
  transform: scale(0.9);
  /* Desktop: Reduce size slightly */
  transform-origin: top right;
}

#img-carta-acoes {
  width: 370px;
  max-width: 95vw;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 4px 32px #0007;
  position: relative;
  z-index: 1;
}

#conteudo-acoes {
  position: absolute;
  left: 50%;
  top: 2.7%;
  width: 325px;
  height: 438px;
  max-width: 80vw;
  transform: translate(-50%, 0);
  z-index: 2;
  color: #222;
  font-size: 1em;
  text-align: left;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Debug border removed */
  font-family: "Georgia", "Times New Roman", Times, serif;
}

#conteudo-acoes h3 {
  color: #111;
  font-family: "Georgia", "Times New Roman", Times, serif;
  text-align: center;
  font-size: 1.32em;
  font-weight: bold;
  margin-bottom: 14px;
  margin-top: 0;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px #fff6, 0 1px 0 #ccc;
}

#conteudo-acoes ul,
#conteudo-acoes li {
  list-style: none;
  margin: 0;
  padding: 0;
}

#conteudo-acoes li {
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 0.93em;
  margin-bottom: 7px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

#conteudo-acoes li strong {
  color: #111;
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: 1em;
  margin-right: 2px;
}

#conteudo-acoes li span,
#conteudo-acoes .descricao-acao {
  color: #5f82aa;
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 0.93em;
  font-weight: normal;
}

#conteudo-acoes .acoes-segabar-intro {
  color: #111;
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 0.93em;
  margin-bottom: 6px;
  font-weight: bold;
  text-align: left;
}

#conteudo-acoes .acoes-segabar-lista>li {
  color: #111;
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 0.93em;
  margin-bottom: 4px;
  font-weight: bold;
  display: block;
}

#conteudo-acoes .acoes-segabar-lista>li>span {
  font-weight: normal;
  color: #5f82aa;
  margin-left: 4px;
}

#conteudo-acoes .acoes-segabar-lista {
  margin-left: 22px;
  margin-top: 6px;
}

#conteudo-acoes .acoes-segabar-lista ul li {
  color: #5f82aa;
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 0.91em;
  font-weight: normal;
  margin-bottom: 2px;
  list-style: disc inside;
  display: list-item;
}

@media (max-width: 400px) {

  #carta-acoes,
  #img-carta-acoes {
    width: 98vw;
    max-width: 98vw;
  }

  #conteudo-acoes {
    width: 90vw;
    max-width: 90vw;
  }
}

@keyframes jogarMoedaRPG {
  0% {
    transform: translateY(0) rotateY(0deg) scale(1);
  }

  20% {
    transform: translateY(-60px) rotateY(360deg) scale(1.1);
  }

  50% {
    transform: translateY(-120px) rotateY(720deg) scale(1.2);
  }

  80% {
    transform: translateY(-60px) rotateY(1080deg) scale(1.1);
  }

  100% {
    transform: translateY(0) rotateY(1440deg) scale(1);
  }
}

.moeda-animando {
  animation: jogarMoedaRPG 1.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  will-change: transform;
}

.moeda-girando {
  animation: girarMoedaRPG 1.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes girarMoedaRPG {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(1800deg);
  }
}

#moeda-animada {
  width: 80px;
  height: 80px;
  position: relative;
  perspective: 600px;
  display: inline-block;
  transform-style: preserve-3d;
  background: none !important;
  box-shadow: none !important;
}

#moeda-frente,
#moeda-verso {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 52%;
  position: absolute;
  left: 0;
  top: 0;
  backface-visibility: hidden;
  transition: transform 0.6s;
  box-shadow: none;
  background: none;
}

#moeda-animada::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: none;
  box-shadow: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
  background: none;
}

#moeda-btn:hover #moeda-animada::after {
  opacity: 1;
}

#escolha-cara-coroa button {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  color: #fff !important;
}

#escolha-cara-coroa button img {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 52%;
  background: none;
  display: block;
  margin-bottom: 6px;
  padding: 0;
  box-shadow: none;
}

#game {
  display: none;
}

#game.active {
  display: block;
}

#info-sala {
  border: none !important;
}

#icone-acoes {
  border: none !important;
}

#box-acoes {
  border: none !important;
}

#tabuleiro-center {
  border: none !important;
}

#tabuleiro-wrapper {
  border: none !important;
}

#circle-pedras {
  border: none !important;
}

#carta-acoes {
  border: none !important;
}

#conteudo-acoes {
  border: none !important;
}

#pedra-central-animada {
  border: none !important;
}

/* Borda vermelha para depuração nas pedras da reserva e da mesa */
.pedra-reserva,
.pedra-mesa,
.pedra-oficial {
  border: 2px solid #2d8cff;
  z-index: 100 !important;
}

.pedra-mesa>div,
.pedra-oficial>div {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  background: #fff;
  border: 2px solid #2d8cff;
  box-sizing: border-box;
}

/* Animação de rodar em círculo */
.pedra-circulo.animar-circulo {
  animation: girarCirculo 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes girarCirculo {
  0% {
    transform: scale(1) rotate(0deg);
  }

  100% {
    transform: scale(1.1) rotate(360deg);
  }
}

/* Animação para alinhar em diagonal */
.pedra-circulo.alinhar-diagonal {
  transition: left 0.8s cubic-bezier(0.77, 0, 0.175, 1),
    top 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Força ocultação se algum outro CSS sobrescrever */
#game:not(.active),
#lobby:not(.active),
#start-screen:not(.active) {
  display: none !important;
}

.pedra-circulo.dragging,
.pedra-reserva.dragging {
  position: fixed !important;
  z-index: 110 !important;
  pointer-events: none;
}

.ghost-pedra {
  background: #fff;
  border: 2px solid #2d8cff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #0003;
}

/* ================= BOT DIALOGUE ================= */
#bot-dialogue-bubble {
  position: absolute;
  top: 15%;
  /* Adjust based on bot avatar position if any */
  right: 20%;
  /* Right side for P2/Bot */
  background: #fff;
  color: #333;
  padding: 15px 20px;
  border-radius: 20px;
  border-bottom-left-radius: 0;
  /* Callout shape */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  max-width: 250px;
  z-index: 2000;
  /* High enough but below some overlays */
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: none;
}

#bot-dialogue-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  display: block;
}

#bot-dialogue-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 0px solid transparent;
  border-right: 20px solid transparent;
  border-top: 15px solid #fff;
  /* Matches background */
}

/* Matches background */


/* Orphaned block removed */

.ghost-pedra img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

/* Silhueta branca para slots de destino ao arrastar pedra da reserva */
.highlight-slot {
  transition: background 0.2s, border 0.2s;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2.5px #fff8, 0 0 8px 2px #fff3 !important;
  border: 2.5px solid #fff !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

.highlight-slot:hover,
.highlight-slot:active,
.highlight-slot:focus {
  box-shadow: 0 0 0 2.5px #fff8, 0 0 8px 2px #fff3 !important;
  border: 2.5px solid #fff !important;
  background: rgba(255, 255, 255, 0.55) !important;
}

/* Animação de flip para virar pedra */
@keyframes flipPedra {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(180deg);
  }
}

.pedra-flip {
  animation: flipPedra 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  backface-visibility: hidden;
}

.pedra-oficial,
.pedra-reserva,
.pedra-circulo,
.pedra-mesa {
  border: 2px solid #2d8cff;
  z-index: 100 !important;
}

/* Ajustar espaçamento das pedras na reserva */
.pedra-circulo.pedra-reserva,
.pedra-reserva {
  margin-bottom: 12px !important;
}

.pedra-troca-selecionada {
  box-shadow: 0 0 0 2.5px #ffd70088, 0 0 8px 2px #fff3 !important;
  border: 2.5px solid #ffd700 !important;
  z-index: 10001 !important;
  transition: box-shadow 0.2s, border 0.2s;
}

.pedra-drop-alvo {
  box-shadow: 0 0 0 2.5px #ffd70088, 0 0 8px 2px #fff3 !important;
  border: 2.5px solid #ffd700 !important;
  z-index: 10001 !important;
  transition: box-shadow 0.2s, border 0.2s;
}

#btn-desafiar {
  margin: 24px auto 0 auto;
  display: block;
  font-size: 1.2em;
  padding: 12px 32px;
  border-radius: 8px;
  background: #2d8cff;
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px #0004;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

#btn-segabar {
  margin: 16px auto 0 auto;
  display: block;
  font-size: 1.2em;
  padding: 12px 32px;
  border-radius: 8px;
  background: #ffd700;
  color: #222;
  border: none;
  box-shadow: 0 2px 8px #0004;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s, box-shadow 0.2s;
}

#toast {
  position: fixed;
  bottom: -55px;
  left: 50%;
  transform: translateX(-50%);
  background: transparent url('../img/ui/notification_icon.png') no-repeat center center !important;
  background-size: 100% 100% !important;
  /* Fit image exactly */
  color: #fff;
  padding: 120px 180px;
  /* Balanced padding for text safe area */
  border-radius: 0;
  font-size: 1.2em;
  box-shadow: none !important;
  border: none !important;
  z-index: 2100 !important;
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.3s;
  display: none;
  white-space: nowrap;
  /* Prevent text wrapping if possible */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

#toast-interno {
  position: fixed;
  bottom: -55px;
  /* Matched to #toast */
  left: 50%;
  transform: translateX(-50%);
  background: transparent url('../img/ui/notification_icon.png') no-repeat center center !important;
  background-size: 100% 100% !important;
  color: #fff;
  padding: 120px 180px;
  /* Matched to #toast */
  border-radius: 0;
  font-size: 1.2em;
  /* Matched to #toast */
  box-shadow: none !important;
  border: none !important;
  z-index: 2100 !important;
  /* Slightly higher than #toast just in case */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  display: none;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  font-family: 'Cinzel', serif;
}

#toast-interno.mostrar {
  display: block !important;
  opacity: 1 !important;
}

.silhueta-espiada {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd700cc 60%, #fff00044 100%);
  box-shadow: 0 0 16px 4px #ffd70088, 0 0 32px 8px #fff00033;
  opacity: 0.7;
  pointer-events: none;
  z-index: 150;
  animation: silhuetaFade 2.2s linear forwards;
  border: 3px solid #ffd700;
}

@keyframes silhuetaFade {
  0% {
    opacity: 0.8;
  }

  80% {
    opacity: 0.7;
  }

  100% {
    opacity: 0;
  }
}

/* Nova animação para borda-dourada-animada: igual ao highlight-slot/slot selecionado */
.borda-dourada-animada {
  border-color: #ffd700 !important;
  box-shadow: 0 0 0 4px #ffd700cc, 0 0 16px 6px #fff00055;
  animation: bordaDouradaSlotVolta 2.2s linear forwards;
}

@keyframes bordaDouradaSlotVolta {
  0% {
    border-color: #ffd700;
    box-shadow: 0 0 0 4px #ffd700cc, 0 0 16px 6px #fff00055;
  }

  80% {
    border-color: #ffd700;
    box-shadow: 0 0 0 4px #ffd700cc, 0 0 16px 6px #fff00055;
  }

  100% {
    border-color: #2d8cff;
    box-shadow: none;
  }
}

#placar-turno-central {
  position: fixed;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.15em;
  border-radius: 10px;
  padding: 0;
  z-index: 250;
  box-shadow: none;
  text-align: center;
  min-width: 0;
  background: none !important;
}

#botoes-acoes-laterais {
  position: absolute !important;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* FIX: Ensure side buttons are clickable and above overlays */
  z-index: 250 !important;
  pointer-events: auto !important;
}

#botoes-acoes-laterais button {
  min-width: 120px;
  font-size: 1.1em;
  padding: 12px 28px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-weight: bold;
}

/* Padronização visual das pedras de escolha do desafio para igualar à .pedra-reserva */
#opcoes-desafio button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #2d8cff;
  border-radius: 50%;
  width: 68.39px;
  height: 68.39px;
  cursor: pointer;
  box-shadow: 0 2px 8px #0007;
  margin: 0 6px;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, border 0.2s;
}

#opcoes-desafio button img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  margin: 0 auto 2px auto;
  box-sizing: border-box;
}

#opcoes-desafio button span {
  font-size: 0.93em;
  color: #222;
  margin-top: 0;
  margin-bottom: 2px;
  display: block;
  text-align: center;
  font-family: "Georgia", "Times New Roman", Times, serif;
}

#opcoes-desafio {
  width: 740px;
  max-width: 98vw;
  min-width: 320px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.box-desafio {
  border: 2.5px solid #ffd700;
  border-radius: 12px;
  background: #23242a;
  padding: 8px 0 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0 !important;
}

#opcoes-desafio .titulo-desafio {
  background: transparent !important;
  margin-bottom: 6px;
  border: none !important;
  box-shadow: none !important;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 1em;
  padding: 0;
}

#opcoes-desafio .linha-pedras {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 0;
  margin-top: 0;
}

#opcoes-desafio .pedra-reserva {
  flex: none;
  width: 68.39px;
  height: 68.39px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2d8cff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px #0006 !important;
  cursor: pointer;
  margin: 0 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, border 0.2s;
}

#opcoes-desafio .pedra-reserva img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  box-sizing: border-box;
}

#opcoes-desafio .pedra-label {
  font-size: 0.93em;
  color: #222;
  margin-top: 2px;
  text-align: center;
  font-family: "Georgia", "Times New Roman", Times, serif;
  background: none;
  border: none;
  box-shadow: none;
  pointer-events: none;
  line-height: 1.1;
  width: 100%;
  user-select: none;
}

/* GLOBAL MOBILE FIXES */
* {
  -webkit-tap-highlight-color: transparent;
  /* Remove blue tap box on Android/iOS */
  -webkit-touch-callout: none;
  /* Disable long-press menu */
}

.pedra-mesa,
.pedra-oficial {
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  /* Disable browser handling of gestures (scrolling/zooming) on stones */
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -webkit-touch-callout: none;
  /* CRITICAL: disable iOS/Android long-press menu */
  pointer-events: none;
  /* Pass events to parent div */
}

/* Permitir pointer events apenas em icones especificos se necessario, mas geralmente nao no tabuleiro */
#icone-acoes,
#btn-sair-partida,
.btn-action {
  pointer-events: auto !important;
}

#icone-acoes img {
  pointer-events: none;
}

body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.desafio-alvo {
  box-shadow: 0 0 0 4px #ffd700cc, 0 0 16px 6px #fff00055 !important;
  border: 3px solid #ffd700 !important;
  animation: bordaDouradaSlotVolta 2.2s linear forwards;
  z-index: 150 !important;
}

@media (max-width: 800px) {

  #opcoes-desafio,
  #tabuleiro-wrapper {
    width: 98vw !important;
    min-width: 0;
    max-width: 100vw;
  }
}

/* Corrige botões de ação dentro de #opcoes-desafio para não ficarem circulares */
#opcoes-desafio .acao-btn {
  border-radius: 10px !important;
  width: auto !important;
  height: auto !important;
  min-width: 120px;
  min-height: 44px;
  padding: 12px 32px;
  background: linear-gradient(135deg, #2d8cff 70%, #1a5fb4 100%);
  color: #fff;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 2px 12px #0005;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 12px;
  transition: background 0.2s, box-shadow 0.2s;
}

#opcoes-desafio .acao-btn:hover {
  background: linear-gradient(135deg, #1a5fb4 70%, #2d8cff 100%);
  box-shadow: 0 4px 18px #2224;
}

#opcoes-segabar {
  z-index: 1100 !important;
  position: relative !important;
  pointer-events: auto !important;
}

#opcoes-segabar .acao-btn {
  pointer-events: auto !important;
}

/* Marcadores de ponto (pontuação dos jogadores) */
.marcador-ponto {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #222;
  border: 3px solid #8ecfff;
  box-shadow: 0 2px 8px #0007;
  z-index: 250;
  transition: background 0.3s, border 0.3s;
}

.marcador-ponto.marcador-esquerda[data-idx="0"] {
  left: 43px;
  top: 44px;
}

.marcador-ponto.marcador-esquerda[data-idx="1"] {
  left: 78px;
  top: 44px;
}

.marcador-ponto.marcador-esquerda[data-idx="2"] {
  left: 113px;
  top: 44px;
}

.marcador-ponto.marcador-direita[data-idx="0"] {
  left: 600px;
  top: 244px;
}

.marcador-ponto.marcador-direita[data-idx="1"] {
  left: 635px;
  top: 244px;
}

.marcador-ponto.marcador-direita[data-idx="2"] {
  left: 670px;
  top: 244px;
}

.marcador-ponto.preenchido {
  background: #ffd700;
  border-color: #ffd700;
  box-shadow: 0 0 12px 2px #ffd70099;
}

#tela-vitoria {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

#tela-vitoria.active {
  display: flex !important;
}

#tela-vitoria-conteudo {
  background: #232942;
  color: #fff;
  padding: 48px 60px;
  border-radius: 18px;
  box-shadow: 0 4px 32px #000a;
  text-align: center;
  max-width: 90vw;
}

#tela-vitoria-titulo {
  font-size: 2.2em;
  margin-bottom: 18px;
  color: #ffd700;
  text-shadow: 0 2px 8px #000a;
}

#tela-vitoria-msg {
  font-size: 1.25em;
  margin-bottom: 18px;
}

#btn-voltar-lobby {
  margin-top: 32px;
  font-size: 1.1em;
  padding: 12px 32px;
  border-radius: 8px;
  background: #2d8cff;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

#btn-voltar-lobby:hover {
  background: #1a5fb4;
}

/* ===== Ko-fi Widget Customizado ===== */
body>.floatingchat-donate-button {
  position: fixed !important;
  right: 24px !important;
  left: auto !important;
  bottom: 24px !important;
  top: auto !important;
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  box-shadow: 0 2px 12px #794bc488 !important;
  background: #794bc4 !important;
  z-index: 1050 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

/* Controla a visibilidade do ícone movido para o body */
#icone-acoes {
  display: none !important;
  /* Escondido por padrão */
}

/* Quando o jogo está ativo, mostra o ícone (precisa ser irmão do #game) */
#game.active~#icone-acoes {
  display: flex !important;
  /* Default desktop pos */
  position: fixed !important;
  top: 20px;
  right: 20px;
  z-index: 1050;
}

body>.floatingchat-donate-button img {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: transparent !important;
  margin: 0 !important;
  box-shadow: none !important;
}

body>.floatingchat-donate-button span {
  display: none !important;
  /* Esconde qualquer texto ao lado do ícone */
}

/* ===== Mobile Landscape Fixes (Action Card) ===== */
/* ===== Mobile Landscape Fixes (Action Card & Menu Scale) ===== */
@media screen and (max-height: 768px) and (max-width: 1024px) {
  #carta-acoes {
    top: 50% !important;
    /* Center vertically */
    bottom: auto !important;
    left: auto !important;
    /* NOT center horizontal */
    right: 10px !important;
    /* Stick to right side */
    transform: translateY(-50%) !important;
    /* Only vertical translation */
    height: 90vh !important;
    width: auto !important;
    /* display: flex !important; REMOVED */
    /* align-items: flex-start !important; REMOVED */
  }

  #img-carta-acoes {
    height: 90vh !important;
    width: auto !important;
    min-width: 320px !important;
    /* Ensure minimum width for text */
    max-width: 90vw !important;
    overflow: hidden;
    /* Prevent image spill */
  }

  #conteudo-acoes {
    height: 75% !important;
    /* Reduced height to increase bottom margin */
    /* Taller area => smaller margins */
    width: 85% !important;
    left: 50% !important;
    top: 42% !important;
    /* Shifted UP 3% (was 45%) */
    transform: translate(-50%, -50%) !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-top: 5px;
  }

  /* Fix Toggle Icon on Mobile Landscape */
  #icone-acoes {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    /* Top right corner */
    left: auto !important;
    z-index: 1200 !important;
    /* FORCE ABOVE CARD (1000) */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    /* Remove white circle/square/borders */
    border-radius: 0 !important;
  }

  /* Fix Side Buttons Cutoff on Mobile Landscape */
  #botoes-acoes-laterais {
    right: 2px !important;
    /* Extreme edge to avoid table overlap */
    transform: translateY(-50%) scale(0.85) !important;
    /* Slightly smaller */
  }

  /* Internal Close Button - HIDDEN as per user request */
  .fechar-card {
    display: none !important;
  }

  /* SCALE FIX for Mobile Landscape Menu ONLY */
  #start-screen.mode-online {
    width: 100% !important;
    height: 100vh !important;
    overflow: visible !important;
    padding: 0 !important;
    transform: translate(-50%, -50%) scale(0.77) !important;
    /* Force Scale */
    transform-origin: center center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }
}

/* Default state for close button (hidden on desktop usually, but useful to have) */
.fechar-card {
  display: none;
}

/* ================================= PREMIUM START SCREEN CSS ================================= */
/* Premium Body Background Override */
body {
  background: #0d1117 url('../img/backgrounds/Fundo.jpg') no-repeat center 25% fixed;
  background-size: 100% auto;
  font-family: 'Times New Roman', serif;
}

/* Fallback background if image missing */
#start-screen.premium-screen {
  background: radial-gradient(circle at center, #1b212c 0%, #0d1117 100%);
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: visible;
  padding: 0;
}

/* --- TYPOGRAPHY --- */
.game-title {
  font-family: 'Cinzel', serif;
  font-size: 5em;
  letter-spacing: 0.1em;
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #FDE08D 0%, #D4AF37 40%, #8B6508 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
  text-transform: uppercase;
  text-align: center;
}

.game-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.4em;
  font-style: italic;
  color: #a8cfff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin-top: 10px;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* Divider Ornament between Title and Subtitle */
.divider-ornament {
  margin: 15px 0;
  opacity: 0.9;
}

/* --- BUTTONS --- */
.menu-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 50px;
  width: 380px;
}

.premium-btn {
  position: relative;
  width: 100%;
  height: 64px;
  border: none;
  outline: none;
  cursor: pointer;
  background: transparent;
  font-family: 'Cinzel', serif;
  font-size: 1.25em;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  /* Fallback */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, filter 0.2s;
  overflow: visible;
}

.premium-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

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

.btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* METALLIC THEMES */
/* Common Border Structure */
.premium-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  /* Fancy shape simulation using clip-path or borders */
  /* Let's use simple CSS gradients for the "Bar" look with diamond tips */
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.8) 15%, rgba(0, 0, 0, 0.8) 85%, transparent 100%);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(0, 0, 0, 0.5);
}

.premium-btn::after {
  /* Metallic Rim */
  content: '';
  position: absolute;
  top: 0;
  left: 15px;
  right: 15px;
  bottom: 0;
  z-index: 0;
  border: 2px solid;
  border-image: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 100%) 1;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  background-size: cover;
}

/* GOLD VARIANT */
.btn-gold {
  color: #4a3415;
}

.btn-gold::after {
  background: linear-gradient(180deg, #FDE08D 0%, #D4AF37 50%, #8B6508 100%);
  border-color: #D4AF37;
  border-radius: 4px;
  /* Slight round logic override */
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
}

.btn-gold .btn-text {
  color: #3e2704;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* JADE VARIANT */
.btn-jade {
  color: #e0fff0;
}

.btn-jade::after {
  background: linear-gradient(180deg, #5c9e78 0%, #2e8b57 50%, #054a29 100%);
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
  box-shadow: inset 0 0 10px #000;
}

.btn-jade .btn-text {
  color: #d1ffe6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* STEEL VARIANT */
.btn-steel {
  color: #e0f0ff;
}

.btn-steel::after {
  background: linear-gradient(180deg, #7aa3c9 0%, #4682b4 50%, #1e3c54 100%);
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
}

.start-footer {
  position: absolute;
  bottom: 20px;
  font-size: 0.8em;
  color: #666;
  font-family: sans-serif;
  opacity: 0.6;
}

/* MODALS (Room Options etc) */
.premium-modal {
  background: rgba(13, 17, 23, 0.95);
  border: 2px solid #D4AF37;
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  min-width: 320px;
}

.gold-text {
  color: #D4AF37;
  font-family: 'Cinzel', serif;
  margin-bottom: 10px;
}

.premium-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #4682b4;
  color: #fff;
  padding: 10px;
  width: 100%;
  font-family: 'Cinzel', serif;
  text-align: center;
}

.small-btn {
  width: auto !important;
  padding: 0 40px;
  height: 48px;
  font-size: 1em;
}

.btn-link {
  background: none;
  border: none;
  color: #a8cfff;
  text-decoration: underline;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  margin-top: 10px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .game-title {
    font-size: 2.2em;
    /* Reduced from 3em */
    margin-top: 60px;
    /* Moved down */
  }

  /* Move action buttons right on mobile */
  #botoes-acoes-laterais {
    right: 10px !important;
    /* Was -170px */
  }

  .menu-container {
    width: 90%;
  }

  .premium-modal {
    width: 90%;
  }

  /* FIX: Start Screen Mobile Layout */
  #start-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    transform: none;
    display: flex;
    /* Use flex instead of block */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevent dragging/scrolling */
    background: transparent;
    /* Keep transparency */
    margin: 0;
    padding: 0;
  }
}

/* =====================================================
   ATMOSPHERIC EFFECTS
   ===================================================== */
#atmosphere-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* --- Fog Layers --- */
.fog-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: url("../img/fog_texture.png") repeat-x;
  background-size: 50% 100%;
  opacity: 0.15;
  animation: fogScroll 60s linear infinite;
}

.fog-2 {
  animation-duration: 45s;
  animation-direction: reverse;
  opacity: 0.1;
}

@keyframes fogScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* --- God Rays --- */
.light-ray-container {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.2;
}

.light-ray {
  position: absolute;
  width: 100px;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 215, 0, 0.2) 50%, transparent 100%);
  transform-origin: center;
  animation: rayRotate 20s ease-in-out infinite alternate;
}

.ray-2 {
  animation-duration: 25s;
  animation-delay: -5s;
  width: 150px;
  opacity: 0.5;
}

@keyframes rayRotate {
  from {
    transform: rotate(-15deg);
  }

  to {
    transform: rotate(15deg);
  }
}

/* --- Ambient Flicker (Candle) --- */
.ambient-light-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 200, 100, 0.05), transparent 80%);
  mix-blend-mode: overlay;
  animation: candleFlicker 4s infinite alternate;
}

@keyframes candleFlicker {
  0% {
    opacity: 0.3;
  }

  25% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.35;
  }

  75% {
    opacity: 0.6;
  }

  100% {
    opacity: 0.4;
  }
}

/* --- Vignette --- */
.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

/* --- Cloth Animation --- */
#pano-mesa {
  animation: clothSway 8s ease-in-out infinite alternate;
}

@keyframes clothSway {
  0% {
    transform: translateY(0) skewX(0deg);
  }

  100% {
    transform: translateY(-2px) skewX(0.5deg);
  }
}

/* --- Custom Button Image Override --- */
#start-game-btn {
  background-image: url('../img/ui/colors/Verde.webp') !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: transparent !important;
  color: #fff !important;
  font-family: "Cinzel Decorative", serif;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  border: none !important;
  width: 300px !important;
  height: 60px !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.2s;
}

#start-game-btn:hover {
  transform: scale(1.05);
}

#start-game-btn:active {
  transform: scale(0.95);
}

#back-to-main-btn {
  position: absolute !important;
  top: -25% !important;
  /* Raised position */
  left: calc(50% + 220px) !important;
  /* To the right of the title */
  right: auto !important;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  color: #daa520 !important;
  font-family: sans-serif !important;
  font-size: 3.5rem !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  z-index: 2000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0 !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  box-shadow: none !important;
}

#back-to-main-btn:hover {
  color: #fff !important;
  transform: translateY(-50%) !important;
  /* Prevent movement/scaling */
  filter: brightness(1.2);
}


#create-room-btn {
  background-image: url('../img/ui/colors/Laranja.webp') !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: transparent !important;
  color: #fff !important;
  font-family: "Cinzel Decorative", serif;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  border: none !important;
  width: 200px !important;
  height: 65px !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.2s;
}

#create-room-btn:hover {
  transform: scale(1.05);
}

#create-room-btn:active {
  transform: scale(0.95);
}

#join-room-btn {
  background-image: url('../img/ui/colors/Ciano.webp') !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: transparent !important;
  color: #fff !important;
  font-family: "Cinzel Decorative", serif;
  font-size: 1.25em;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  border: none !important;
  width: 280px !important;
  height: 65px !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: transform 0.2s;
}

#join-room-btn:hover {
  transform: scale(1.05);
}

#join-room-btn:active {
  transform: scale(0.95);
}

/* --- RPG Text Inputs --- */
#room-options input[type="text"],
#join-room input[type="text"] {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #daa520;
  /* Goldenrod */
  border-radius: 4px;
  color: #ffd700;
  /* Gold text */
  font-family: "Cinzel", serif;
  font-size: 1.1em;
  padding: 10px;
  margin: 10px 0;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  width: 300px !important;
  /* Force width match */
}

#room-options input[type="text"]:focus,
#join-room input[type="text"]:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  background: rgba(0, 0, 0, 0.8);
}

#room-options input[type="text"]::placeholder,
#join-room input[type="text"]::placeholder {
  color: rgba(255, 215, 0, 0.5);
}

/* --- RPG Radio Buttons --- */
#room-options label,
#join-room label {
  font-family: "Cinzel", serif;
  color: #baecff;
  /* Light blue text */
  font-size: 1.1em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 5px 10px;
  transition: color 0.3s;
}

#room-options label:hover,
#join-room label:hover {
  color: #fff;
  text-shadow: 0 0 5px #baecff;
}

#room-options input[type="radio"],
#join-room input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #daa520;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  margin: 0;
}

#room-options input[type="radio"]:checked,
#join-room input[type="radio"]:checked {
  background: #daa520;
  box-shadow: 0 0 8px #daa520;
  border-color: #ffd700;
}

#room-options input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* --- Scoreboard RPG Theme (Minimalist) --- */
#placar-turno-central {
  font-family: "Cinzel Decorative", serif !important;
  font-size: 1.5em !important;
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
  letter-spacing: 1px;
  background: none !important;
  padding: 5px 10px;
  border: none !important;
  backdrop-filter: none !important;
  transition: opacity 0.3s ease;
  opacity: 0.9;
}

#placar-turno-central:hover {
  opacity: 1;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6) !important;
  cursor: default;
}



/* --- Game Action Buttons --- */
#btn-desafiar,
#btn-segabar {
  width: 230px;
  height: 76px;
  border: none;
  outline: none;
  box-shadow: none;
  background-color: transparent;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent !important;
  text-shadow: none !important;
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
  /* Flex in container handles layout */
  margin: 0;
}

#btn-desafiar {
  background-image: url('../img/ui/Desafiar.webp');
}

#btn-segabar {
  background-image: url('../img/ui/Se_Gabar.webp');
}

#btn-desafiar:hover,
#btn-segabar:hover {
  transform: scale(1.1);
  filter: none;
  /* Remove any color shift */
  outline: none;
  box-shadow: none;
}

#btn-desafiar:active,
#btn-segabar:active {
  transform: scale(0.95);
  filter: none;
  outline: none;
}

/* FIX: Coin Selector Z-Index */
#escolha-cara-coroa {
  z-index: 1000 !important;
  /* Modal Tier */
}

#moeda-btn {
  z-index: 150 !important;
  /* Active Tier */
}

/* FIX: Action Icon and Speech Bubble Override */
#icone-acoes {
  z-index: 1050 !important;
  /* Overlay Tier */
  pointer-events: auto !important;
}

#bot-speech-bubble {
  z-index: 2100 !important;
  /* Critical Tier (Toasts) */
}

/* FIX: Ensure Start Screen Changelog respects layer */
#changelog-box {
  z-index: 50 !important;

  /* Sub-base layer or just below Base */
}

/* FIX: Marker Glow */
.marcador-ponto.ativo {
  background-color: #ffd700;
  box-shadow: 0 0 10px #ffd700, 0 0 20px #ffea00;
  border-color: #ffd700;
  transform: scale(1.1);
}

/* --- RESTORED ORIGINAL BACK BUTTON (Start Screen -> Online Menu) --- */
#back-to-main-btn {
  position: absolute !important;
  top: 18% !important;
  left: calc(50% + 220px) !important;
  right: auto !important;
  transform: translateY(-50%);
  background: none !important;
  border: none !important;
  color: #daa520 !important;
  font-family: sans-serif !important;
  font-size: 3.5rem !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  z-index: 99999 !important;
  /* display: flex; REMOVE to allow JS control */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0 !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  box-shadow: none !important;
}

#back-to-main-btn:hover {
  color: #fff !important;
  transform: translateY(-50%) !important;
  filter: brightness(1.2);
}