/* ============================================================
   ESTILOS PREMIUM WORLD-CLASS - RIFA BENEFICENTE (AJUDE A BIA)
   Com Ícones Reais FontAwesome 6, Micro-Animações e Glassmorphism
   ============================================================ */

:root {
  --primary-color: #6c5ce7;
  --primary-hover: #5b4cc4;
  --primary-gradient: linear-gradient(135deg, #6c5ce7 0%, #8c7ae6 50%, #a29bfe 100%);
  --secondary-color: #00cec9;
  --accent-color: #ff7675;
  --bg-card: rgba(255, 255, 255, 0.96);
  --text-main: #2d3436;
  --text-muted: #636e72;
  --border-radius-lg: 24px;
  --border-radius-md: 18px;
  --border-radius-sm: 14px;
  
  /* Status dos Números */
  --status-disponivel-bg: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%);
  --status-disponivel-color: #ffffff;
  --status-reservado-bg: linear-gradient(135deg, #ff9f43 0%, #feca57 100%);
  --status-reservado-color: #2d3436;
  --status-vendido-bg: linear-gradient(135deg, #ee5253 0%, #ff6b6b 100%);
  --status-vendido-color: #ffffff;
  --status-processando-bg: linear-gradient(135deg, #2e86de 0%, #48dbfb 100%);
  --status-processando-color: #ffffff;

  --shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 18px 40px rgba(108, 92, 231, 0.35);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: #f0f3f8;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 100px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.18) 0%, transparent 70%);
  animation: floatBlob 14s infinite alternate ease-in-out;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: -120px;
  left: -120px;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 206, 201, 0.18) 0%, transparent 70%);
  animation: floatBlob 18s infinite alternate-reverse ease-in-out;
  z-index: -1;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(45px, 65px) scale(1.1); }
  100% { transform: translate(-35px, -25px) scale(0.95); }
}

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

/* Top Bar & Brand Logo */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-color);
}

.logo-icon {
  font-size: 1.5rem;
  color: #ff4757;
  animation: heartbeat 1.5s infinite;
}

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

.btn-my-tickets {
  background: #ffffff;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.15);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-my-tickets:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Hero Section Card */
.hero-card {
  background: var(--primary-gradient);
  color: #ffffff;
  border-radius: var(--border-radius-lg);
  padding: 38px 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-glow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1dd1a1;
  box-shadow: 0 0 10px #1dd1a1;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(29, 209, 161, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(29, 209, 161, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(29, 209, 161, 0); }
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto 22px;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.trust-pill {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Banner Wrapper */
.campaign-banner-wrapper {
  width: 100%;
  max-height: 420px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  border: 4px solid rgba(255, 255, 255, 0.9);
}

.campaign-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Glassmorphism Section Cards */
.card-box {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  padding: 32px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.title-icon {
  color: var(--primary-color);
  font-size: 1.35rem;
}

.story-text {
  font-size: 1.05rem;
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.04) 0%, rgba(0, 206, 201, 0.04) 100%);
  border-left: 5px solid var(--primary-color);
  padding: 20px 22px;
  border-radius: var(--border-radius-sm);
}

.story-highlight {
  margin-top: 14px;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Metrics & Statistics Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric-item {
  background: #ffffff;
  border-radius: var(--border-radius-sm);
  padding: 18px 14px;
  text-align: center;
  border: 1px solid #eef2f5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  position: relative;
}

.metric-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(108, 92, 231, 0.12);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 1.1rem;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 800;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-top: 2px;
}

/* Barra de Progresso com Shimmer */
.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.progress-bar-bg {
  width: 100%;
  height: 20px;
  background: #eef2f5;
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6c5ce7 0%, #00cec9 100%);
  border-radius: 50px;
  transition: width 1.2s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer { 100% { left: 100%; } }

/* Abas de Filtro */
.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.filter-tab {
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid #dfe4ea;
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.filter-tab.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

/* Grid de Números Adaptável */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.num-btn {
  height: 68px;
  border-radius: var(--border-radius-sm);
  border: none;
  font-size: 1.3rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  position: relative;
  user-select: none;
}

.num-btn.disponivel {
  background: var(--status-disponivel-bg);
  color: var(--status-disponivel-color);
}

.num-btn.selected {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  transform: scale(1.08) translateY(-4px);
  box-shadow: 0 12px 25px rgba(108, 92, 231, 0.5) !important;
  outline: 3px solid #ffffff;
}

.num-btn.selected::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 6px;
  font-size: 0.8rem;
  font-weight: 900;
}

.num-btn.reservado {
  background: var(--status-reservado-bg);
  color: var(--status-reservado-color);
}

.num-btn.vendido {
  background: var(--status-vendido-bg);
  color: var(--status-vendido-color);
  cursor: not-allowed;
  opacity: 0.88;
}

.num-sublabel {
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.95;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Barra Flutuante de Seleção Múltipla */
.floating-selection-bar {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(130px);
  width: 92%;
  max-width: 620px;
  background: rgba(15, 17, 26, 0.94);
  backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 16px 26px;
  border-radius: 50px;
  box-shadow: 0 20px 45px rgba(0,0,0,0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1500;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-selection-bar.active {
  transform: translateX(-50%) translateY(0);
}

.selection-info {
  font-weight: 800;
  font-size: 1.05rem;
}

.btn-checkout-bar {
  background: linear-gradient(135deg, #10ac84 0%, #1dd1a1 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(29, 209, 161, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-clear-bar {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-clear-bar:hover {
  background: rgba(255, 71, 87, 0.8);
  border-color: #ff4757;
}

.luck-btn-container {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.luck-btn {
  background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%);
  color: #ffffff;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 206, 201, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Modais */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 17, 26, 0.72);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 500px;
  border-radius: var(--border-radius-lg);
  padding: 34px 28px;
  box-shadow: 0 25px 65px rgba(0,0,0,0.35);
  transform: translateY(40px) scale(0.95);
  transition: all 0.3s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f2f6;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-number-badge {
  display: inline-block;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
  padding: 8px 30px;
  border-radius: 50px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-glow);
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--border-radius-sm);
  border: 2px solid #eef2f5;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #f8f9fa;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.qr-container { text-align: center; margin: 18px 0; }

.qr-image {
  width: 210px;
  height: 210px;
  border-radius: var(--border-radius-sm);
  border: 2px solid #eef2f5;
  padding: 10px;
  background: #ffffff;
}

.pix-code-box {
  background: #f8f9fa;
  border: 2px dashed #ced6e0;
  border-radius: var(--border-radius-sm);
  padding: 12px;
  font-family: monospace;
  font-size: 0.85rem;
  word-break: break-all;
  max-height: 85px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.countdown-box {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  text-align: center;
  font-weight: 800;
  color: #d35400;
  margin-bottom: 18px;
  font-size: 1rem;
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  z-index: 4000;
  animation: fall 3s linear forwards;
}

@keyframes fall {
  to { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e272e;
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  transition: transform 0.35s ease;
  z-index: 3000;
}

.toast-msg.active {
  transform: translateX(-50%) translateY(0);
}

footer {
  text-align: center;
  padding-top: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.admin-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 800;
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.8rem; }
  .hero-card { padding: 28px 18px; }
  .numbers-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .num-btn { height: 60px; font-size: 1.15rem; }
}
