/* ==========================================================================
   MAIN LAYOUT & GENERAL STYLES (SHOW DO MILHÃO BÍBLICO)
   ========================================================================== */

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

body {
  background: radial-gradient(circle at 50% 10%, #171d4a 0%, var(--bg-dark-primary) 80%);
  color: var(--text-white);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.app-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1350px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
}

/* ==========================================================================
   TOP HEADER
   ========================================================================== */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
  animation: floatSlow 3s ease-in-out infinite alternate;
}

.logo-title {
  font-family: var(--font-royal);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 10px rgba(251, 191, 36, 0.2);
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--text-sub);
  letter-spacing: 0.5px;
  display: block;
  font-family: var(--font-ui);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-control {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.btn-header-control:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-header-control.muted {
  opacity: 0.5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   START SCREEN
   ========================================================================== */
.screen-start-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
  padding: 20px 10px 40px;
}

.hero-banner {
  margin-bottom: 28px;
}

.hero-symbol {
  font-size: 3.5rem;
  margin-bottom: 8px;
  display: inline-block;
  animation: pulseGold 2.5s infinite;
}

.hero-title {
  font-family: var(--font-royal);
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
  margin-bottom: 8px;
}

.hero-subtitle {
  color: var(--text-sub);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
}

.start-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-gold), var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 100%;
}

.section-label {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-bright);
  margin-bottom: 12px;
  display: block;
  text-align: left;
}

.input-group {
  margin-bottom: 24px;
}

.styled-input {
  width: 100%;
  background: rgba(10, 14, 38, 0.75);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: var(--text-white);
  font-size: 1.1rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.styled-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.35);
}

/* Modo Faixa Etária */
.age-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.age-mode-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  color: var(--text-white);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.age-mode-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.age-mode-btn.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold-bright);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.age-icon {
  font-size: 1.8rem;
}

.age-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.age-range {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 600;
}

/* Grade de Avatares */
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.avatar-card {
  background: rgba(14, 19, 51, 0.7);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
}

.avatar-card:hover {
  background: rgba(30, 42, 100, 0.8);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.3);
}

.avatar-card.selected {
  border-color: var(--gold-bright);
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
  transform: scale(1.03);
}

.avatar-icon {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.avatar-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-white);
}

.avatar-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Botões Primários */
.btn-primary {
  background: var(--gold-gradient-glow);
  color: #1a0f00;
  font-family: var(--font-royal);
  font-weight: 900;
  font-size: 1.35rem;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(251, 191, 36, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
  transform: scale(1.04) translateY(-2px);
  box-shadow: 0 10px 35px rgba(251, 191, 36, 0.7);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ==========================================================================
   ARENA DO JOGO (MAIN GAME ARENA)
   ========================================================================== */
.game-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  flex: 1;
}

.arena-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arena-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Animações Auxiliares */
.hidden {
  display: none !important;
}

@keyframes pulseGold {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.4));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 25px rgba(251, 191, 36, 0.8));
  }
}

@keyframes floatSlow {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-5px); }
}

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

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

/* Responsividade Base */
@media (max-width: 992px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  .arena-sidebar {
    order: 2;
  }
  .hero-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 600px) {
  .app-wrapper {
    padding: 10px;
  }
  .main-header {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .start-card {
    padding: 16px;
  }
  .btn-primary {
    font-size: 1.1rem;
    padding: 14px 24px;
    width: 100%;
  }
}
