@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&display=swap");

:root {
  --card-width: 60px;
  --card-height: 84px;
  --card-font-size-value: 1.4em;
  --card-font-size-suit: 2em;
  --card-text-color: #000;
  --suit-font-weight: 400;
  --suit-font-family: "Font Awesome 6 Pro";
  --color-primary: #2c3e50;
  --color-secondary: #1a252f;
  --color-tertiary: #34495e;
  --color-board: #243447;
  --color-green-light: #c7ffc7;
  --color-blue-light: #c5dbff;
  --color-red-light: #ffc1ba;
  --card-background-color: #f4f6f8;
  --color-suit-red: #e74c3c;
  --color-suit-black: #2c3e50;
  --modal-bg-color: #ffffff;
  --bg-color: #ffffff;
  --modal-text-color: #333333;
  --chat-bg-color: #f0f0f0;
}

/* ===== Layout geral ===== */
* {
  font-family: "Montserrat", sans-serif;
}

body {
  font-family: "Montserrat", sans-serif;
  font-size: 1em;
  background: linear-gradient(
    135deg,
    var(--color-tertiary),
    var(--color-primary)
  );
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin: 20px auto;
  text-align: center;
  font-size: 2.5em;
  color: white;
  font-weight: bold;
}

h2 {
  margin: 0 auto;
  text-align: center;
  font-size: 1.5em;
  color: white;
}

h3 {
  margin: 0 auto;
  text-align: center;
  font-size: 1.5em;
  color: var(--color-secondary);
  font-weight: bold;
}

strong,
b {
  font-weight: bold;
}

em {
  font-style: italic;
}

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='%23122944' d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z'/></svg>");
  background-size: 13px;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-color: white;
  padding-right: 30px;
}

i.black {
  color: black !important;
}

i.red {
  color: red !important;
}

#language-switcher-container {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
}

.language-selector {
  display: flex;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: background-color 0.2s;
  opacity: 0.7;
  width: auto !important;
}

.lang-btn.active {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== Página de Erro 404 ===== */
.error-body {
  min-height: 100vh;
}
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 600px;
  min-height: 100vh;
  margin: 0 auto;

  text-align: center;
}

.error-animation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  margin-bottom: 30px;
}

.error-animation-container .loading-card {
  width: 70px;
  height: 94px;
  border-radius: 10px;
  font-size: 3rem;
}

.error-animation-container .loading-card::before {
  top: 6px;
  left: 8px;
  font-size: 1.2rem;
}

.error-animation-container .logo-number {
  font-size: 6rem;
  margin-top: -40px;
}

.error-container h1 {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  color: white;
}

.error-container p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.back-button {
  background-color: var(--color-secondary);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-button:active {
  transform: translateY(1px);
}

.error-footer {
  width: 90%;
  margin: 0 auto;
  padding: 20px 0;
  text-align: center;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.7;
}

.error-footer p {
  font-size: 0.85rem;
  color: white;
  line-height: 1.8;
}

.error-footer a {
  color: #ffa140;
  text-decoration: none;
  margin: 0 5px;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  background: linear-gradient(135deg, #2c3e50, #4d6a95);
  z-index: 10000;
  position: fixed;
  top: 0;
  left: 0;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.row-cards {
  display: flex;
  gap: 15px;
}

.loading-card {
  width: 60px;
  height: 80px;
  background-color: white;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  animation: floatCard 1.5s ease-in-out infinite;
  position: relative;
}

.loading-card::before {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: 1rem;
  font-family: "Font Awesome 6 Pro";
  font-weight: 900;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.card-r {
  color: #c0392b;
  transform: rotate(-10deg);
  --rotation: -10deg;
  animation-delay: 0s;
}
.card-r::before {
  content: "\f219";
}

.card-o {
  color: #2c3e50;
  transform: translateY(-10px);
  --rotation: 0deg;
  animation-delay: 0.2s;
}
.card-o::before {
  content: "\f2f4";
}

.card-w {
  color: #c0392b;
  transform: rotate(10deg);
  --rotation: 10deg;
  animation-delay: 0.4s;
}
.card-w::before {
  content: "\f004";
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0) rotate(var(--rotation, 0deg));
  }
  50% {
    transform: translateY(-15px) rotate(var(--rotation, 0deg));
  }
}

.logo-number {
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  position: relative;
  z-index: 10;
  margin-top: -35px;
  color: var(--color-secondary);
  text-shadow:
    3px 3px 0 var(--color-secondary),
    -3px -3px 0 var(--color-secondary),
    3px -3px 0 var(--color-secondary),
    -3px 3px 0 var(--color-secondary),
    3px 0 0 var(--color-secondary),
    -3px 0 0 var(--color-secondary),
    0 3px 0 var(--color-secondary),
    0 -3px 0 var(--color-secondary);
  filter: drop-shadow(0px 6px 4px rgba(0, 0, 0, 0.5));
  animation: pulseNumber 3s ease-in-out infinite;
}

.logo-number::after {
  content: "5";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  background: linear-gradient(to bottom, #ffd700 10%, #f39c12 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

@keyframes pulseNumber {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.loading-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: pulseText 2s infinite;
}

@keyframes pulseText {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* ===== Área da lobby ===== */
#lobby {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  justify-content: space-between;
}

#lobby #lobby-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 400px;
}

#lobby #title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

#lobby .logo-title.left {
  display: block;
  position: absolute;
  left: 10px;
  top: 10px;
  width: 80px;
  height: 80px;
}

#lobby hr {
  width: 100%;
  margin: 0;
}

#lobby input {
  background-color: white;
  color: var(--color-secondary);
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 1em;
  font-weight: bold;
  width: calc(100% - 24px);
  text-align: center;
}

#lobby input:focus,
#lobby input:focus-visible {
  outline: none;
  border: 2px solid var(--color-secondary);
}

#lobby #player-name-input {
  width: calc(100% - 24px);
}

#lobby #game-id-input {
  text-transform: uppercase;
}

#lobby #game-id-input::placeholder {
  text-transform: none;
}

#lobby .connection-status-container {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#lobby #connection-status {
  justify-content: center !important;
  text-align: center !important;
  font-weight: bold !important;
  text-transform: uppercase !important;
}

#lobby #connection-status-info {
  justify-content: center !important;
  text-align: center !important;
  color: white !important;
  font-size: 0.875em !important;
}

#lobby label {
  font-size: 1.2em;
  font-weight: bold;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#lobby p,
#lobby label {
  text-align: center;
  color: white;
}

#lobby label.small {
  font-size: 1em;
  font-weight: normal;
}

#lobby select {
  background-color: white;
  color: var(--color-secondary);
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 1em;
  font-weight: bold;
  width: 100%;
  text-align: center;
  text-align-last: center;
}

#lobby select:focus,
#lobby select:focus-visible {
  outline: none;
  border: 2px solid var(--color-secondary);
}

#lobby div {
  display: flex;
  flex-direction: row;
  gap: 5px;
  justify-content: space-between;
  width: 100%;
}

#lobby #installApp {
  display: none;
  width: 100%;
  margin: 0 auto 10px;
}

#lobby #installApp #installAppButton {
  gap: 20px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

#lobby div.options {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 5px auto;
}

#lobby .private-room-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
  color: #ccc;
}

#lobby .offline-disabled {
  opacity: 0.6;
  pointer-events: none;
  filter: grayscale(50%);
  transition:
    opacity 0.3s ease,
    filter 0.3s ease;
}

#lobby #online-options {
  border-top: 1px solid white;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#lobby #server-info {
  margin-top: 5px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#lobby #join-game-options {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#lobby #practice-game-options {
  border-top: 1px solid white;
  border-bottom: 1px solid white;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#lobby #join-practice-btn {
  display: none;
}

#lobby #find-random-game-btn {
  margin-top: 5px;
}

#lobby #config-options {
  margin-top: 5px !important;
}

#lobby span {
  font-size: 1em;
  color: white;
}

#lobby span b {
  font-weight: bold;
}

/* ===== Avatar selector ===== */

#lobby .avatar-selector {
  display: flex;
  flex-direction: row;
  gap: 5px;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 0;
}

#lobby .avatar-selector label {
  text-align: left;
}

#lobby .avatar-dropdown {
  position: relative;
  width: calc(100% - 24px);
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}

#lobby .avatar-dropdown-selected {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 3px 10px;
  background-color: #fff;
  border: 2px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 50px;
}

#lobby .avatar-dropdown-selected.active {
  border-color: var(--color-secondary);
}

#lobby .avatar-dropdown-selected #avatar-option {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: none;
}

#lobby .dropdown-arrow {
  margin-left: auto;
  color: var(--color-secondary);
  font-size: 12px;
}

#lobby .avatar-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  background-color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  border-radius: 8px;
  margin-top: 5px;
  padding: 10px;
  z-index: 100;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 10px;
  max-height: 220px;
  width: 100%;
  max-width: calc(100% - 24px);
  overflow-y: auto;
}

#lobby .avatar-dropdown.open .avatar-dropdown-panel {
  display: grid;
}

#lobby .avatar-option {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid transparent;
  transition: border-color 0.2s;
}

#lobby .avatar-option.selected-avatar {
  border-color: var(--color-tertiary);
  background-color: var(--color-tertiary);
  box-shadow: 0 0 20px var(--color-tertiary);
}
/* ===== footer ===== */
#lobby footer {
  background-color: var(--color-secondary);
  color: #ccc;
  text-align: center;
  padding: 20px 0;
  line-height: 1.6;
  width: 100%;
}

#lobby footer .dev-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 10px;
}

#lobby footer .dev-container span {
  color: #ccc;
}

#lobby footer p {
  color: white;
  max-width: 90vw;
  margin: 0 auto;
}

#lobby footer a {
  color: #ff9800;
  text-decoration: none;
  transition: color 0.2s;
}

/* ===== Avatar jogo ===== */
.player-avatar {
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  margin-right: 4px;
}

#help-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column !important;
  gap: 8px;
  width: fit-content;
  cursor: pointer;
  background-color: var(--color-tertiary);
  color: white;
  font-size: 1.2em;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  border: 2px solid white;
  width: fit-content !important;
  height: 60px;
}

#help-btn span {
  font-weight: bold;
  font-size: 0.75em;
  text-transform: uppercase;
}

#help-btn:active {
  transform: translateY(2px);
}

button {
  background-color: var(--color-secondary);
  color: white;
  border: 2px solid var(--color-secondary);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button:active {
  transform: translateY(2px);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ===== Área do jogo ===== */
#game-container {
  display: flex;
  gap: 5px;
  margin: 10px auto;
  padding-left: 20px;
  width: calc(100% - 20px);
}

/* ===== Tabuleiro ===== */
#board {
  display: grid;
  grid-template-columns: repeat(10, var(--card-width));
  grid-template-rows: repeat(10, var(--card-height));
  gap: 10px;
  background-color: var(--color-board);
  border: 5px solid var(--color-secondary);
  padding: 20px;
  z-index: 1;
}

.board-corner-logo {
  width: 90%;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.card-slot {
  width: var(--card-width);
  height: var(--card-height);
  background-color: var(--card-background-color);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  background-image: none !important;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card-slot.joker {
  cursor: default !important;
}

.card-slot .card-value {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.4em;
  line-height: 1;
  position: absolute;
  top: 5px;
  left: 5px;
}

.card-slot .card-value,
.card-in-hand .card-value {
  font-size: var(--card-font-size-value);
  letter-spacing: -1px;
}

.card-slot .card-suit,
.card-in-hand .card-suit {
  font-weight: var(--suit-font-weight) !important;
  font-size: var(--card-font-size-suit);
}

.card-in-hand .card-suit {
  padding-top: 8px;
}

.card-slot .card-suit-small {
  font-size: 1em;
  position: absolute;
  bottom: 5px;
  right: 5px;
  transform: rotate(180deg);
}

.suit-red {
  color: var(--color-suit-red);
}

.suit-black {
  color: var(--color-suit-black);
}

/* ===== Fichas dos jogadores ===== */
.chip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  opacity: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Fichas com fundo e borda relacionados */
.chip-red {
  background-color: #e53935;
  border: 3px solid #8e1b1b;
}

.chip-blue {
  background-color: #2980b9;
  border: 3px solid #1c4e7a;
}

.chip-green {
  background-color: #27ae60;
  border: 3px solid #1e6b3c;
}

/* Fichas travadas com destaque */
.chip.locked {
  border: 3px solid gold;
  box-shadow: 0 0 15px gold;
  color: gold;
  opacity: 1;
}

.chip.locked::before {
  font-family: "Font Awesome 6 Pro";
  font-weight: 900;
  content: "\f005";
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  font-size: 14px;
}

/* ===== Animações ===== */

.highlighted-slot {
  animation: pulse-yellow 1.5s infinite;
}
.highlighted-removal .chip {
  animation: pulse-red 1.2s infinite;
  box-shadow: 0 0 10px 4px rgba(255, 0, 0, 0.8);
}

@keyframes pulse-yellow {
  0% {
    box-shadow: inset 0 0 12px 3px rgba(255, 255, 0, 0.6);
  }
  50% {
    box-shadow: inset 0 0 18px 6px rgba(255, 255, 0, 0.9);
  }
  100% {
    box-shadow: inset 0 0 12px 3px rgba(255, 255, 0, 0.6);
  }
}

@keyframes pulse-red {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ===== Informações do jogador ===== */
#current-player-text {
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-info-next {
  font-size: 0.75em;
  margin-top: 4px;
  color: var(--modal-text-color);
}

.text-team-blue {
  color: #2980b9;
}
.text-team-red {
  color: #c0392b;
}
.text-team-green {
  color: #27ae60;
}

#player-info {
  width: 510px;
  padding: 15px;
  height: fit-content;
  background-color: var(--bg-color);
  color: var(--modal-text-color);
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition:
    background-color 0.3s,
    color 0.3s;
}

.persistent-game-info {
  background-color: var(--color-tertiary);
  padding: 8px;
  border-radius: 5px;
  text-align: center;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 1em;
}

.persistent-game-info div {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  width: 100%;
}

.persistent-game-info button {
  padding: 5px;
  width: fit-content !important;
}

.mobile-chat-btn {
  position: relative;
  transition: color 0.3s ease;
  z-index: 20000 !important;
  display: none;
}

.mobile-chat-btn.has-new-message {
  color: #f1c40f;
  animation: pulse 1.5s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.mobile-chat-btn.has-new-message::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 0;
  width: 8px;
  height: 8px;
  background-color: #e74c3c;
  border-radius: 50%;
}

.badge-counter {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: -15px;
  right: -5px;
  background-color: #f1c40f;
  color: #333;
  font-size: 12px;
  font-weight: 900;
  padding: 0;
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#hint-btn {
  position: relative;
}

#hint-btn:disabled {
  filter: grayscale(100%);
  opacity: 0.5;
  cursor: not-allowed;
}

.hint-highlight {
  z-index: 100 !important;
  animation: pulse-gold 1.5s infinite;
  border-color: #f1c40f !important;
  box-shadow: 0 0 15px #f1c40f !important;
}

@keyframes pulse-gold {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(241, 196, 15, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(241, 196, 15, 0);
  }
}

.game-id-text {
  font-weight: bold;
  font-size: 1.2em;
}

#player-info .hand-title {
  color: var(--modal-text-color);
}

#turn-timer-container {
  display: none;
  justify-content: center;
  width: 100%;
}

.timer-badge {
  background-color: var(--color-secondary);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

.timer-badge i {
  color: #ccc;
}

/* ===== Cartas na mão do jogador ===== */
#game-message {
  color: var(--modal-text-color);
  text-align: center;
  margin-bottom: 5px;
}

#team-info {
  color: var(--modal-text-color);
  text-align: center;
}

#player-hand {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  background-color: var(--color-tertiary);
  padding: 20px 10px;
  border-radius: 5px;
}

.card-in-hand {
  width: 40px;
  height: 60px;
  border-radius: 5px;
  cursor: pointer;
  background-color: var(--card-background-color);
  background-image: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.card-in-hand .card-value {
  font-size: 1em;
  font-weight: bold;
  position: absolute;
  top: 2px;
  left: 4px;
}

.card-slot.card-jack-two-eyed {
  background-color: #fff9c4;
}

.card-slot.card-jack-one-eyed {
  background-color: #ffebee;
}

.card-in-hand[data-card="JD"]::after,
.card-in-hand[data-card="JC"]::after {
  content: "\f055";
  font-family: "Font Awesome 6 Pro";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 12px;
  font-weight: 900;
  color: #27ae60;
  line-height: 1;
}

.card-in-hand[data-card="JS"]::after,
.card-in-hand[data-card="JH"]::after {
  content: "\f056";
  font-family: "Font Awesome 6 Pro";
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 12px;
  font-weight: 900;
  color: #c0392b;
  line-height: 1;
}

.action-icon {
  position: absolute;
  font-size: 1.5em;
  opacity: 0.3;
  z-index: 0;
}

.card-jack-two-eyed .action-icon {
  color: #f1c40f;
}

.card-jack-one-eyed .action-icon {
  color: #c0392b;
}

.card-in-hand.selected {
  border-color: yellow;
  box-shadow: 0 0 15px yellow;
  transform: scale(1.1);
}

#player-hand.disabled .card-in-hand {
  cursor: not-allowed;
  opacity: 0.7;
}

.card-in-hand.newly-drawn {
  animation: pulse-green 1.5s infinite;
  z-index: 5;
  border: 1px solid #27ae60 !important;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 8px 3px rgba(39, 174, 96, 0.6);
  }
  50% {
    box-shadow: 0 0 12px 6px rgba(39, 174, 96, 0.9);
  }
  100% {
    box-shadow: 0 0 8px 3px rgba(39, 174, 96, 0.6);
  }
}

.card-in-hand.newly-drawn::after {
  content: "\f005";
  font-family: "Font Awesome 6 Pro";
  font-weight: 900;
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #27ae60;
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  line-height: 1;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  z-index: 10;
}

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.card-in-hand.dead-card {
  filter: grayscale(90%);
  box-shadow: 0 0 15px 15px rgba(255, 0, 0, 0.7);
  animation: pulse-red 1.5s infinite;
  position: relative;
  overflow: hidden;
}

.card-in-hand.dead-card::after {
  content: "CARTA MORTA";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  background-color: rgba(180, 0, 0, 0.7);
  color: white;
  font-weight: bold;
  font-size: 8px;
  padding: 2px 20px;
  text-align: center;
  width: 150%;
  pointer-events: none;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 10px 3px rgba(255, 0, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 18px 6px rgba(255, 0, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 10px 3px rgba(255, 0, 0, 0.7);
  }
}

.deck-discard-container {
  display: flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  justify-content: center;
  background-color: var(--color-tertiary);
  padding: 5px;
  border-radius: 5px;
}

/* ===== Baralho ===== */
.cards-container {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-top: 5px;
}

#deck-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#deck-pile {
  width: 55px;
  height: var(--card-height);
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: 2px solid white;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: transform 0.2s;
}

#deck-pile.disabled {
  cursor: not-allowed;
}

#deck-pile::after {
  content: "ROW 5";
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 2px 4px;
  border-radius: 4px;
}

#deck-count {
  margin-top: 5px;
  font-size: 0.875em;
  font-weight: bold;
  color: white;
}

/* ===== Estilos para Descarte e Cartas Mortas ===== */
#discard-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: center;
  border-left: 1px solid white;
  padding-left: 5px;
}

#discard-container.sem-baralho {
  padding-left: 0 !important;
  padding-top: 0 !important;
  border-left: none !important;
  border-top: none !important;
}

#discard-pile {
  width: 40px;
  height: 60px;
  border-radius: 5px;
  background-position: top left;
  background-repeat: no-repeat;
  cursor: not-allowed;
}

#discard-count {
  margin-top: 5px;
  font-size: 0.875em;
  font-weight: bold;
  color: white;
  text-align: center;
}

/* ===== Chat ===== */
.chat-btn-container {
  display: none;
  position: fixed;
  bottom: 10px;
  right: 20px;
  z-index: 20001 !important;
}

.chat-btn-container #show-chat-btn {
  padding: 5px 10px;
  font-size: 16px;
  border-radius: 10px;
  cursor: pointer;
  background-color: var(--color-secondary);
  color: white;
  border: 2px solid var(--color-secondary);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.3s,
    transform 0.2s;
}

.chat-btn-container.dragging #show-chat-btn {
  cursor: grabbing;
}

.chat-btn-container.dragging #show-chat-btn:active {
  transform: none !important;
}

#chat-container {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 500px;
  max-width: 90vw;
  height: 500px;
  max-height: 90vh;
  border: 1px solid var(--color-tertiary);
  border-radius: 8px;
  background-color: var(--modal-bg-color);
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  z-index: 20001 !important;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.4s ease-in-out,
    opacity 0.4s ease-in-out,
    visibility 0.4s ease-in-out;
  visibility: hidden;
}

#chat-container.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  background-color: var(--modal-bg-color);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.chat-header h3 {
  margin: 0;
  color: var(--modal-text-color);
  flex: 1;
}

#hide-chat-btn {
  background: none;
  border: none;
  color: white;
  background-color: var(--color-secondary);
  font-size: 20px;
  cursor: pointer;
  width: 40px !important;
}

#chat-messages {
  height: 100%;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--color-secondary);
  background-color: var(--color-secondary);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- ANIMAÇÃO DE NOVA MENSAGEM --- */

/* Define os quadros-chave da animação */
@keyframes pulse-animation {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 10px 15px rgba(0, 123, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
  }
}

#show-chat-btn.has-new-message {
  animation: pulse-animation 1.5s infinite;
  border-color: #007bff;
}

/* Estilo individual de cada balão de mensagem */
.chat-message {
  padding: 8px 12px;
  border-radius: 15px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 1em;
}

.message-timestamp {
  display: block;
  font-size: 0.7em;
  color: #bbb;
  text-align: right;
  margin-top: 5px;
  margin-left: 10px;
}

.message-timestamp.blue {
  color: darkblue;
}

.message-timestamp.red {
  color: darkred;
}

.message-timestamp.green {
  color: darkgreen;
}

/* Mensagens de outros jogadores (à esquerda) */
.other-message {
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  background-color: var(--chat-bg-color);
  color: var(--modal-text-color);
}

.other-message.blue {
  background-color: var(--color-blue-light);
  color: darkblue;
}

.other-message.red {
  color: darkred;
  background-color: var(--color-red-light);
}

.other-message.green {
  color: darkgreen;
  background-color: var(--color-green-light);
}

/* Mensagens do próprio jogador (à direita) */
.my-message {
  background-color: var(--color-primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

/* Nome do remetente */
.message-sender {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.message-sender.blue {
  color: darkblue;
}

.message-sender.red {
  color: darkred;
}

.message-sender.green {
  color: darkgreen;
}

#chat-input-area {
  display: flex;
  margin-top: 10px;
}

#chat-input {
  flex-grow: 1;
  border: 2px solid var(--color-tertiary);
  background-color: var(--modal-bg-color);
  color: var(--modal-text-color);
  font-size: 1em;
  padding: 8px;
  border-radius: 5px 0 0 5px;
  outline: none;
  flex: 1;
}

#send-chat-btn {
  padding: 8px 12px;
  border: 1px solid var(--color-secondary);
  background-color: var(--color-secondary);
  color: white;
  cursor: pointer;
  border-radius: 0 5px 5px 0;
  border-left: none;
  width: 40px !important;
}

/* ===== Swal ===== */
.swal2-container {
  z-index: 21000 !important;
}

.swal2-container.swal-vote {
  z-index: 10000 !important;
}

.swal2-title {
  color: var(--color-secondary) !important;
}

.swal2-html-container {
  color: var(--color-secondary) !important;
}

.swal2-tips-content {
  overflow-y: auto;
  max-height: 80vh;
  line-height: 1.5;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.swal2-tips-content p,
.swal2-tips-content ul {
  padding-left: 15px;
  margin-bottom: 10px;
}

.swal2-tips-content li {
  padding-left: 10px;
  margin-bottom: 10px;
}

.swal2-rules-popup {
  width: 600px !important;
  max-width: 90% !important;
}

.swal2-rules-content {
  overflow-y: auto;
  max-height: 80vh;
  height: 600px;
  line-height: 1.5;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.swal2-rules-content hr {
  border: 1px solid var(--color-secondary);
  width: 100%;
  margin: 5px 0 0;
}

.swal2-rules-content::-webkit-scrollbar {
  display: none;
}

.swal2-rules-content summary {
  cursor: pointer;
}

.swal2-rules-content summary:first-child {
  margin-top: 10px !important;
}

.swal2-rules-content .swal2-rules-sections {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  color: var(--color-secondary) !important;
}

.swal2-rules-content .swal2-rules-sections a {
  padding-left: 10px;
}

.swal2-rules-content a {
  color: var(--color-secondary) !important;
  text-decoration: underline !important;
  font-weight: bold;
  font-size: 0.95em;
  cursor: pointer;
}

.swal2-rules-content p,
.swal2-rules-content ul {
  padding-left: 15px;
  margin-bottom: 5px;
}

.swal2-rules-content ol {
  padding-left: 15px;
}

.swal2-rules-content ol li {
  padding-left: 0px;
}

.swal2-rules-content li {
  padding-left: 10px;
  margin-bottom: 5px;
}

.swal2-rules-content .swal2-rules-actions {
  display: block;
  text-align: center;
  margin: 20px auto 10px;
}

.swal2-rules-actions {
  justify-content: center !important;
}

.swal2-rules-container {
  width: 100% !important;
}

.swal2-rules-container .swal2-title {
  text-align: center;
  font-size: 1.25em !important;
}

.swal2-modal-config-popup .swal2-title {
  text-align: center !important;
  font-size: 1.25em !important;
}

.swal2-modal-config-popup {
  width: 700px !important;
  max-width: 95vw !important;
  padding: 20px !important;
}

.modal-config-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 10px;
}

.modal-config-item {
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.modal-config-item label {
  font-weight: 700;
  font-size: 0.95em;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-config-item.full-width {
  grid-column: 1 / -1;
}

.modal-config-item button {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 8px !important;
  font-size: 0.9em !important;
}

.modal-config-item button.report-bug-btn {
  width: auto !important;
}

.modal-config-item .language-selector {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.swal2-validation-message {
  background: var(--chat-bg-color) !important;
  color: var(--modal-text-color) !important;
}

.swal2-cancel,
.swal2-deny {
  background-color: transparent !important;
  color: var(--color-secondary) !important;
  border: 1px solid var(--color-secondary) !important;
  font-weight: bold !important;
  width: unset !important;
}

.swal2-confirm {
  background-color: var(--color-secondary) !important;
  color: white !important;
  border: 1px solid transparent !important;
  font-weight: bold !important;
  width: unset !important;
}

.swal2-button-full {
  width: 100% !important;
}

.swal2-actions.center {
  justify-content: center !important;
}

.swal2-actions.center button {
  width: 100% !important;
  max-width: 240px !important;
}

.swal2-input-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
}

.swal2-label {
  font-weight: bold;
  color: var(--color-secondary) !important;
}

.swal2-select {
  background-color: white;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  margin: 5px 0 !important;
  width: 100%;
}

.swal2-input,
.swal2-textarea {
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
  border-radius: 5px;
  padding: 5px 10px !important;
  font-size: 1em;
  width: 90%;
  margin: 20px auto 0 !important;
}

.swal2-textarea {
  resize: none;
  max-height: 70vh;
  overflow-y: auto;
  height: 300px !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.swal2-input:focus-visible,
.swal2-textarea:focus-visible {
  outline: none;
  border: 2px solid var(--color-secondary);
}

.swal2-confirm:active,
.swal2-cancel:active,
.swal2-deny:active {
  transform: translateY(2px);
}

.swal2-timer-progress-bar {
  background-color: var(--color-secondary);
}

.swal2-loader {
  border-color: var(--color-secondary) transparent var(--color-secondary)
    transparent !important;
}

.swal2-icon {
  border-color: var(--color-secondary) !important;
  color: var(--color-secondary) !important;
}

.swal2-icon-success {
  border-color: var(--color-secondary) !important;
}

.swal2-icon-success .swal2-success-line-tip,
.swal2-icon-success .swal2-success-line-long {
  background-color: var(--color-secondary) !important;
}

.swal2-icon-success .swal2-success-ring {
  border-color: var(--color-secondary) !important;
}

.swal2-icon-error {
  border-color: var(--color-secondary) !important;
}

.swal2-icon-error .swal2-x-mark-line-left,
.swal2-icon-error .swal2-x-mark-line-right {
  background-color: var(--color-secondary) !important;
}

.swal2-icon-warning {
  border-color: var(--color-secondary) !important;
}

.swal2-icon-warning .swal2-warning-body,
.swal2-icon-warning .swal2-warning-dot {
  background-color: var(--color-secondary) !important;
}

.swal-icon--warning__dot {
  background-color: var(--color-secondary) !important;
}

/* ===== Estilos do Modal de IA (Swal) ===== */
.swal-ai-content-reset {
  text-align: left !important;
  padding: 0 10px;
}

.swal-ai-wrapper {
  font-size: 0.95rem;
  color: var(--color-secondary);
}

.swal-ai-wrapper .ai-intro {
  margin-bottom: 20px;
  text-align: center;
  color: #555;
  font-style: italic;
}

.ai-detail-item {
  background-color: #fcfcfc;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ai-detail-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-detail-item summary {
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  list-style: none;
  user-select: none;
}

.ai-detail-item summary::-webkit-details-marker {
  display: none;
}

.ai-detail-item .summary-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary);
  font-weight: bold;
}

.ai-detail-item .summary-title i {
  width: 20px;
  text-align: center;
  font-size: 1.1em;
}

.ai-detail-item .arrow-icon {
  color: #aaa;
  transition: transform 0.3s ease;
  font-size: 0.9em;
}

.ai-detail-item[open] .arrow-icon {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.detail-body {
  padding: 15px;
  border-top: 1px solid #eee;
  background-color: #fff;
  color: #444;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
  text-align: left;
}

.detail-body ul,
.detail-body ol {
  margin-left: 20px;
  margin-top: 8px;
  padding-left: 0;
}

.detail-body li {
  margin-bottom: 6px;
}

.swal-ai-wrapper .ai-quote {
  background-color: #eef4fa;
  border-left: 4px solid var(--color-primary);
  padding: 10px 15px;
  margin: 10px 0;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  font-size: 0.9em;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.swal-ai-wrapper .ai-quote i {
  color: var(--color-tertiary);
  font-size: 0.8em;
  margin-top: 3px;
}

.swal-ai-wrapper .ai-footer {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px dashed #ccc;
  text-align: center;
  font-size: 0.85em;
  color: var(--color-tertiary);
  font-weight: bold;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Modal Votação ===== */
.feature-voting-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-top: 10px;
  overflow-y: auto;
  padding: 5px;
}

.feature-vote-counter {
  text-align: right;
  font-weight: bold;
  color: var(--color-secondary);
  margin-bottom: 5px;
  font-size: 0.9em;
  transition: color 0.3s;
}

.feature-option {
  cursor: pointer;
  padding: 12px 15px;
  border: 2px solid var(--color-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  color: var(--color-secondary);
  background-color: transparent;
  font-weight: bold;
  font-size: 0.95em;
  transition: all 0.2s ease-in-out;
  user-select: none;
  position: relative;
}

.feature-option input {
  display: none;
}

.feature-option.selected {
  background-color: var(--color-secondary);
  color: white;
  border-color: var(--color-secondary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.feature-option.selected::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Pro";
  font-weight: 900;
  position: absolute;
  right: 15px;
  font-size: 1.1em;
}

/* ===== Modal de avaliação (review) ===== */

.review-stars-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 15px 0;
  font-size: 2.5em;
  cursor: pointer;
}

.review-star {
  color: #f1c40f;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.review-star.selected {
  filter: drop-shadow(0 0 2px rgba(241, 196, 15, 0.4));
}

#review-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  animation: fadeIn 0.3s ease;
}

.review-label-dynamic {
  font-weight: bold;
  color: var(--color-secondary);
  margin-bottom: 5px;
  font-size: 0.9em;
  min-height: 20px;
}

/* ===== Modal ChangeLog ===== */
.changelog-container {
  text-align: left;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

.release-item.highlight {
  background-color: rgba(44, 62, 80, 0.05);
  border: 2px solid var(--color-secondary);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
}

.release-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}

.release-version {
  font-size: 1.2em;
  font-weight: 900;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
}

.release-badge {
  display: inline-block;
  padding: 2px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.5em;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 8px;
  background-color: var(--color-secondary);
  color: white;
  border: 1px solid var(--color-secondary);
}

.release-date {
  font-size: 0.8em;
  color: #7f8c8d;
}

.release-list {
  padding-left: 20px;
  margin: 0;
}

.release-list li {
  margin-bottom: 5px;
  font-size: 0.95em;
  line-height: 1.4;
}

.release-item:not(.highlight) {
  padding: 10px 15px;
  opacity: 0.8;
  border-left: 3px solid #ccc;
  margin-bottom: 15px;
}

.release-item:not(.highlight) .release-version {
  font-size: 1em;
}

/* ===== Modal Escolha de Equipe ===== */

#team-selection-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #fefefe;
}
#team-selection-modal .modal-content {
  width: 800px;
  max-width: calc(90vw - 20px);
  max-height: 95vh;
  background-color: #fefefe;
  margin: 0 auto;
  padding: 10px;
  border-radius: 10px;
  box-shadow:
    0 4px 8px 0 rgba(0, 0, 0, 0.2),
    0 6px 20px 0 rgba(0, 0, 0, 0.19);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: auto;
}

#team-selection-modal .modal-content h2 {
  color: var(--color-secondary);
  font-weight: bold;
  margin-top: 10px;
}

#team-selection-modal .modal-content .player-count-info {
  color: var(--color-secondary);
  font-size: 1.2em;
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
}

#team-selection-modal .modal-content p {
  color: var(--color-secondary);
  font-size: 1.2em;
  text-align: center;
}

#team-selection-modal .modal-content span {
  color: var(--color-secondary);
}

#teams-container {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
  overflow-y: auto;
  flex-direction: column;
  align-items: center;
}

.teams-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.team-box {
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 15px;
  background-color: #f9f9f9;
  text-align: center;
  min-width: 200px;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

.team-box h3 {
  margin-top: 0;
}

.team-box .team-players {
  list-style-type: none;
  padding-left: 0;
  margin-top: 10px;
  min-height: 50px;
}

.team-box .team-players li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px;
  font-weight: bold;
  border-radius: 4px;
  margin-bottom: 4px;
}

.team-box .leave-team-btn {
  margin-top: 5px;
}

.team-box .leave-team-btn i {
  margin-right: 4px;
}

.team-box .player-name {
  text-align: left;
  flex-grow: 1;
}

.team-box .user-icon {
  margin-right: 8px;
}

.team-box.red h3 {
  color: darkred;
}

.team-box.red .team-players li {
  background-color: var(--color-red-light);
  color: darkred;
}

.team-box.red .team-players li .player-name {
  color: darkred !important;
}

.team-box.red .team-players li .remove-bot-btn {
  color: darkred !important;
}

.team-box.red .leave-team-btn {
  background-color: darkred !important;
  border-color: darkred !important;
}

.team-box.blue h3 {
  color: darkblue;
}

.team-box.blue .team-players li {
  background-color: var(--color-blue-light);
  color: darkblue;
}

.team-box.blue .team-players li .player-name {
  color: darkblue !important;
}

.team-box.blue .team-players li .remove-bot-btn {
  color: darkblue !important;
}

.team-box.blue .leave-team-btn {
  background-color: darkblue !important;
  border-color: darkblue !important;
}

.team-box.green h3 {
  color: darkgreen;
}

.team-box.green .team-players li {
  background-color: var(--color-green-light);
  color: darkgreen;
}

.team-box.green .team-players li .player-name {
  color: darkgreen !important;
}

.team-box.green .team-players li .remove-bot-btn {
  color: darkgreen !important;
}

.team-box.green .leave-team-btn {
  background-color: darkgreen !important;
  border-color: darkgreen !important;
}

.team-box .leave-team-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #7f8c8d !important;
  border-color: #7f8c8d !important;
  color: #ecf0f1 !important;
  box-shadow: none;
}

.team-box.joinable {
  cursor: pointer;
}

.team-box.joinable.red {
  border-color: darkred;
}

.team-box.joinable.red h3 {
  color: darkred;
}

.team-box.joinable.red .team-players li {
  background-color: var(--color-red-light);
  color: darkred;
}

.team-box.joinable.red .team-players li .player-name {
  color: darkred !important;
}

.team-box.joinable.red .team-players li .remove-bot-btn {
  color: darkred;
}

.team-box.joinable.blue {
  border-color: darkblue;
}

.team-box.joinable.blue h3 {
  color: darkblue;
}

.team-box.joinable.blue .team-players li {
  background-color: var(--color-blue-light);
  color: darkblue;
}

.team-box.joinable.blue .team-players li .player-name {
  color: darkblue !important;
}

.team-box.joinable.blue .team-players li .remove-bot-btn {
  color: darkblue;
}

.team-box.joinable.green {
  border-color: darkgreen;
}

.team-box.joinable.green h3 {
  color: darkgreen;
}

.team-box.joinable.green .team-players li {
  background-color: var(--color-green-light);
  color: darkgreen;
}

.team-box.joinable.green .team-players li .player-name {
  color: darkgreen !important;
}

.team-box.joinable.green .team-players li .remove-bot-btn {
  color: darkgreen;
}

.kick-player-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 5px;
  margin-left: 8px;
  font-size: 1em;
  line-height: 1;
  width: fit-content;
  flex-shrink: 0;
  color: red;
}

.unassign-player-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 5px;
  margin-left: 5px;
  color: #e67e22;
  width: auto !important;
}

.remove-bot-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0 5px;
  margin-left: 8px;
  font-size: 0.9em;
  line-height: 1;
  width: fit-content;
  flex-shrink: 0;
}

.add-bot-slot {
  list-style: none;
  margin-top: 10px;
}

.add-bot-btn {
  width: 100%;
  padding: 5px;
  font-size: 0.9em;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid #fff;
  color: var(--color-secondary);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-bot-btn i {
  margin-right: 5px;
}

.unassigned-container {
  grid-column: 1 / -1;
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px dashed #ccc;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.unassigned-title {
  font-size: 0.9em;
  font-weight: bold;
  color: var(--color-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.unassigned-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.unassigned-player {
  background: white;
  padding: 5px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9em;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ready-status {
  font-size: 0.8em;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}
.status-yes {
  background-color: #27ae60;
  color: white;
}
.status-no {
  background-color: #95a5a6;
  color: white;
  opacity: 0.7;
}

#toggle-ready-btn {
  width: 100%;
  padding: 15px;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 10px;
  border: none;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#toggle-ready-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.btn-confirm-ready {
  background-color: #27ae60 !important;
  color: white !important;
  border: 2px solid #219150 !important;
}

.btn-cancel-ready {
  background-color: #e67e22 !important;
  color: white !important;
  border: 2px solid #d35400 !important;
  opacity: 0.9;
}

#host-controls-container {
  display: none;
  margin-top: 15px;
}

.host-settings-container {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.host-settings-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.host-settings-item label {
  font-weight: bold;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.host-settings-separator {
  border: 0;
  border-bottom: 1px solid #eee;
  width: 100%;
  margin: 5px 0;
}

.pin-input {
  font-size: 2rem !important;
  letter-spacing: 0.5rem;
  text-align: center;
  font-weight: bold;
  color: var(--color-primary);
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px !important;
  width: 150px !important;
  height: 80px !important;
  margin: 10px auto !important;
  display: block;
}

.pin-input::-webkit-outer-spin-button,
.pin-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pin-input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

#password-config-container {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: 8px;
  margin-top: 10px;
  text-align: center;
  border: 1px dashed #ccc;
}

#timer-options {
  padding-left: 15px;
  border-left: 3px solid #eee;
  margin-top: -5px;
  margin-bottom: 10px;
}

.timer-input-label {
  font-size: 0.9em;
  display: block;
  text-align: left;
  margin-bottom: 5px;
  color: #666;
  font-weight: 600;
}

.timer-input {
  margin: 0 !important;
  width: 100px !important;
  padding: 8px !important;
  height: 40px !important;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background-color: var(--color-primary);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

#start-game-container {
  margin-top: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#start-game-btn,
#host-settings-btn {
  padding: 12px 25px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#start-game-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ===== Scrollbar ===== */
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-secondary) var(--modal-bg-color);
}

/* WebKit (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--color-secondary);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--modal-bg-color);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--modal-bg-color);
}

/* ==== Dark-mode ==== */
body.dark-mode {
  --card-background-color: #1e1e1e;
  --color-board: #151515;
  --color-suit-red: #ff6b6b;
  --color-suit-black: #bdc3c7;
  --modal-bg-color: #2c3e50;
  --bg-color: #1e1e1e;
  --modal-text-color: #ecf0f1;
  --chat-bg-color: #34495e;
}

body.dark-mode .card-in-hand[data-card="JD"]::after,
body.dark-mode .card-in-hand[data-card="JC"]::after {
  color: #58d68d;
}

body.dark-mode .card-in-hand[data-card="JS"]::after,
body.dark-mode .card-in-hand[data-card="JH"]::after {
  color: #ff6b6b;
}

body.dark-mode .text-team-blue {
  color: #5dade2;
}
body.dark-mode .text-team-red {
  color: #ff6b6b;
}
body.dark-mode .text-team-green {
  color: #58d68d;
}
body.dark-mode #team-selection-modal {
  background-color: var(--modal-bg-color);
}

body.dark-mode #team-selection-modal .modal-content {
  background-color: var(--modal-bg-color);
  color: var(--modal-text-color);
  border: 1px solid #444;
}

body.dark-mode #team-selection-modal .modal-content h2,
body.dark-mode #team-selection-modal .modal-content .player-count-info,
body.dark-mode #team-selection-modal .modal-content p,
body.dark-mode #team-selection-modal .modal-content span {
  color: var(--modal-text-color);
}

body.dark-mode .team-box {
  background-color: var(--bg-color);
  border-color: #444;
}

body.dark-mode .team-box.red h3,
body.dark-mode .team-box.joinable.red h3 {
  color: #ff6b6b;
}

body.dark-mode .team-box.blue h3,
body.dark-mode .team-box.joinable.blue h3 {
  color: #5dade2;
}

body.dark-mode .team-box.green h3,
body.dark-mode .team-box.joinable.green h3 {
  color: #58d68d;
}

body.dark-mode .team-box.joinable.red {
  border-color: #ff6b6b;
}
body.dark-mode .team-box.joinable.blue {
  border-color: #5dade2;
}
body.dark-mode .team-box.joinable.green {
  border-color: #58d68d;
}

body.dark-mode .team-box.red .team-players li {
  background-color: rgba(231, 76, 60, 0.2);
  color: #ffdeda;
}
body.dark-mode .team-box.blue .team-players li {
  background-color: rgba(41, 128, 185, 0.2);
  color: #d6eaf8;
}
body.dark-mode .team-box.green .team-players li {
  background-color: rgba(39, 174, 96, 0.2);
  color: #d5f5e3;
}

body.dark-mode .team-box.red .team-players li .player-name {
  color: #ff6b6b !important;
}
body.dark-mode .team-box.blue .team-players li .player-name {
  color: #5dade2 !important;
}
body.dark-mode .team-box.green .team-players li .player-name {
  color: #58d68d !important;
}

body.dark-mode .kick-player-btn {
  color: #ff6b6b !important;
}
body.dark-mode .team-box.red .remove-bot-btn {
  color: #ff6b6b !important;
}
body.dark-mode .team-box.blue .remove-bot-btn {
  color: #5dade2 !important;
}
body.dark-mode .team-box.green .remove-bot-btn {
  color: #58d68d !important;
}

body.dark-mode .add-bot-btn {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #555;
  color: var(--modal-text-color);
}

body.dark-mode .team-box .leave-team-btn:not(:disabled):not(.disabled) {
  filter: brightness(0.8) contrast(1.2);
}

body.dark-mode .team-box .leave-team-btn:disabled {
  background-color: #555 !important;
  border-color: #555 !important;
  color: #ccc !important;
}

body.dark-mode .unassigned-container {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #555;
}
body.dark-mode .unassigned-title {
  color: #ccc;
}
body.dark-mode .unassigned-player {
  background-color: var(--bg-color);
  border-color: #444;
  color: var(--modal-text-color);
}
body.dark-mode .btn-confirm-ready {
  box-shadow: 0 0 10px rgba(39, 174, 96, 0.4);
}

body.dark-mode .host-settings-item label {
  color: var(--modal-text-color);
}

body.dark-mode .host-settings-separator {
  border-bottom-color: #444;
}

body.dark-mode #timer-options {
  border-left-color: #444;
}

body.dark-mode .timer-input-label {
  color: #aaa;
}

body.dark-mode .slider {
  background-color: #888;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode input:checked + .slider {
  background-color: var(--color-secondary);
}

body.dark-mode .slider:before {
  background-color: #f0f0f0;
}

body.dark-mode .timer-input {
  background-color: #34495e !important;
  color: white !important;
  border: 1px solid #555 !important;
}

body.dark-mode .timer-badge {
  background-color: #34495e;
  border: 1px solid #555;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode #start-game-btn:disabled {
  background-color: #34495e;
  color: #7f8c8d;
}

body.dark-mode .modal-config-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #444;
}

body.dark-mode .modal-config-item label {
  color: #ecf0f1;
}

body.dark-mode .modal-config-item button {
  border-color: #ecf0f1 !important;
  color: #ecf0f1 !important;
}

body.dark-mode .swal2-popup {
  background-color: #2c3e50 !important;
  color: #ecf0f1 !important;
}

body.dark-mode .swal2-title,
body.dark-mode .swal2-content,
body.dark-mode .swal2-html-container {
  color: #ecf0f1 !important;
}

body.dark-mode .swal2-cancel,
body.dark-mode .swal2-deny {
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
}

body.dark-mode .swal2-select,
body.dark-mode .swal2-textarea,
body.dark-mode .swal2-input {
  background-color: #34495e !important;
  color: white !important;
  border-color: #555 !important;
}

body.dark-mode .ai-detail-item {
  background-color: #34495e;
  border-color: #555;
}
body.dark-mode .ai-detail-item summary {
  background-color: #2c3e50;
  color: white;
}
body.dark-mode .detail-body {
  background-color: #34495e;
  color: #ecf0f1;
  border-top-color: #555;
}
body.dark-mode .swal-ai-wrapper .ai-intro,
body.dark-mode .swal-ai-wrapper .ai-footer {
  color: #bdc3c7;
}

body.dark-mode .ai-detail-item {
  background-color: #34495e;
  border-color: #555;
}

body.dark-mode .ai-detail-item summary {
  background-color: #34495e;
  color: #fff;
}

body.dark-mode .ai-detail-item .summary-title,
body.dark-mode .ai-detail-item .summary-title i,
body.dark-mode .ai-detail-item .arrow-icon {
  color: #fff;
}

body.dark-mode .detail-body {
  background-color: #2c3e50;
  color: #ecf0f1;
  border-top-color: #555;
}

body.dark-mode .release-item.highlight {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #fff;
}
body.dark-mode .release-version {
  color: #fff;
}
body.dark-mode .release-badge {
  background-color: white;
  color: var(--color-primary);
  border-color: white;
}
body.dark-mode .release-date {
  color: #aaa;
}
body.dark-mode .release-item:not(.highlight) {
  border-left-color: #555;
}

body.dark-mode .swal-ai-wrapper .ai-quote {
  background-color: rgba(0, 0, 0, 0.2);
  border-left-color: #f1c40f;
  color: #bdc3c7;
}

body.dark-mode .swal-ai-wrapper .ai-quote i {
  color: #f1c40f;
}

body.dark-mode .swal2-rules-content {
  color: #ecf0f1;
}

body.dark-mode .swal2-rules-content a {
  color: #fff !important;
}

body.dark-mode .swal2-rules-sections strong {
  color: #bdc3c7;
}

body.dark-mode .swal2-rules-content summary {
  color: #fff;
}

body.dark-mode .swal2-rules-content hr {
  border-color: #e0e0e0;
}

body.dark-mode .swal2-rules-content i {
  color: #fff;
}

body.dark-mode .swal2-rules-content p,
body.dark-mode .swal2-rules-content li {
  color: #e0e0e0;
}

body.dark-mode .swal2-rules-content strong {
  color: #fff;
}

body.dark-mode .swal2-icon {
  border-color: #ffffff !important;
  color: #ffffff !important;
}

body.dark-mode .swal2-icon-success {
  border-color: #ffffff !important;
}

body.dark-mode .swal2-icon-success .swal2-success-line-tip,
body.dark-mode .swal2-icon-success .swal2-success-line-long {
  background-color: #ffffff !important;
}

body.dark-mode .swal2-icon-success .swal2-success-ring {
  border-color: #ffffff !important;
}

body.dark-mode .swal2-icon-error {
  border-color: #ffffff !important;
}

body.dark-mode .swal2-icon-error .swal2-x-mark-line-left,
body.dark-mode .swal2-icon-error .swal2-x-mark-line-right {
  background-color: #ffffff !important;
}

body.dark-mode .swal2-icon-warning {
  border-color: #ffffff !important;
}

body.dark-mode .swal2-icon-warning .swal2-warning-body,
body.dark-mode .swal2-icon-warning .swal2-warning-dot {
  background-color: #ffffff !important;
}

body.dark-mode .swal-icon--warning__dot {
  background-color: #ffffff !important;
}

body.dark-mode .swal2-loader {
  border-color: #ffffff transparent #ffffff transparent !important;
}

body.dark-mode .feature-vote-counter {
  color: var(--modal-text-color);
}

body.dark-mode .feature-option {
  border-color: #ffffff;
  color: #ffffff;
}

body.dark-mode .feature-option.selected {
  background-color: #ffffff;
  color: var(--color-secondary);
  border-color: #ffffff;
  box-shadow: 0 4px 10px rgba(255, 255, 255, 0.2);
}

body.dark-mode .review-label-dynamic {
  color: var(--modal-text-color);
}

/* ===== Estilos para hover (apenas para dispositivos com suporte a hover) ==== */
@media (hover: hover) and (pointer: fine) {
  .lang-btn:hover {
    opacity: 1;
  }

  #lobby footer a:hover {
    color: #ffd180;
    text-decoration: underline;
  }

  #lobby input:hover:not(:disabled) {
    border-color: var(--color-secondary);
  }

  #lobby select:hover:not(:disabled) {
    cursor: pointer;
    border-color: var(--color-secondary);
  }
  #lobby .avatar-option:hover {
    border-color: var(--color-tertiary);
    background-color: var(--color-tertiary);
  }

  #lobby .avatar-dropdown-selected:hover {
    border-color: var(--color-secondary);
  }

  button:hover {
    opacity: 0.8;
  }

  #help-btn:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: white;
  }

  .card-slot:hover:not(.joker) {
    transform: scale(1.05);
    box-shadow: 0 0 10px yellow;
  }

  #deck-pile:hover:not(.disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  }

  .team-box.joinable:hover {
    background-color: #e9f4ff;
  }

  .team-box.joinable:hover.red {
    border-color: darkred;
  }

  .team-box.joinable:hover.red h3 {
    color: darkred;
  }

  .team-box.joinable:hover.blue {
    border-color: darkblue;
  }

  .team-box.joinable:hover.blue h3 {
    color: darkblue;
  }

  .team-box.joinable:hover.green {
    border-color: darkgreen;
  }

  .team-box.joinable:hover.green h3 {
    color: darkgreen;
  }

  button:hover,
  .swal2-confirm:hover,
  .swal2-cancel:hover,
  .swal2-deny:hover {
    opacity: 0.8;
  }

  .swal2-rules-content summary:hover,
  .swal2-rules-content a:hover {
    opacity: 0.8;
  }

  .modal-config-item:hover {
    border-color: #ccc;
    transform: translateY(-2px);
  }

  .swal2-close:hover {
    color: var(--color-secondary);
  }

  body.dark-mode .swal2-close:hover {
    color: #f0f2f5;
  }

  .ai-detail-item summary:hover {
    background-color: #f0f2f5;
  }

  .error-footer a:hover {
    text-decoration: underline;
  }

  .back-button:hover {
    transform: translateY(-3px);
    background-color: #34495e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }

  .feature-option:not(.selected):hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
  .feature-option.selected:hover {
    opacity: 0.8;
  }

  .review-star:hover {
    transform: scale(1.2);
  }

  body.dark-mode .modal-config-item:hover {
    border-color: #777;
    background-color: rgba(255, 255, 255, 0.08);
  }

  body.dark-mode .feature-option:not(.selected):hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  body.dark-mode .team-box.joinable:hover {
    background-color: #2c3e50;
  }

  body.dark-mode .add-bot-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }

  body.dark-mode .ai-detail-item summary:hover {
    background-color: #3e5871;
  }

  .btn-confirm-ready:hover {
    background-color: #2ecc71 !important;
  }

  .btn-cancel-ready:hover {
    background-color: #d35400 !important;
  }
}

/* ===== Responsividade ===== */
@media screen and (max-width: 1415px) {
  #player-info {
    width: 400px;
    position: unset;
    margin: 0 auto;
  }

  .deck-discard-container {
    flex-direction: column;
  }

  #discard-container {
    border-left: none;
    border-top: 1px solid white;
    padding-left: 0;
    padding-top: 5px;
    width: 100%;
  }
}

@media screen and (max-width: 1280px) {
  #player-info {
    width: 340px;
    position: unset;
    margin: 0 auto;
  }
}

@media screen and (max-width: 1250px) {
  #game-container {
    flex-direction: column-reverse;
    align-items: center;
  }

  #player-info {
    width: 100%;
    max-width: 800px;
    position: unset;
    margin: 0 auto;
    height: auto;
  }

  .deck-discard-container {
    flex-direction: row;
  }

  #discard-container {
    border-left: 1px solid white;
    border-top: none;
    padding-left: 5px;
    padding-top: 0;
    width: unset;
  }
}

@media screen and (max-width: 900px) {
  body {
    --card-font-size-value: 1.1em;
    --card-font-size-suit: 1.6em;
  }

  #game-container {
    padding-left: 0;
  }

  #player-info {
    max-width: 655px;
  }

  #board {
    padding: 10px;
    grid-template-columns: repeat(10, 50px);
    grid-template-rows: repeat(10, 70px);
    gap: 5px;
  }

  .card-slot {
    width: 50px;
    height: 70px;
  }

  .chip {
    width: 25px;
    height: 25px;
  }

  .chip.locked::before {
    font-size: 10px;
  }
}

@media screen and (max-width: 768px) {
  .chat-btn-container {
    display: none !important;
  }

  .mobile-chat-btn.show {
    display: flex !important;
  }
}

@media screen and (max-width: 715px) {
  body {
    --card-font-size-value: 1em;
    --card-font-size-suit: 1.4em;
  }

  #player-info {
    max-width: 443px;
  }

  #current-player-text {
    font-size: 1em;
  }

  .persistent-game-info {
    font-size: 0.875em;
  }

  .game-id-text {
    font-weight: bold;
    font-size: 1em;
  }

  h3 {
    font-size: 1em;
  }

  #player-hand {
    padding: 10px 0;
    gap: 7px;
  }

  .card-in-hand {
    width: 40px;
    height: 60px;
  }

  .board-side-text {
    display: none;
  }

  #board {
    border-left: 5px solid var(--color-secondary);
    border-right: 5px solid var(--color-secondary);
    border-radius: 5px;
    grid-template-columns: repeat(10, 40px);
    grid-template-rows: repeat(10, 60px);
  }

  .card-slot {
    width: 40px;
    height: 60px;
  }

  .chip {
    width: 15px;
    height: 15px;
  }

  .chip.locked::before {
    font-size: 8px;
  }

  .card-slot .card-suit {
    padding-top: 8px;
  }

  .card-slot .card-suit-small {
    display: none;
  }
}

@media (max-height: 700px) {
  .error-container {
    margin-top: 40px;
    min-height: auto;
    gap: 10px;
  }
  .error-footer {
    position: relative;
    margin-top: auto;
    left: auto;
    bottom: auto;
    transform: none;
  }
}

@media (max-width: 600px) {
  .swal2-modal-config-popup {
    width: 95% !important;
    padding: 10px !important;
  }

  .modal-config-container {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal-config-item:hover {
    transform: none;
  }

  .modal-config-item button.report-bug-btn {
    width: 100% !important;
  }
}

@media screen and (max-width: 500px) {
  body {
    --card-font-size-value: 0.8em;
    --card-font-size-suit: 1.2em;
  }

  h1 {
    margin: 20px auto 10px;
    font-size: 1.5em;
  }

  h2 {
    margin: 0 auto 5px;
    font-size: 1.25em;
  }

  h3 {
    font-size: 1.125em;
  }

  #lobby #title {
    justify-content: center !important;
  }

  #lobby .logo-title.left {
    display: block;
    position: absolute;
    left: 5px;
    top: 5px;
    width: 60px;
    height: 60px;
  }

  #lobby #lobby-container {
    width: 90%;
  }

  #lobby input {
    width: calc(100% - 24px);
  }
  #lobby select,
  #lobby button {
    width: 100%;
  }

  #lobby div {
    flex-direction: column;
    align-items: center;
  }

  #help-btn {
    top: 10px;
    right: 5px;
    font-size: 1em;
    height: fit-content;
  }

  #game-container {
    flex-direction: column;
  }

  #player-info {
    padding: 5px;
    width: 365px;
    max-width: 99%;
    gap: 0;
  }

  #turn-timer-container {
    margin: 5px auto;
    width: 100%;
  }

  .timer-badge {
    font-size: 0.9em;
    padding: 4px 12px;
  }

  #player-info .hand-title {
    display: none;
  }

  #chat-container {
    transform: translateY(0) translateX(0);
    left: 50%;
    right: unset;
  }

  #chat-container.show {
    transform: translateY(0) translateX(-50%);
  }

  .chat-btn-container {
    bottom: 20px;
    right: unset;
    left: 5px;
  }

  #show-chat-btn {
    padding: 5px 10px;
    font-size: 13px;
  }

  #board {
    grid-template-columns: repeat(10, 30px);
    grid-template-rows: repeat(10, 50px);
  }

  .card-slot {
    width: 30px;
    height: 50px;
    border-radius: 4px;
  }

  .card-in-hand {
    width: 28px;
    height: 50px;
    border-radius: 4px;
  }

  .card-in-hand.newly-drawn::after {
    width: 12px;
    height: 12px;
  }

  #deck-pile {
    width: 50px;
    height: 70px;
  }

  #discard-pile {
    width: 28px;
    height: 50px;
    border-radius: 4px;
  }

  #deck-count,
  #discard-count {
    font-size: 0.75em;
  }

  #game-message {
    font-size: 0.875em;
  }

  #team-info {
    font-size: 0.75em;
  }

  .error-container h1 {
    font-size: 2em;
  }

  .error-container p {
    font-size: 1em;
  }

  .card-suits {
    font-size: 2.5em;
    gap: 20px;
  }

  .swal-ai-wrapper {
    font-size: 0.85rem;
  }

  .ai-detail-item summary {
    padding: 10px;
  }

  .swal2-rules-popup {
    padding: 10px !important;
  }
}

@media screen and (max-width: 370px) {
  body {
    --card-font-size-value: 0.7em;
    --card-font-size-suit: 1em;
  }

  #help-btn {
    font-size: 1.5em;
    border: none;
  }

  #help-btn span {
    display: none;
  }

  #board {
    grid-template-columns: repeat(10, 25px);
    grid-template-rows: repeat(10, 40px);
  }

  .card-slot,
  .card-in-hand {
    width: 25px;
    height: 40px;
  }
}
