/**
 * Quiz Game Styles - Desafio Mestre Shamo
 * Design: Dark + Gold, masculino, premium
 */

/* ==================== RESET E BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary, #0d0d0d);
  color: var(--text-primary, #ffffff);
  min-height: 100vh;
  line-height: 1.5;
}

/* ==================== TELAS ==================== */
.tela {
  display: none;
  min-height: 100vh;
  padding: 20px;
}

.tela.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

/* ==================== TELA INICIAL ==================== */
.quiz-header {
  text-align: center;
  margin-bottom: 32px;
}

.quiz-badge {
  display: inline-block;
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid var(--accent-gold, #d4a574);
  color: var(--accent-gold, #d4a574);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quiz-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.quiz-subtitle {
  color: var(--text-secondary, #999);
  font-size: 1.1rem;
  font-style: italic;
}

/* Stats Box */
.quiz-stats-box {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--bg-secondary, #141414);
  border-radius: 12px;
  border: 1px solid var(--border-color, #333);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #999);
  text-transform: uppercase;
}

/* Botões */
.btn-primary {
  background: var(--accent-gold, #d4a574);
  color: var(--bg-primary, #0d0d0d);
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-large {
  width: 100%;
  padding: 18px 32px;
  font-size: 1.1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary, #fff);
  border: 1px solid var(--border-color, #333);
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent-gold, #d4a574);
  color: var(--accent-gold, #d4a574);
}

/* Botão Facebook - destaque para compartilhamento viral */
.btn-facebook {
  background: linear-gradient(135deg, #1877F2 0%, #0d5fc2 100%);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  flex: 1;
}

.btn-facebook:hover {
  background: linear-gradient(135deg, #1a8cff 0%, #1877F2 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

/* Botão WhatsApp - Lado a lado com Facebook */
.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  flex: 1;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #2be371 0%, #25D366 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--accent-gold, #d4a574);
}

/* Ranking Preview */
.ranking-preview {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-secondary, #141414);
  border-radius: 12px;
  border: 1px solid var(--border-color, #333);
}

.ranking-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary, #999);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-primary, #0d0d0d);
  border-radius: 8px;
}

.ranking-pos {
  font-size: 1.2rem;
  width: 32px;
}

.ranking-nome {
  flex: 1;
  font-weight: 500;
}

.ranking-pts {
  color: var(--accent-gold, #d4a574);
  font-weight: 600;
}

.ranking-loading {
  text-align: center;
  color: var(--text-secondary, #999);
  padding: 20px;
}

.ver-ranking-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--accent-gold, #d4a574);
  font-size: 0.9rem;
  text-decoration: none;
}

.ver-ranking-link:hover {
  text-decoration: underline;
}

/* Quiz Info */
.quiz-info {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
}

.info-icon {
  font-size: 1.2rem;
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  background: var(--bg-secondary, #141414);
  border-radius: 16px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--border-color, #333);
}

.modal-large {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-secondary, #999);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary, #fff);
}

.modal-footer {
  margin-top: 16px;
  text-align: center;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary, #0d0d0d);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  color: var(--text-primary, #fff);
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-gold, #d4a574);
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary, #999);
  font-size: 0.8rem;
}

/* ==================== TELA QUIZ ==================== */
.quiz-container {
  max-width: 600px;
  width: 100%;
  padding: 20px;
}

.quiz-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.quiz-progress {
  flex: 1;
}

.pergunta-atual {
  font-size: 0.8rem;
  color: var(--text-secondary, #999);
  margin-bottom: 8px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.progress-bar {
  height: 6px;
  background: var(--bg-secondary, #141414);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gold, #d4a574);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 5%;
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-secondary, #141414);
  border-radius: 8px;
  margin-left: 20px;
}

.timer-icon {
  font-size: 1rem;
}

.timer-value {
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

.timer-value.warning {
  color: #f59e0b;
}

.timer-value.danger {
  color: #ef4444;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Game Info */
.quiz-game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary, #141414);
  border-radius: 8px;
  margin-bottom: 24px;
}

.info-pontos, .info-streak {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-pontos .label {
  color: var(--text-secondary, #999);
  font-size: 0.85rem;
}

.info-pontos .value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
}

.info-streak {
  padding: 4px 12px;
  background: rgba(239, 68, 68, 0.2);
  border-radius: 20px;
  display: none;
}

.info-streak.active {
  display: flex;
}

.streak-fire {
  font-size: 1rem;
}

.streak-value {
  font-weight: 600;
  color: #ef4444;
}

.nivel-badge {
  padding: 4px 12px;
  background: rgba(212, 165, 116, 0.2);
  color: var(--accent-gold, #d4a574);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.nivel-badge.medio {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.nivel-badge.dificil {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.nivel-badge.expert {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Pergunta */
.pergunta-container {
  margin-bottom: 24px;
}

.pergunta-texto {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

/* Opções */
.opcoes-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opcao-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-secondary, #141414);
  border: 2px solid var(--border-color, #333);
  border-radius: 12px;
  color: var(--text-primary, #fff);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.opcao-btn:hover:not(:disabled) {
  border-color: var(--accent-gold, #d4a574);
  background: rgba(212, 165, 116, 0.1);
}

.opcao-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.opcao-btn.selected {
  border-color: var(--accent-gold, #d4a574);
  background: rgba(212, 165, 116, 0.2);
}

.opcao-btn.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.opcao-btn.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.opcao-letra {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary, #0d0d0d);
  border-radius: 6px;
  font-weight: 600;
  flex-shrink: 0;
}

.opcao-texto {
  flex: 1;
}

/* ==================== TELA FEEDBACK ==================== */
.feedback-container {
  max-width: 500px;
  width: 100%;
  text-align: center;
  padding: 40px 20px;
}

.feedback-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.feedback-icon.correct {
  color: #22c55e;
}

.feedback-icon.incorrect {
  color: #ef4444;
}

.feedback-titulo {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.feedback-titulo.correct {
  color: #22c55e;
}

.feedback-titulo.incorrect {
  color: #ef4444;
}

.feedback-pontos {
  margin-bottom: 24px;
}

.pontos-ganhos {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
  margin-bottom: 8px;
}

.streak-bonus {
  display: none;
  font-size: 1rem;
  color: #ef4444;
}

.streak-bonus.active {
  display: block;
}

.feedback-explicacao {
  padding: 20px;
  background: var(--bg-secondary, #141414);
  border-radius: 12px;
  margin-bottom: 24px;
  text-align: left;
}

.feedback-explicacao p {
  color: var(--text-secondary, #999);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==================== TELA RESULTADO ==================== */
.resultado-container {
  max-width: 500px;
  width: 100%;
  text-align: center;
  padding: 20px;
}

.resultado-header h1 {
  font-size: 1.5rem;
  color: var(--text-secondary, #999);
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.resultado-pontuacao {
  margin-bottom: 16px;
}

.pontuacao-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 48px;
  background: var(--bg-secondary, #141414);
  border: 2px solid var(--accent-gold, #d4a574);
  border-radius: 16px;
}

.pontuacao-valor {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
  line-height: 1;
}

.pontuacao-label {
  font-size: 0.9rem;
  color: var(--text-secondary, #999);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
}

.resultado-nivel {
  margin-bottom: 32px;
}

.nivel-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

.nivel-titulo {
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.resultado-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.resultado-stats .stat {
  text-align: center;
}

.resultado-stats .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #fff);
}

.resultado-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary, #999);
}

.resultado-carta {
  padding: 24px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(212, 165, 116, 0.05));
  border: 1px solid var(--accent-gold, #d4a574);
  border-radius: 16px;
  margin-bottom: 24px;
}

.resultado-carta h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.btn-carta {
  animation: glow 2s infinite;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 165, 116, 0.3); }
  50% { box-shadow: 0 0 40px rgba(212, 165, 116, 0.5); }
}

.resultado-acoes {
  display: flex;
  gap: 12px;
}

.resultado-acoes .btn-secondary {
  flex: 1;
}

.resultado-acoes-secundarias {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

/* Gatilho Competitivo - "Faltam X pontos para passar Fulano" */
.gatilho-competitivo {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(180, 140, 100, 0.1));
  border: 1px solid var(--accent-gold, #d4a574);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: center;
}

.gatilho-primeiro {
  color: var(--accent-gold, #d4a574);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gatilho-subir {
  color: var(--text-primary, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gatilho-emoji {
  font-size: 1.5rem;
}

.gatilho-texto {
  font-size: 0.95rem;
}

.gatilho-texto strong {
  color: var(--accent-gold, #d4a574);
}

/* ==================== TELA CARTA ==================== */
.carta-container {
  max-width: 500px;
  width: 100%;
  text-align: center;
  padding: 20px;
}

.carta-titulo {
  font-size: 1.5rem;
  margin-bottom: 32px;
  letter-spacing: 2px;
}

.carta-wrapper {
  perspective: 1000px;
  margin-bottom: 32px;
}

.carta {
  width: 180px;
  height: 260px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s;
  cursor: pointer;
}

.carta.flipped {
  transform: rotateY(180deg);
}

.carta-frente, .carta-verso {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.carta-frente {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 2px solid var(--accent-gold, #d4a574);
}

.carta-pattern {
  width: 80%;
  height: 80%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(212, 165, 116, 0.1) 10px,
    rgba(212, 165, 116, 0.1) 20px
  );
  border-radius: 8px;
}

.carta-verso {
  background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
  border: 2px solid var(--accent-gold, #d4a574);
  transform: rotateY(180deg);
}

.carta-simbolo {
  font-size: 4rem;
  margin-bottom: 8px;
}

.carta-nome {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
}

.carta-naipe {
  font-size: 0.9rem;
  color: var(--text-secondary, #999);
}

.carta-premio {
  padding: 24px;
  background: var(--bg-secondary, #141414);
  border-radius: 12px;
  margin-bottom: 24px;
}

.premio-titulo {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.premio-codigo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary, #0d0d0d);
  border-radius: 8px;
  margin-bottom: 12px;
}

.codigo-label {
  color: var(--text-secondary, #999);
}

.codigo-valor {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
  font-family: monospace;
}

.btn-copiar {
  padding: 6px 12px;
  background: var(--accent-gold, #d4a574);
  color: var(--bg-primary, #0d0d0d);
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.premio-validade {
  color: var(--text-secondary, #999);
  font-size: 0.85rem;
}

.carta-near-miss {
  padding: 20px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  margin-bottom: 24px;
}

.near-miss-texto {
  color: var(--text-secondary, #999);
  line-height: 1.6;
}

.near-miss-texto strong {
  color: var(--accent-gold, #d4a574);
}

.carta-comprar {
  margin-bottom: 24px;
}

.carta-comprar h4 {
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.pacotes-cartas {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-pacote {
  flex: 1;
  max-width: 140px;
  padding: 16px 12px;
  background: var(--bg-secondary, #141414);
  border: 1px solid var(--border-color, #333);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.btn-pacote:hover {
  border-color: var(--accent-gold, #d4a574);
}

.btn-pacote.destaque {
  border-color: var(--accent-gold, #d4a574);
  background: rgba(212, 165, 116, 0.1);
}

.pacote-qtd {
  font-size: 0.9rem;
  color: var(--text-primary, #fff);
  font-weight: 500;
}

.pacote-preco {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
}

.pacote-economia {
  font-size: 0.7rem;
  color: #22c55e;
}

.carta-acoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==================== RANKING TABS ==================== */
.ranking-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: var(--bg-primary, #0d0d0d);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--accent-gold, #d4a574);
  color: var(--bg-primary, #0d0d0d);
  border-color: var(--accent-gold, #d4a574);
}

.ranking-lista {
  max-height: 400px;
  overflow-y: auto;
}

.ranking-lista .ranking-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-primary, #0d0d0d);
  border-radius: 8px;
  margin-bottom: 8px;
}

.ranking-lista .ranking-item.highlight {
  border: 1px solid var(--accent-gold, #d4a574);
  background: rgba(212, 165, 116, 0.1);
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-shake {
  animation: shake 0.3s ease-out;
}

/* ==================== RASPADINHA ==================== */
.scratch-container {
  max-width: 500px;
  width: 100%;
  text-align: center;
  padding: 20px;
  position: relative;
}

.scratch-titulo {
  font-size: 1.5rem;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.scratch-subtitulo {
  color: var(--text-secondary, #999);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.scratch-card-wrapper {
  position: relative;
  width: 300px;
  height: 200px;
  margin: 0 auto 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 2;
  border-radius: 16px;
}

#scratch-premio {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  border: 3px solid var(--accent-gold, #d4a574);
  border-radius: 16px;
  z-index: 1;
}

.scratch-premio-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.scratch-premio-texto {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
  margin-bottom: 8px;
}

.scratch-premio-codigo {
  font-size: 1rem;
  font-family: monospace;
  color: var(--text-secondary, #999);
  background: var(--bg-primary, #0d0d0d);
  padding: 6px 12px;
  border-radius: 4px;
}

/* Resultado da raspadinha */
#scratch-resultado {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

#scratch-resultado.revelado {
  display: block;
}

.scratch-jackpot,
.scratch-especial,
.scratch-desafio,
.scratch-desconto {
  padding: 24px;
  background: var(--bg-secondary, #141414);
  border-radius: 16px;
  margin-bottom: 24px;
}

.scratch-jackpot {
  border: 2px solid #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.scratch-jackpot h2,
.scratch-especial h2 {
  color: #ffd700;
  margin-bottom: 16px;
}

.scratch-desafio h2 {
  color: var(--accent-gold, #d4a574);
  margin-bottom: 12px;
}

.scratch-desconto h2 {
  color: #22c55e;
  margin-bottom: 16px;
}

.scratch-premio-grande {
  font-size: 4rem;
  margin-bottom: 12px;
}

.scratch-premio-nome {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
  margin-bottom: 8px;
}

.scratch-instrucao {
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
}

.scratch-codigo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary, #0d0d0d);
  border-radius: 8px;
  margin: 16px 0;
}

.scratch-codigo-label {
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
}

.scratch-codigo-valor {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-gold, #d4a574);
  font-family: monospace;
  letter-spacing: 2px;
}

.btn-copiar-codigo {
  padding: 8px 16px;
  background: var(--accent-gold, #d4a574);
  color: var(--bg-primary, #0d0d0d);
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copiar-codigo:hover {
  opacity: 0.9;
}

.scratch-validade {
  color: var(--text-secondary, #999);
  font-size: 0.85rem;
}

.scratch-near-miss {
  padding: 20px;
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 12px;
  margin-bottom: 24px;
}

.scratch-near-miss p {
  color: var(--text-secondary, #999);
  line-height: 1.6;
  margin-bottom: 8px;
}

.scratch-near-miss p:last-child {
  margin-bottom: 0;
}

.scratch-near-miss strong {
  color: var(--accent-gold, #d4a574);
}

/* Toast */
.scratch-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold, #d4a574);
  color: var(--bg-primary, #0d0d0d);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 10000;
  animation: fadeInUp 0.3s ease;
}

.scratch-toast.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Confetti */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(400px) rotate(720deg);
    opacity: 0;
  }
}

.confetti {
  pointer-events: none;
}

/* Ações da raspadinha */
.scratch-acoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* Pacotes de raspadinha */
.scratch-comprar {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color, #333);
}

.scratch-comprar h4 {
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 480px) {
  .quiz-title {
    font-size: 1.5rem;
  }

  .quiz-stats-box {
    gap: 16px;
    padding: 16px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .pergunta-texto {
    font-size: 1.1rem;
  }

  .opcao-btn {
    padding: 14px 16px;
  }

  .pontuacao-valor {
    font-size: 3rem;
  }

  .resultado-stats {
    gap: 20px;
  }

  .pacotes-cartas {
    flex-direction: column;
    align-items: center;
  }

  .btn-pacote {
    max-width: 200px;
    width: 100%;
  }

  .resultado-acoes {
    flex-direction: column;
  }
}

/* ==================== DESAFIO EXTRA ==================== */
.desafio-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 24px;
  background: var(--bg-secondary, #141414);
  border-radius: 12px;
  border: 1px solid var(--accent-gold, #d4a574);
}

.desafio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.desafio-badge {
  background: linear-gradient(135deg, var(--accent-gold), #b8956a);
  color: #0d0d0d;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
}

.desafio-progresso {
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
}

.desafio-pergunta {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.5;
  text-align: center;
}

.desafio-opcoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desafio-opcao {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary, #0d0d0d);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  color: var(--text-primary, #fff);
  font-size: 1rem;
}

.desafio-opcao:hover:not(:disabled) {
  border-color: var(--accent-gold);
  background: rgba(212, 165, 116, 0.1);
}

.desafio-opcao .opcao-letra {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  color: #0d0d0d;
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
}

.desafio-opcao.correto {
  border-color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.desafio-opcao.correto .opcao-letra {
  background: #4ade80;
}

.desafio-opcao.errado {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.desafio-opcao.errado .opcao-letra {
  background: #ef4444;
}

.desafio-acertos {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color, #333);
  color: var(--accent-gold);
  font-weight: 600;
}

.desafio-resultado {
  text-align: center;
  padding: 32px;
}

.desafio-resultado.sucesso h2 {
  color: #4ade80;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.desafio-resultado.falhou h2 {
  color: #ef4444;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.desafio-resultado p {
  color: var(--text-secondary, #999);
  margin-bottom: 12px;
}

.desafio-resultado .premio-codigo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.desafio-resultado .codigo {
  background: var(--bg-primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 1.2rem;
  color: var(--accent-gold);
  border: 1px dashed var(--accent-gold);
}

/* ==================== INDICADOR DE LOGIN ==================== */
.login-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 20px;
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 8px;
  font-size: 0.9rem;
}

.login-indicator .login-user {
  color: var(--accent-gold, #d4a574);
  font-weight: 500;
}

.login-indicator .login-logout-btn {
  background: transparent;
  border: 1px solid var(--text-secondary, #666);
  color: var(--text-secondary, #999);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.login-indicator .login-logout-btn:hover {
  border-color: var(--accent-gold, #d4a574);
  color: var(--accent-gold, #d4a574);
}
