:root {
  --bg-navy: #1A3454;
  --btn-amber: #FFC107;
  --btn-amber-hover: #e0a800;
  --text-dark: #1A3454;
  --text-light: #F8FAFC;
  --text-muted: #CBD5E1;
  --card-bg: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.15);
  --status-success: #4ADE80;
  --status-success-bg: rgba(74, 222, 128, 0.15);
  --status-error: #F87171;
  --status-error-bg: rgba(248, 113, 113, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-navy);
  color: var(--text-light);
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Language Selector */
.lang-bar {
  position: absolute;
  top: -3.5rem;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-select {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(5px);
}

.lang-select option {
  background-color: var(--bg-navy);
  color: var(--text-light);
}

/* Cards & Screens */
.home-card, .game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem 1.5rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.screen {
  display: none;
  width: 100%;
}

.screen.active {
  display: block;
}

/* Buttons */
.menu-btn {
  background-color: var(--btn-amber);
  color: var(--text-dark);
  border: none;
  border-radius: 14px;
  padding: 1.1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.25);
  width: 100%;
}

.menu-btn:hover {
  background-color: var(--btn-amber-hover);
  transform: translateY(-2px);
}

.back-btn {
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Wheel */
.wheel-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 2rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wheel-pointer {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--btn-amber);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.wheel-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 4s cubic-bezier(0.15, 0.9, 0.15, 1);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-navy);
  border: 2px solid var(--btn-amber);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

/* Question & Answers */
.question-box {
  background-color: #FFF2CD;
  color: #1A3454;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.option-btn {
  background-color: var(--btn-amber);
  color: var(--text-dark);
  border: none;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  text-align: justify;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.2);
  display: flex;
  align-items: center;
}

.option-btn:hover {
  background-color: var(--btn-amber-hover);
  transform: translateY(-2px);
}

.app-logo-badge {
  width: 100px;
  height: 100px;
  max-width: 100px;
  max-height: 100px;
  display: block;
  margin: 0 auto 1.5rem auto;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  object-fit: cover;
}

.menu-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.app-title {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

#txt-login-subtitle {
  margin-bottom: 2rem;
}

.spin-btn {
  margin: 0 auto;
  max-width: 180px;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
}

.mode-title {
  color: var(--btn-amber);
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
}

.modal-btn {
  width: auto;
  max-width: 200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  font-size: 0.95rem;
}

.modal-title {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: var(--text-light);
  margin-bottom: 2.2rem;
}

.question-box p {
  font-size: 1.15rem;
  font-weight: 700; /* Aplica o negrito */
  line-height: 1.5;
  text-align: justify; /* Justifica o texto da pergunta */
}

.question-header {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem; /* Aumentado para dar mais espaço antes do box da pergunta */
}

.category-badge {
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid var(--btn-amber); /* Borda simples em tom âmbar */
  color: var(--btn-amber);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#step-modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.leaderboard-item.highlight-user {
  border: 1px solid var(--btn-amber, #f39c12);
  background-color: rgba(243, 156, 18, 0.15);
}

.leaderboard-rank {
  font-weight: bold;
  min-width: 32px;
  color: var(--btn-amber, #f39c12);
}

.leaderboard-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.leaderboard-name {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-points {
  font-weight: bold;
}

.leaderboard-tabs-wrapper {
  width: 100%;
  margin-bottom: 1.5rem;
}

.leaderboard-tabs-wrapper::-webkit-scrollbar {
  height: 4px;
}

.leaderboard-tabs-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.leaderboard-tabs {
  display: flex;
  justify-content: space-between; /* Distribui os 5 botões na largura da tela */
  gap: 0.25rem; /* Espaçamento mínimo entre botões */
}

/* Botões do cabeçalho otimizados para texto multitítulo */
.leaderboard-tab-btn {
  flex: 1; /* Faz os botões dividirem o espaço igualmente */
  min-width: 0; /* Permite que o botão encolha conforme o texto quebra */
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  /* Redução drástica do tamanho e espaçamento */
  padding: 0.35rem 0.2rem;
  font-size: 0.65rem; /* Fonte pequena para caber sem scroll */
  line-height: 1.1; /* Espaçamento entre as linhas do texto quebrado */
  font-weight: 600;
  
  /* Configuração para quebrar o texto em várias linhas */
  white-space: normal;
  text-align: center;
  word-wrap: break-word;
  hyphens: auto;
  
  border-radius: 8px; /* Cantos levemente arredondados */
  cursor: pointer;
  transition: all 0.3s ease;
}

.leaderboard-tab-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.leaderboard-tab-btn.active {
  background: #ffb703; /* Cor de destaque ativa */
  color: #000;
  border-color: #ffb703;
}

#leaderboard-container::-webkit-scrollbar {
  width: 5px; /* Deixa a barra bem fina */
}

#leaderboard-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15); /* Fundo discreto no tom da tela */
  border-radius: 10px;
}

#leaderboard-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15); /* Cor suave e semi-transparente */
  border-radius: 10px;
}

#leaderboard-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3); /* Destaque sutil ao passar o mouse */
}

/* Estilização para Firefox */
#leaderboard-container {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.15);
}

.podium-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.podium-item {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Alinha o conteúdo ao início (esquerda) */
  gap: 1rem;
  padding: 0.75rem 1rem;
  text-align: left; /* Garante alinhamento de texto à esquerda */
}

.podium-rank-icon {
  font-size: 1.5rem;
}

.podium-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.podium-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Força os elementos internos (nome e pontos) para a esquerda */
  text-align: left;
}

.podium-name {
  font-weight: bold;
}

.podium-points {
  font-size: 0.85rem;
  color: var(--text-muted, #ccc);
}

.podium-blocks-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30%;
  max-width: 100px;
}

.podium-avatar-wrapper {
  position: relative;
  margin-bottom: 0.4rem;
}

.podium-medal {
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 1.2rem;
}

.podium-column .podium-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.rank-1 .podium-avatar { border-color: #FFD700; width: 56px; height: 56px; }
.rank-2 .podium-avatar { border-color: #C0C0C0; }
.rank-3 .podium-avatar { border-color: #CD7F32; }

.podium-column .podium-name {
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.podium-column .podium-points {
  font-size: 0.75rem;
  color: var(--text-muted, #ccc);
  margin-bottom: 0.4rem;
}

/* Altura dos degraus */
.podium-step {
  width: 100%;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #fff;
}

.rank-1 .podium-step { height: 80px; background: linear-gradient(180deg, #FFD700 0%, #B8860B 100%); }
.rank-2 .podium-step { height: 60px; background: linear-gradient(180deg, #C0C0C0 0%, #7F8C8D 100%); }
.rank-3 .podium-step { height: 45px; background: linear-gradient(180deg, #CD7F32 0%, #8B4513 100%); }

.author-credits {
  font-size: 0.75rem;
  color: var(--text-muted, #888888);
  margin-top: 1.5rem;
  text-align: center;
  opacity: 0.8;
}

.language-flags {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;               /* Espaçamento entre as bandeiras */
  margin-top: 8px;         /* Distância da frase acima */
  margin-bottom: 24px;      /* Distância para o botão de Login */
  font-size: 1.5rem;       /* Tamanho dos emojis (se usar emojis) */
}

/* Caso utilize tags <img> em vez de emojis: */
.language-flags img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;      /* Cantos levemente arredondados */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}