/**
 * 🎨 ONBOARDING MODAL - Cold Start Flow
 * 
 * Estilo Netflix/Spotify com glassmorphism e micro-interações de dopamina
 * Otimizado para conversão máxima em novos usuários
 */

/* ========================================
   OVERLAY & CONTAINER
   ======================================== */

.onboarding-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  
  /* Glassmorphism background */
  background: rgba(10, 10, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.onboarding-modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  
  /* Glassmorphism card */
  background: linear-gradient(
    135deg,
    rgba(20, 20, 50, 0.95),
    rgba(30, 30, 60, 0.9)
  );
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 24px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(0, 245, 255, 0.1) inset;
  
  /* Scroll interno */
  display: flex;
  flex-direction: column;
}

/* ========================================
   HEADER
   ======================================== */

.onboarding-modal-header {
  padding: 40px 40px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.onboarding-logo-container {
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.onboarding-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  
  background: linear-gradient(135deg, #fff, #00f5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.onboarding-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 20px;
}

.onboarding-subtitle strong {
  color: #00f5ff;
  font-weight: 600;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

#selection-counter {
  font-size: 1.1rem;
  font-weight: 700;
  color: #00f5ff;
  text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

.selection-hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   SEARCH BAR
   ======================================== */

.onboarding-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}

.onboarding-search-input {
  width: 100%;
  padding: 14px 50px 14px 50px;
  
  background: rgba(20, 20, 40, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.onboarding-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.onboarding-search-input:focus {
  border-color: rgba(0, 245, 255, 0.5);
  background: rgba(20, 20, 40, 0.95);
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

.search-clear {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

/* ========================================
   BODY - INTEREST CLOUD
   ======================================== */

.onboarding-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 40px 100px;
  position: relative;
  
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 245, 255, 0.3) transparent;
}

.onboarding-modal-body::-webkit-scrollbar {
  width: 6px;
}

.onboarding-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.onboarding-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 245, 255, 0.3);
  border-radius: 10px;
}

.onboarding-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 245, 255, 0.5);
}

.disciplinas-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto;
}

.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* ========================================
   INTEREST PILLS (Big Tech Style)
   ======================================== */

.interest-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  
  padding: 12px 20px;
  
  background: rgba(30, 30, 50, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  
  cursor: pointer;
  user-select: none;
  
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Subtle shadow */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.interest-pill:hover:not(.skeleton):not(.selected) {
  background: rgba(40, 40, 70, 0.8);
  border-color: rgba(0, 245, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Selected State - Gradient Background */
.interest-pill.selected {
  background: linear-gradient(135deg, #00f5ff, #0096ff);
  border-color: transparent;
  color: #0a0a1e;
  transform: scale(1.05);
  
  box-shadow: 
    0 8px 25px rgba(0, 245, 255, 0.4),
    0 0 30px rgba(0, 245, 255, 0.3) inset;
  
  /* Adicionar brilho animado */
  animation: pill-glow 2s ease-in-out infinite;
}

.interest-pill.selected .pill-emoji {
  transform: scale(1.15);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.interest-pill.selected .pill-name {
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.interest-pill.selected .pill-count {
  background: rgba(10, 10, 30, 0.3);
  color: #fff;
  font-weight: 700;
}

/* Emoji */
.pill-emoji {
  font-size: 1.3rem;
  line-height: 1;
  transition: all 0.3s ease;
}

/* Nome da disciplina */
.pill-name {
  transition: all 0.3s ease;
}

/* Contador de questões */
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  min-width: 32px;
  padding: 4px 8px;
  
  background: rgba(0, 245, 255, 0.15);
  border-radius: 12px;
  
  color: #00f5ff;
  font-size: 0.75rem;
  font-weight: 600;
  
  transition: all 0.3s ease;
}

/* Active State (durante click) */
.interest-pill:active:not(.skeleton) {
  transform: scale(0.95);
}

@keyframes pill-glow {
  0%, 100% {
    box-shadow: 
      0 8px 25px rgba(0, 245, 255, 0.4),
      0 0 30px rgba(0, 245, 255, 0.3) inset;
/* ========================================
   SKELETON LOADING (Pills)
   ======================================== */

.interest-pill.skeleton {
  cursor: default;
  pointer-events: none;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.interest-pill.skeleton-small {
  width: 120px;
  height: 40px;
}

.interest-pill.skeleton-medium {
  width: 160px;
  height: 40px;
}

.interest-pill.skeleton-large {
  width: 200px;
  height: 40px;
}

@keyframes skeleton-pulse {
  0%, 100% { 
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.05);
  }
  50% { 
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.08);
  }
} margin-bottom: 15px;
}
/* ========================================
   FOOTER - SUBMIT BUTTON (Glassmorphism)
   Clean, consistent footer and button styling for the onboarding modal
   ======================================== */

.onboarding-modal-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(0, 245, 255, 0.06);
  background: linear-gradient(180deg, rgba(10,10,20,0.02), rgba(10,10,20,0.06));
  backdrop-filter: blur(6px);
}

.onboarding-submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 42px;
  min-width: 220px;
  max-width: 100%;
  justify-content: center;

  font-size: 1.05rem;
  font-weight: 800;
  color: #0a0a1e;
  letter-spacing: 0.2px;

  background: linear-gradient(135deg, #00f5ff, #0096ff);
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(0, 245, 255, 0.28);

  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.25s ease;
  overflow: hidden;
  background-size: 200% 200%;
  animation: gradient-shift 3.5s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.onboarding-submit-btn .btn-icon { color: rgba(10,10,30,0.85); }

.onboarding-submit-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 18px 45px rgba(0, 245, 255, 0.38);
}

.onboarding-submit-btn:active:not(:disabled) { transform: translateY(-1px) scale(1.02); }

.onboarding-submit-btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.7;
}

.onboarding-submit-btn.first-enable { animation: pulse-glow 0.9s ease; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 12px 35px rgba(0,245,255,0.32); }
  50% { box-shadow: 0 18px 55px rgba(0,245,255,0.44); }
}

/* small-screen adjustments are handled later in file */
@media (max-width: 768px) {
  .onboarding-modal-overlay {
    padding: 10px;
  }

  .onboarding-modal-header {
    padding: 30px 20px 15px;
  }

  .onboarding-title {
    font-size: 1.5rem;
  }

  .onboarding-subtitle {
    font-size: 0.9rem;
  }

  .onboarding-search-wrapper {
    max-width: 100%;
  }

  .onboarding-search-input {
    padding: 12px 45px 12px 45px;
    font-size: 0.9rem;
  }

  .onboarding-modal-body {
    padding: 15px 20px 100px;
  }

  .disciplinas-cloud {
    gap: 10px;
  }

  .interest-pill {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .pill-emoji {
    font-size: 1.2rem;
  }

  .pill-count {
    min-width: 28px;
    padding: 3px 6px;
    font-size: 0.7rem;
  }

  .onboarding-modal-footer {
    padding: 15px 20px;
  }

  .onboarding-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 40px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .onboarding-title {
    font-size: 1.3rem;
  }

  .onboarding-subtitle {
    font-size: 0.85rem;
  }

  .disciplinas-cloud {
/* ========================================
   ANIMAÇÕES PERSONALIZADAS
   ======================================== */

/* Animação de entrada suave */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação de shake para erro */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Efeito de ripple ao clicar */
.interest-pill::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.interest-pill:active::after {
  width: 200px;
  height: 200px;
  opacity: 0;
  transition: width 0s, height 0s, opacity 0.6s;
}   padding: 14px 30px;
    font-size: 0.95rem;
    gap: 8px;
  }
}   grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
  }

  .disciplina-card {
    padding: 20px 15px;
    min-height: 140px;
  }

  .card-icon {
    font-size: 2rem;
  }

  .card-title {
    font-size: 0.9rem;
  }

  .onboarding-modal-footer {
    padding: 15px 20px 20px;
  }

  .onboarding-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .disciplinas-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .disciplina-card {
    min-height: 120px;
    padding: 15px 10px;
  }

  .card-icon {
    font-size: 1.8rem;
  }

  .card-title {
    font-size: 0.85rem;
  }
}

/* ========================================
   ANIMAÇÕES PERSONALIZADAS
   ======================================== */

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 
      0 0 20px rgba(0, 245, 255, 0.3),
      0 0 40px rgba(0, 245, 255, 0.2) inset;
  }
  50% {
    box-shadow: 
      0 0 40px rgba(0, 245, 255, 0.5),
      0 0 60px rgba(0, 245, 255, 0.3) inset;
  }
}

.disciplina-card.selected {
  animation: glow-pulse 2s ease-in-out infinite;
}
