:root {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --bg-tertiary: #2d2d2d;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --accent: #22c55e; /* Verde em vez de roxo */
  --accent-dark: #16a34a; /* Verde escuro */
  --success: #059669; /* Verde sucesso */
  --error: #ef4444;
  --border-radius: 12px;
  --card-radius: 16px;
  --pill-radius: 24px;
  --border-color: rgba(255, 255, 255, 0.12);
  --item-available: #1e1e1e;
  --item-selected: var(--accent);
  --item-sold: #3a3a3a;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
  position: relative;
  padding-bottom: 60px; /* Espaço para o footer */
}

.container {
  width: 100%;
  padding: 0 16px;
  margin: 0 auto;
  max-width: 480px;
}

/* App Header */
.app-header {
  background-color: var(--bg-primary);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.app-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.app-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.action-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

.language-select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

/* App Content */
.app-content {
  flex: 1;
  padding-bottom: 80px; /* Espaço suficiente para não haver sobreposição */
}

/* Prize Section */
.prize-section {
  margin-bottom: 24px;
}

.media-container {
  position: relative;
  margin: 0 -16px;
  height: 220px;
  overflow: hidden;
}

.prize-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  font-size: 48px;
  color: var(--text-secondary);
}

.prize-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.prize-name {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.prize-details {
  padding: 16px 0;
}

.description-box {
  margin-bottom: 16px;
}

.description-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.info-pill {
  background-color: var(--bg-secondary);
  padding: 6px 12px;
  border-radius: var(--pill-radius);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.info-pill i {
  color: var(--accent);
  font-size: 14px;
}

/* Stats Section */
.stats-section {
  margin-bottom: 24px;
}

.stats-container {
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
}

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

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Simplificação do progress-ring para uso com inline style */
.progress-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  /* O background será definido inline diretamente no elemento */
}

.progress-ring::before {
  content: '';
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  position: absolute;
}

.progress-value {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  margin-bottom: 16px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.tab-button {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.tab-button.active {
  background-color: var(--accent);
  color: #000;
}

/* Numbers Section */
.numbers-section {
  margin-bottom: 24px;
}

.section-header {
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.filter-bar {
  display: flex;
  margin-bottom: 16px;
  gap: 8px;
}

.search-box {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  height: 44px;
  background-color: var(--bg-secondary);
  border: none;
  border-radius: var(--border-radius);
  padding: 0 12px 0 36px;
  color: var(--text-primary);
  font-size: 15px;
}

.search-box input:focus {
  outline: 1px solid var(--accent);
}

.filter-btn {
  width: 44px;
  height: 44px;
  background-color: var(--accent);
  border: none;
  border-radius: var(--border-radius);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.legend-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.legend-color.available {
  background-color: var(--item-available);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-color.selected {
  background-color: var(--item-selected);
}

.legend-color.sold {
  background-color: var(--item-sold);
  position: relative;
}

.legend-color.sold::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background-color: var(--error);
  transform: rotate(-45deg);
}

.legend-text {
  font-size: 12px;
  color: var(--text-secondary);
}

.number-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  min-height: 300px; /* Altura mínima para evitar saltos de layout */
}

.number-card {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.number-card.available {
  background-color: var(--item-available);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.number-card.available:active {
  transform: scale(0.96);
}

.number-card.selected {
  background-color: var(--item-selected);
  color: #000;
  border: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.3);
}

.number-card.sold {
  background-color: var(--item-sold);
  color: var(--text-secondary);
  opacity: 0.7;
  position: relative;
  cursor: not-allowed;
}

.number-card.sold::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background-color: var(--error);
  transform: rotate(-45deg);
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 14px;
  color: var(--text-secondary);
}

.highlight-search {
  animation: highlight 1.5s infinite;
}

@keyframes highlight {
  0%, 100% { box-shadow: 0 0 0 2px var(--accent); }
  50% { box-shadow: 0 0 0 4px var(--accent); }
}

/* Bottom Bar - Modificações para ficar oculta e aparecer apenas quando necessário */
.selection-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0; /* Colado no bottom */
  background-color: var(--bg-secondary);
  padding: 12px 16px;
  box-shadow: var(--shadow);
  z-index: 99;
  transform: translateY(100%); /* Começa oculto, transladado para fora da tela */
  transition: transform 0.3s ease-out;
}

.selection-bar.active {
  transform: translateY(0); /* Aparece na tela quando tem a classe active */
}

.selected-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.selected-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.selected-count span:first-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.selected-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.btn-action {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--border-radius);
  background-color: var(--accent);
  color: #000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-action:disabled {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.btn-action:not(:disabled):active {
  background-color: var(--accent-dark);
}

/* Bottom Sheet */
.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-secondary);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

.handle-bar {
  width: 40px;
  height: 4px;
  background-color: var(--text-secondary);
  border-radius: 2px;
}

.sheet-header {
  padding: 0 16px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.sheet-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.sheet-body {
  padding: 16px;
}

.selected-numbers-preview {
  margin-bottom: 24px;
}

.preview-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.number-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.number-tag {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  font-size: 14px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 16px;
}

.input-wrapper input {
  width: 100%;
  height: 48px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0 12px 0 40px;
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.input-wrapper input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Estilo para textarea de anotação */
.input-wrapper textarea {
  width: 100%;
  min-height: 80px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 12px 12px 40px;
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s ease;
  resize: vertical;
  font-family: 'Inter', sans-serif;
}

.input-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Estilos para o aviso de pagamento */
.payment-notice {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.notice-icon {
  color: #ffc107;
  font-size: 24px;
}

.payment-notice p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Estilos para o modal de sucesso com informações de pagamento */
.payment-info {
  background-color: var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 16px;
  margin: 16px 0;
  text-align: left;
}

.payment-detail {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.payment-detail:last-child {
  margin-bottom: 0;
}

.payment-detail strong {
  color: var(--text-primary);
}

.payment-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.btn-whatsapp {
  background-color: #25D366;
  border: none;
  border-radius: 24px;
  color: #fff;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-whatsapp i {
  font-size: 18px;
}

.btn-copy {
  align-self: flex-start;
  background-color: transparent;
  border: 1px solid var(--accent);
  border-radius: 20px;
  color: var(--accent);
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.terms-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.terms-check label {
  font-size: 14px;
  color: var(--text-secondary);
}

.btn-submit {
  width: 100%;
  height: 48px;
  background-color: var(--accent);
  border: none;
  border-radius: var(--border-radius);
  color: #000;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit:disabled {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

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

/* App Navigation */
.app-navigation {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 8px 0;
  z-index: 98;
  width: 100%;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 10px;
}

.nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-item.active {
  color: var(--accent);
}

/* Light theme override - just for toggle function */
body.light-theme {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --border-color: rgba(0, 0, 0, 0.1);
  --item-available: #f8f9fa;
  --item-sold: #e9ecef;
}

/* Ajuste responsividade */
@media (max-width: 374px) {
  .number-container {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .number-card {
    font-size: 14px;
  }
}

/* Estilo melhorado para entrada de telefone internacional */
.phone-input-wrapper {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.country-code-selector {
  position: relative;
  flex-shrink: 0;
  /* Tamanho fixo ideal para o seletor */
  width: auto;
  min-width: 90px;
}

.country-code-selector select {
  height: 48px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 8px 28px 8px 12px;
  font-size: 15px;
  appearance: none;
  cursor: pointer;
  width: 100%;
}

.phone-number {
  flex: 1; /* Faz com que o campo de telefone ocupe todo espaço restante */
  width: 100%;
}

.phone-number input {
  width: 100%; /* Garantindo que o input ocupe toda a largura disponível */
}