/* ============================================================================
   TABLE OF CONTENTS
   ============================================================================
   1. Global Styles & Reset
   2. Boot Loader
   3. Navigation
   4. Hero Section
   5. Features Section
   6. How It Works Section
   7. CTA Section
   8. Footer
   9. Auth Modal (Desktop)
   10. Auth Modal (Mobile/Tablet)
   11. Password Strength Components
   12. Responsive Breakpoints
   ============================================================================ */

/* ============================================================================
   1. GLOBAL STYLES & RESET
   ============================================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #0d0d1a;
  background-image:
    radial-gradient(ellipse at center, transparent 40%, rgba(8,8,18,0.7) 100%),
    linear-gradient(rgba(124,119,198,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,119,198,0.04) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
  background-attachment: fixed;
  color: white;
  overflow-x: hidden;
}

/* Safari iOS fallback — background-attachment:fixed is unsupported */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  }
}

::selection {
  background: rgba(124, 119, 198, 0.3);
  color: white;
}

/* ============================================================================
   2. BOOT LOADER
   ============================================================================ */
.boot-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
}

.boot-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.boot-logo i {
  font-size: 6em;
  color: #7c77c6;
  animation: bootPulse 1.5s ease-in-out infinite;
}

.boot-logo-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  animation: bootPulse 1.5s ease-in-out infinite;
}

@keyframes bootPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

#mainContent {
  animation: fadeInContent 0.8s ease;
}

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

/* ============================================================================
   3. NAVIGATION
   ============================================================================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(13, 13, 26, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 119, 198, 0.15);
  z-index: 1000;
  padding: 20px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Bruno Ace', sans-serif;
  font-size: 1.5em;
  font-weight: 700;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-favicon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-link:hover {
  color: #7c77c6;
  background: rgba(124, 119, 198, 0.1);
}

.btn-nav {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95em;
}

.btn-login {
  background: rgba(255, 255, 255, 0.1);
  color: #7c77c6;
  border: 2px solid rgba(124, 119, 198, 0.3);
}

.btn-login:hover {
  background: rgba(124, 119, 198, 0.2);
  border-color: #7c77c6;
}

.btn-signup {
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  color: white;
}

.btn-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(124, 119, 198, 0.4);
}

.user-welcome {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  padding: 8px 16px;
}

.btn-logout {
  background: rgba(231, 76, 60, 0.8) !important;
  border: 2px solid rgba(231, 76, 60, 0.3) !important;
}

.btn-logout:hover {
  background: rgba(231, 76, 60, 1) !important;
}

/* ============================================================================
   4. HERO SECTION
   ============================================================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* -- Hero badge -- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 119, 198, 0.12);
  border: 1px solid rgba(124, 119, 198, 0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.75em;
  color: #a8a4e3;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  width: fit-content;
  animation: heroFadeUp 0.6s ease both;
}

.hero-badge span {
  width: 6px;
  height: 6px;
  background: #7c77c6;
  border-radius: 50%;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* -- Hero text -- */
.hero-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-title {
  font-family: 'Orbitron', monospace;
  font-size: 3em;
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  animation: heroFadeUp 0.6s 0.1s ease both;
}

.hero-title-static {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.7em;
  margin-top: 4px;
}

.rotating-text-wrapper {
  display: block;
  position: relative;
  height: 1.2em;
  overflow: hidden;
  width: 100%;
}

.rotating-text {
  display: block;
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  background: linear-gradient(135deg, #a8a4e3, #7c77c6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.rotating-text.active {
  opacity: 1;
  transform: translateY(0);
}

.rotating-text.exit {
  opacity: 0;
  transform: translateY(-100%);
}

.hero-subtitle {
  font-size: 0.95em;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.55);
  max-width: 440px;
  animation: heroFadeUp 0.6s 0.2s ease both;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: heroFadeUp 0.6s 0.3s ease both;
}

.btn-hero {
  padding: 12px 28px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-hero.btn-primary {
  background: linear-gradient(135deg, #7c77c6, #a78bfa);
  color: white;
  box-shadow: 0 4px 20px rgba(124, 119, 198, 0.35);
}

.btn-hero.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 119, 198, 0.5);
}

.btn-hero.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
}

.btn-hero.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(124, 119, 198, 0.4);
  color: white;
}

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

/* -- 3D Brain container -- */
.brain-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 480px;
  animation: heroFadeUp 0.8s 0.2s ease both;
}

#brainRenderer {
  width: 100%;
  height: 100%;
  border-radius: 20px;
}

.brain-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,119,198,0.18) 0%, transparent 70%);
  pointer-events: none;
  animation: brainGlowPulse 3s ease-in-out infinite;
}

@keyframes brainGlowPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ============================================================================
   5. FEATURES SECTION
   ============================================================================ */
.features-section {
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.5em;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.7);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.feature-panel {
  background: rgba(26, 26, 62, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(124, 119, 198, 0.2);
  border-radius: 20px;
  padding: 40px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.feature-panel.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-panel:hover {
  border-color: rgba(124, 119, 198, 0.5);
  box-shadow: 0 15px 40px rgba(124, 119, 198, 0.2);
}

.panel-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(124, 119, 198, 0.2);
}

.panel-header i {
  font-size: 3em;
  color: #7c77c6;
  margin-bottom: 15px;
}

.panel-header h3 {
  font-size: 1.8em;
  margin-bottom: 10px;
}

.panel-badge {
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

.panel-badge.guest {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.feature-list {
  list-style: none;
  margin-bottom: 30px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 1.05em;
  color: rgba(255, 255, 255, 0.85);
}

.feature-list i {
  color: #7c77c6;
  font-size: 1.2em;
  margin-top: 2px;
  flex-shrink: 0;
}

.btn-panel {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 1.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  color: white;
  text-decoration: none;
}

.btn-panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(124, 119, 198, 0.4);
}

.btn-panel-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #7c77c6;
  color: #7c77c6;
}

.btn-panel-secondary:hover {
  background: rgba(124, 119, 198, 0.2);
}

/* ============================================================================
   6. HOW IT WORKS SECTION
   ============================================================================ */
.how-it-works {
  padding: 100px 40px;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.steps-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
}

.step-card {
  background: rgba(26, 26, 62, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(124, 119, 198, 0.2);
  border-radius: 16px;
  padding: 30px;
  width: 220px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  opacity: 0;
  transform: scale(0.9);
  display: flex;
  flex-direction: column;
}

.step-card.visible {
  opacity: 1;
  transform: scale(1);
}

.step-card:hover {
  border-color: rgba(124, 119, 198, 0.5);
  transform: scale(1.05);
}

.step-number {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2em;
}

.step-icon {
  font-size: 2.5em;
  color: #7c77c6;
  margin: 20px 0;
}

.step-card h3 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.step-card p {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.step-arrow {
  font-size: 2em;
  color: #7c77c6;
  align-self: center;
}

.step-card p {
  flex: 1;
}

/* ============================================================================
   7. CTA SECTION
   ============================================================================ */
.cta-section {
  padding: 100px 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 2.5em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-content p {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.btn-cta {
  padding: 18px 36px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-cta-primary {
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  color: white;
  box-shadow: 0 8px 16px rgba(124, 119, 198, 0.3);
}

.btn-cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(124, 119, 198, 0.4);
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   8. FOOTER
   ============================================================================ */
.main-footer {
  background: rgba(13, 13, 26, 0.95);
  border-top: 1px solid rgba(124, 119, 198, 0.15);
  padding: 60px 40px 30px;
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Bruno Ace', sans-serif;
  font-size: 1.5em;
  font-weight: 700;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand i {
  color: #7c77c6;
}

.footer-links {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #7c77c6;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  text-decoration: none;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #7c77c6;
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(124, 119, 198, 0.1);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9em;
}

/* ============================================================================
   9. AUTH MODAL (DESKTOP)
   ============================================================================ */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.auth-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(124, 119, 198, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.auth-modal.show .modal-content {
  transform: scale(1);
}

/* Custom scrollbar */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(124, 119, 198, 0.5);
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 119, 198, 0.7);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(231, 76, 60, 0.2);
  border: 2px solid rgba(231, 76, 60, 0.5);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
  opacity: 1;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(231, 76, 60, 0.8);
  border-color: #e74c3c;
  transform: scale(1.1);
}

.auth-form {
  animation: fadeIn 0.4s ease;
}

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

.auth-form h2 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #7c77c6;
  text-align: center;
}

.form-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 30px;
  font-size: 0.95em;
}

.form-field {
  margin-bottom: 20px;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #7c77c6;
  font-weight: 600;
  font-size: 0.95em;
}

.form-field input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid rgba(124, 119, 198, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 1em;
  transition: all 0.3s;
}

.form-field input:focus {
  outline: none;
  border-color: #7c77c6;
  background: rgba(0, 0, 0, 0.5);
}

/* Password Input with Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 6px;
  font-size: 1.1em;
}

.toggle-password:hover {
  color: #7c77c6;
  background: rgba(124, 119, 198, 0.1);
}

.toggle-password:active {
  transform: scale(0.95);
}

/* Form Footer (Forgot Password) */
.form-footer {
  margin: 15px 0;
  display: flex;
  justify-content: flex-end;
}

.forgot-password-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9em;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.forgot-password-btn:hover {
  color: #7c77c6;
  background: rgba(124, 119, 198, 0.1);
}

.forgot-password-btn i {
  font-size: 0.9em;
}

.auth-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7c77c6 0%, #a8a4e3 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

.auth-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(124, 119, 198, 0.4);
}

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

.form-switch {
  text-align: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
}

.form-switch a {
  color: #7c77c6;
  text-decoration: none;
  font-weight: 600;
}

.form-switch a:hover {
  text-decoration: underline;
}

/* Auth Notifications */
.auth-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(26, 26, 62, 0.95);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  border: 1px solid rgba(124, 119, 198, 0.3);
}

.auth-notification.show {
  transform: translateX(0);
}

.auth-notification.success {
  border-color: #27ae60;
}

.auth-notification.success i {
  color: #27ae60;
}

.auth-notification.error {
  border-color: #e74c3c;
}

.auth-notification.error i {
  color: #e74c3c;
}

.auth-notification.info {
  border-color: #3498db;
}

.auth-notification.info i {
  color: #3498db;
}

/* ============================================================================
   10. PASSWORD STRENGTH COMPONENTS
   ============================================================================ */
.password-strength-container {
  margin-top: 10px;
  margin-bottom: 15px;
}

.password-strength-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.password-strength-meter {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.password-strength-meter.weak {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  width: 33%;
}

.password-strength-meter.medium {
  background: linear-gradient(90deg, #f39c12, #e67e22);
  width: 66%;
}

.password-strength-meter.strong {
  background: linear-gradient(90deg, #27ae60, #229954);
  width: 100%;
}

.password-strength-text {
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.password-strength-text.weak {
  color: #e74c3c;
}

.password-strength-text.medium {
  color: #f39c12;
}

.password-strength-text.strong {
  color: #27ae60;
}

/* Password Requirements Checklist */
.password-requirements {
  margin-top: 15px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(124, 119, 198, 0.2);
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.requirement-item:last-child {
  margin-bottom: 0;
}

.requirement-item span:first-child {
  font-size: 1.1em;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.req-not-met {
  color: #e74c3c;
}

.req-met {
  color: #27ae60;
  animation: checkPop 0.3s ease;
}

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

/* ============================================================================
   11. RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Tablet & Large Mobile (1024px and below) */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-title {
    font-size: 2.4em;
  }

  .brain-container {
    height: 350px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-container {
    flex-direction: column;
  }

  .step-arrow {
    transform: rotate(90deg);
  }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
  }

  .nav-brand {
    font-size: 1.2em;
    flex: 1;
  }

  .nav-actions {
    gap: 8px;
    width: 100%;
    justify-content: center;
  }

  .nav-link {
    display: none;
  }

  .btn-nav {
    padding: 8px 16px;
    font-size: 0.85em;
    flex: 1;
    justify-content: center;
  }

  .hero-section {
    padding: 140px 20px 40px;
  }

  .hero-title {
    font-size: 2em;
  }

  .hero-subtitle {
    font-size: 0.9em;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
  }

  .brain-container {
    height: 280px;
  }

  .brain-glow {
    width: 200px;
    height: 200px;
  }

  .features-section,
  .how-it-works,
  .cta-section {
    padding: 60px 20px;
  }

  .section-header h2 {
    font-size: 2em;
  }

  .feature-panel {
    padding: 30px 25px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-cta {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  /* MOBILE MODAL LAYOUT */
  .auth-modal {
    align-items: flex-end;
  }

  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 20px 20px 0 0;
    padding: 25px 20px 30px;
    transform: translateY(100%);
  }

  .auth-modal.show .modal-content {
    transform: translateY(0);
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.3em;
  }

  .auth-form h2 {
    font-size: 1.7em;
    margin-top: 5px;
  }

  .form-subtitle {
    font-size: 0.9em;
    margin-bottom: 25px;
  }

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

  .form-field label {
    font-size: 0.9em;
    margin-bottom: 6px;
  }

  .form-field input {
    padding: 11px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .password-requirements {
    padding: 12px;
    margin-top: 12px;
  }

  .requirement-item {
    font-size: 0.85em;
    margin-bottom: 6px;
  }

  .auth-btn {
    padding: 13px;
    font-size: 0.95em;
  }

  .form-switch {
    font-size: 0.85em;
    margin-top: 18px;
  }

  .forgot-password-btn {
    font-size: 0.85em;
    padding: 6px 10px;
  }

  .toggle-password {
    font-size: 1em;
  }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6em;
  }

  .brain-container {
    height: 220px;
  }

  .section-header h2 {
    font-size: 1.6em;
  }

  .panel-header h3 {
    font-size: 1.4em;
  }

  .step-card {
    width: 100%;
  }

  .step-arrow {
    display: none;
  }

  /* MOBILE MODAL - EXTRA COMPACT */
  .modal-content {
    padding: 20px 18px 25px;
    max-height: 85vh;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 1.2em;
  }

  .auth-form h2 {
    font-size: 1.5em;
    margin-bottom: 8px;
  }

  .form-subtitle {
    font-size: 0.85em;
    margin-bottom: 20px;
  }

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

  .form-field label {
    font-size: 0.85em;
  }

  .form-field input {
    padding: 10px 12px;
    font-size: 16px;
  }

  .password-input-wrapper input {
    padding-right: 45px;
  }

  .toggle-password {
    right: 10px;
    font-size: 0.95em;
    padding: 6px;
  }

  .password-strength-container {
    margin-top: 8px;
    margin-bottom: 12px;
  }

  .password-strength-bar {
    height: 5px;
  }

  .password-strength-text {
    font-size: 0.8em;
  }

  .password-requirements {
    padding: 10px;
    margin-top: 10px;
  }

  .requirement-item {
    font-size: 0.8em;
    margin-bottom: 5px;
    gap: 8px;
  }

  .requirement-item span:first-child {
    font-size: 1em;
    min-width: 18px;
  }

  .auth-btn {
    padding: 12px;
    font-size: 0.9em;
  }

  .form-footer {
    margin: 12px 0;
  }

  .forgot-password-btn {
    font-size: 0.8em;
    padding: 5px 8px;
  }

  .form-switch {
    font-size: 0.8em;
    margin-top: 15px;
  }

  /* Mobile notification adjustments */
  .auth-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    padding: 12px 16px;
    font-size: 0.9em;
  }
}

/* ============================================================================
   OTP MODAL STYLES
   ============================================================================ */

.otp-input-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 30px 0;
}

.otp-digit {
  width: 50px !important;
  height: 60px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid rgba(124, 119, 198, 0.3) !important;
  background: rgba(0, 0, 0, 0.3);
  color: #7c77c6;
  transition: all 0.3s;
}

.otp-digit:focus {
  border-color: #7c77c6 !important;
  background: rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
  outline: none;
}

.otp-footer {
  margin-top: 20px;
  text-align: center;
}

.otp-timer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9em;
  margin-bottom: 15px;
}

.otp-timer span {
  color: #7c77c6;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.resend-code-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(124, 119, 198, 0.3);
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: not-allowed;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
}

.resend-code-btn:not(:disabled) {
  cursor: pointer;
  color: #7c77c6;
  border-color: #7c77c6;
}

.resend-code-btn:not(:disabled):hover {
  background: rgba(124, 119, 198, 0.2);
}

/* Mobile OTP */
@media (max-width: 768px) {
  .otp-digit {
    width: 45px !important;
    height: 55px;
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .otp-input-container {
    gap: 6px;
  }
  
  .otp-digit {
    width: 40px !important;
    height: 50px;
    font-size: 20px;
  }
}

/* ============================================================================
   PAGE TRANSITION OVERLAY (login / signup / logout)
   ============================================================================ */

.ml-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 25, 0.97);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ml-transition-overlay.visible {
  opacity: 1;
}

.ml-transition-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ml-transition-logo {
  width: 56px;
  height: 56px;
  animation: mlTransitionPulse 1.2s ease-in-out infinite;
}

.ml-transition-message {
  font-family: 'Bruno Ace', 'Orbitron', monospace;
  font-size: 1.1em;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
}

.ml-transition-bar-track {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.ml-transition-bar {
  height: 100%;
  background: linear-gradient(90deg, #7c77c6, #a78bfa);
  border-radius: 2px;
  animation: mlTransitionBar 1.2s ease-in-out infinite;
}

@keyframes mlTransitionPulse {
  0%, 100% { transform: scale(1);    opacity: 1;   }
  50%       { transform: scale(1.1); opacity: 0.7; }
}

@keyframes mlTransitionBar {
  0%   { width: 0;    margin-left: 0;    }
  50%  { width: 100%; margin-left: 0;    }
  100% { width: 0;    margin-left: 100%; }
}

/* Light mode */
body.light-mode .ml-transition-overlay {
  background: rgba(240, 240, 248, 0.97);
}

body.light-mode .ml-transition-message {
  color: #1a1a2e;
}

body.light-mode .ml-transition-bar-track {
  background: rgba(26, 26, 46, 0.1);
}