/* Aurame Cosmic Pro - Main Styles */

/* Import additional stylesheets */
@import url('neon-borders.css');
@import url('meter.css');
@import url('responsive.css');
@import url('poc-enhanced.css');

/* CSS Variables */
:root {
  --primary-gradient: linear-gradient(90deg, #ff60f6, #a86bff);
  --neon-pink: #ff60f6;
  --neon-purple: #a86bff;
  --neon-cyan: #66e6ff;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --cosmic-dark: #0a0c2a;
  --cosmic-purple: #1a0f2e;
  --cosmic-magenta: #210b2f;
  --cosmic-deep: #050818;
  --text-primary: #ffffff;
  --text-muted: #d9d9f2;
  --success-color: #00ff00;
  --warning-color: #ff8800;
  --danger-color: #ff0000;
  --star-glow: rgba(255, 255, 255, 0.8);
  --planet-glow: rgba(168, 107, 255, 0.4);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cosmic-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Exo 2', 'Orbitron', 'Poppins', sans-serif;
  font-weight: 800;
  line-height: 1.2;
}

.aurame-logo, .gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Enhanced Cosmic Background */
.cosmic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -10;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 40%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, var(--cosmic-deep) 0%, var(--cosmic-dark) 25%, var(--cosmic-purple) 50%, var(--cosmic-magenta) 75%, var(--cosmic-deep) 100%);
  animation: cosmicShift 45s ease-in-out infinite;
}

@keyframes cosmicShift {
  0%, 100% { 
    filter: hue-rotate(0deg) brightness(1);
    transform: scale(1);
  }
  25% { 
    filter: hue-rotate(15deg) brightness(1.1);
    transform: scale(1.02);
  }
  50% { 
    filter: hue-rotate(30deg) brightness(0.9);
    transform: scale(1.01);
  }
  75% { 
    filter: hue-rotate(45deg) brightness(1.05);
    transform: scale(1.03);
  }
}

/* Enhanced Stars Canvas */
#aur-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -8;
  opacity: 0.95;
  pointer-events: none;
  filter: drop-shadow(0 0 2px var(--star-glow));
}

/* Enhanced Planets */
.planets {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -6;
  pointer-events: none;
}

.planet {
  position: absolute;
  opacity: 0.75;
  will-change: transform;
  transition: all 0.4s ease;
  filter: drop-shadow(0 0 15px var(--planet-glow)) brightness(1.1);
}

.planet:hover {
  opacity: 0.9;
  filter: drop-shadow(0 0 25px var(--planet-glow)) brightness(1.3);
  transform: scale(1.05);
}

.planet.earth {
  width: 40vw;
  max-width: 420px;
  left: 5%;
  top: 35%;
  filter: drop-shadow(0 0 20px rgba(100, 200, 255, 0.4)) brightness(1.1);
}

.planet.moon {
  width: 20vw;
  max-width: 180px;
  left: 58%;
  top: 18%;
  filter: drop-shadow(0 0 15px rgba(200, 200, 255, 0.3)) brightness(1.2);
}

.planet.venus {
  width: 16vw;
  max-width: 160px;
  right: 6%;
  bottom: 22%;
  filter: drop-shadow(0 0 18px rgba(255, 200, 100, 0.4)) brightness(1.15);
}

.planet.asteroid {
  width: 12vw;
  max-width: 120px;
  left: 68%;
  bottom: 10%;
  filter: drop-shadow(0 0 12px rgba(150, 150, 200, 0.3)) brightness(1.1);
}

/* Glass Cards - Mobile First Design */
.card, .glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Card Content Alignment */
.card h2, .card h3, .card h4 {
  line-height: 1.3;
  margin-bottom: 12px;
  text-align: left;
}

.card p {
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: justify;
  color: var(--text-muted);
}

.card ul, .card ol {
  line-height: 1.6;
  margin-bottom: 16px;
  padding-left: 20px;
}

.card li {
  margin-bottom: 8px;
  text-align: left;
}

/* Card Footer */
.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Card Improvements */
@media (max-width: 768px) {
  .card, .glass {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 16px;
  }
  
  .card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  .card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
  }
  
  .card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .card, .glass {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 14px;
  }
  
  .card h2 {
    font-size: 1.3rem;
  }
  
  .card h3 {
    font-size: 1.1rem;
  }
  
  .card p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

/* Neon Border Animation */
.neon {
  position: relative;
}

.neon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(270deg, #ff00ff, #00ffff, #ffcc00, #ff00ff);
  background-size: 600% 600%;
  animation: neonflow 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

@keyframes neonflow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 16px;
  position: relative;
  z-index: 10;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #000;
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--glass-border);
  color: var(--text-primary);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 96, 246, 0.3);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  z-index: 5;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 96px);
  margin-bottom: 16px;
  margin-top: 14vh;
}

.hero .tag {
  font-family: 'Exo 2', 'Orbitron', 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 4vw, 32px);
  color: var(--text-muted);
  margin-bottom: 32px;
  opacity: 0.9;
  line-height: 1.2;
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Content Sections */
.content {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  margin: 80px 0;
}

.section h2 {
  text-align: center;
  font-size: clamp(28px, 5vw, 48px);
  margin-bottom: 40px;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* POC Grid */
.poc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.poc-card {
  text-align: center;
  padding: 20px;
}

.poc-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--neon-purple);
}

.poc-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.poc-accuracy {
  font-size: 14px;
  margin-bottom: 16px;
}

/* Accuracy Meter */
.meter {
  height: 16px;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.meter-fill {
  height: 100%;
  text-align: right;
  line-height: 16px;
  transition: width 0.6s ease-in-out;
  font-size: 12px;
  padding-right: 4px;
  color: #000;
  font-weight: 600;
}

.meter-fill.green { background: var(--success-color); }
.meter-fill.orange { background: var(--warning-color); }
.meter-fill.red { background: var(--danger-color); }

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 16px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--neon-purple);
  box-shadow: 0 0 10px rgba(168, 107, 255, 0.3);
}

/* Preloader */
#cosmic-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#cosmic-preloader.active {
  display: flex;
}

.orb {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--neon-pink), #000);
  animation: pulse 2s infinite ease-in-out;
}

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

/* Floating Action Button */
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #000;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(255, 96, 246, 0.4);
  transition: all 0.3s ease;
}

.fab:hover {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .cta-row {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .planet.earth {
    width: 60vw;
    max-width: 300px;
  }
  
  .planet.moon {
    width: 30vw;
    max-width: 120px;
  }
  
  .planet.venus {
    width: 25vw;
    max-width: 100px;
  }
  
  .planet.asteroid {
    width: 20vw;
    max-width: 80px;
  }
  
  .modal-content {
    margin: 10px;
    padding: 20px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .planet {
    transform: none !important;
  }
}

/* Planet Visibility Enhancement */
.planet img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Fallback CSS planets when images fail to load */
.planet.fallback-planet::before,
.planet:not(:has(img))::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset -20% -20% 40% rgba(0,0,0,0.3);
}

/* Earth - Blue planet fallback */
.planet.earth.fallback-planet::before,
.planet.earth:not(:has(img))::before {
  background: radial-gradient(circle at 30% 30%, #4a90e2, #2c5aa0, #1e3a8a);
  box-shadow: 
    inset -20px -20px 40px rgba(0,0,0,0.3),
    0 0 20px rgba(74, 144, 226, 0.4);
}

/* Moon - Silver/gray fallback */
.planet.moon.fallback-planet::before,
.planet.moon:not(:has(img))::before {
  background: radial-gradient(circle at 30% 30%, #e5e5e5, #c0c0c0, #a0a0a0);
  box-shadow: 
    inset -10px -10px 20px rgba(0,0,0,0.2),
    0 0 15px rgba(200, 200, 255, 0.3);
}

/* Venus - Golden/orange fallback */
.planet.venus.fallback-planet::before,
.planet.venus:not(:has(img))::before {
  background: radial-gradient(circle at 30% 30%, #ffc649, #ff9500, #cc7700);
  box-shadow: 
    inset -15px -15px 30px rgba(0,0,0,0.2),
    0 0 18px rgba(255, 200, 100, 0.4);
}

/* Asteroid - Brown/gray fallback */
.planet.asteroid.fallback-planet::before,
.planet.asteroid:not(:has(img))::before {
  background: radial-gradient(circle at 30% 30%, #8b7355, #6b5b47, #4a3f35);
  box-shadow: 
    inset -8px -8px 16px rgba(0,0,0,0.3),
    0 0 12px rgba(150, 150, 200, 0.3);
}

/* Enhanced planet hover effects */
.planet:hover {
  opacity: 0.9;
  filter: drop-shadow(0 0 25px var(--planet-glow)) brightness(1.3);
  transform: scale(1.05);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.visible { display: block; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* New Utility Classes for Enhanced Theme */
.glow-text {
  text-shadow: 0 0 10px currentColor;
}

.cosmic-shadow {
  box-shadow: 0 0 20px rgba(168, 107, 255, 0.3);
}

.parallax-slow {
  transform: translateZ(0);
  will-change: transform;
}

/* COSMIC BACKGROUND RESTORED WITH PROPER LAYERING */
/* Beautiful cosmic background as the foundation */
html {
    background: linear-gradient(135deg, 
        var(--cosmic-dark) 0%, 
        var(--cosmic-purple) 25%, 
        var(--cosmic-magenta) 50%, 
        var(--cosmic-deep) 75%, 
        var(--cosmic-dark) 100%);
    background-size: 600% 600%;
    animation: cosmicShift 120s ease-in-out infinite;
    min-height: 100vh;
}

body {
    background: transparent;
    min-height: 100vh;
}

/* Cosmic background with subtle color changes */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -200;
    background: radial-gradient(ellipse at center, 
        rgba(168, 107, 255, 0.1) 0%, 
        rgba(255, 96, 246, 0.05) 30%, 
        transparent 70%);
    animation: nebulaPulse 180s ease-in-out infinite;
}

@keyframes cosmicShift {
    0%, 100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg) brightness(1);
    }
    25% { 
        background-position: 100% 50%;
        filter: hue-rotate(10deg) brightness(1.02);
    }
    50% { 
        background-position: 100% 100%;
        filter: hue-rotate(20deg) brightness(0.98);
    }
    75% { 
        background-position: 0% 100%;
        filter: hue-rotate(30deg) brightness(1.02);
    }
}

@keyframes nebulaPulse {
    0%, 100% { opacity: 0.3; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.5; transform: scale(1.1) rotate(180deg); }
}

/* Make stars clearly visible */
#aur-stars {
    z-index: -5 !important;
    opacity: 1 !important;
    filter: brightness(1.5) contrast(1.2) !important;
}

/* Make existing planets (real GIF media) visible and properly positioned */
.planets {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -3 !important;
    pointer-events: none !important;
}

.planet {
    position: absolute !important;
    z-index: -3 !important;
    opacity: 1 !important;
    pointer-events: none !important;
    transition: transform 0.3s ease !important;
}

/* Individual planet positioning and animations */
.planet.earth {
    left: 8% !important;
    top: 30% !important;
    width: 200px !important;
    height: 200px !important;
    animation: earthDrift 25s ease-in-out infinite !important;
}

.planet.moon {
    left: 70% !important;
    top: 15% !important;
    width: 120px !important;
    height: 120px !important;
    animation: moonDrift 20s ease-in-out infinite !important;
}

.planet.venus {
    right: 10% !important;
    bottom: 25% !important;
    width: 100px !important;
    height: 100px !important;
    animation: venusDrift 22s ease-in-out infinite !important;
}

.planet.asteroid {
    left: 75% !important;
    bottom: 15% !important;
    width: 80px !important;
    height: 80px !important;
    animation: asteroidDrift 18s ease-in-out infinite !important;
}

/* Planet GIF/image styling */
.planet img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)) !important;
}

/* Planet drift animations */
@keyframes earthDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -20px) rotate(90deg); }
    50% { transform: translate(-20px, 25px) rotate(180deg); }
    75% { transform: translate(15px, -30px) rotate(270deg); }
}

@keyframes moonDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 30px); }
}

@keyframes venusDrift {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(25px, -35px); }
    66% { transform: translate(-30px, 20px); }
}

@keyframes asteroidDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(40px, -25px) rotate(180deg); }
}

/* HIDE ALL PLANETS BY DEFAULT */
.planet {
    display: none !important;
    visibility: hidden !important;
    background: none !important;
    background-image: none !important;
}

/* SHOW ONLY PLANETS THAT HAVE LOADED IMAGES */
.planet img {
    display: block !important;
}

.planet:has(img) {
    display: block !important;
    visibility: visible !important;
}

/* Alternative method for browsers without :has() support */
.planet.earth:has(img),
.planet.moon:has(img),
.planet.venus:has(img),
.planet.asteroid:has(img) {
    display: block !important;
    visibility: visible !important;
}

/* Force hide planets without images using specific selectors */
.planet.venus:not(:has(img)),
.planet.asteroid:not(:has(img)) {
    display: none !important;
    visibility: hidden !important;
}

/* Remove all CSS backgrounds from cosmic-planet classes */
.cosmic-planet-earth,
.cosmic-planet-moon,
.cosmic-planet-venus,
.cosmic-planet-asteroid {
    background: none !important;
    background-image: none !important;
}

/* REMOVE CSS-GENERATED PSEUDO-PLANETS */
body::before {
    /* This will be overridden by the nebula effects below */
}

/* SUBTLE COLOR-CHANGING COSMIC BACKGROUND - BEHIND EVERYTHING */
html {
    background: linear-gradient(135deg, 
        #0a0c2a 0%, 
        #1a0f2e 25%, 
        #2d1b69 50%, 
        #1a0f2e 75%, 
        #0a0c2a 100%) !important;
    background-size: 600% 600% !important;
    animation: subtleCosmicShift 120s ease-in-out infinite !important;
    z-index: -200 !important;
}

/* Add very subtle nebula effects behind everything */
html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -150 !important; /* Behind stars and planets */
    pointer-events: none;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(120, 119, 198, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 119, 198, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 40% 40%, rgba(120, 119, 198, 0.05) 0%, transparent 60%);
    animation: subtleNebulaShift 180s ease-in-out infinite;
    opacity: 0.4;
}

/* Remove the body::after layer */
body::after {
    display: none !important;
}

/* Subtle, slow color-changing cosmic background animation */
@keyframes subtleCosmicShift {
    0% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg) brightness(1) saturate(0.8);
    }
    20% { 
        background-position: 25% 25%;
        filter: hue-rotate(8deg) brightness(1.02) saturate(0.85);
    }
    40% { 
        background-position: 75% 75%;
        filter: hue-rotate(15deg) brightness(0.98) saturate(0.9);
    }
    60% { 
        background-position: 100% 25%;
        filter: hue-rotate(22deg) brightness(1.01) saturate(0.85);
    }
    80% { 
        background-position: 50% 100%;
        filter: hue-rotate(30deg) brightness(0.99) saturate(0.8);
    }
    100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg) brightness(1) saturate(0.8);
    }
}

/* Very subtle nebula shifting animation */
@keyframes subtleNebulaShift {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(1) rotate(0deg);
    }
    25% { 
        opacity: 0.5;
        transform: scale(1.02) rotate(45deg);
    }
    50% { 
        opacity: 0.3;
        transform: scale(0.98) rotate(90deg);
    }
    75% { 
        opacity: 0.45;
        transform: scale(1.01) rotate(135deg);
    }
}

/* Planet animations */
@keyframes cosmicDrift {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        filter: hue-rotate(0deg) brightness(1);
    }
    25% { 
        transform: translate(20px, -15px) scale(1.02);
        filter: hue-rotate(10deg) brightness(1.1);
    }
    50% { 
        transform: translate(-15px, 20px) scale(0.98);
        filter: hue-rotate(20deg) brightness(0.9);
    }
    75% { 
        transform: translate(10px, -25px) scale(1.01);
        filter: hue-rotate(30deg) brightness(1.05);
    }
}

@keyframes cosmicGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* Mobile responsiveness for planets */
@media (max-width: 768px) {
    body::before {
        background-image: 
            radial-gradient(circle 100px at 15% 40%, 
                rgba(74, 144, 226, 0.8) 0%, 
                rgba(44, 90, 160, 0.7) 40%, 
                rgba(30, 58, 138, 0.5) 70%, 
                transparent 100%),
            radial-gradient(circle 50px at 75% 20%, 
                rgba(229, 229, 229, 0.7) 0%, 
                rgba(192, 192, 192, 0.6) 40%, 
                rgba(160, 160, 160, 0.4) 70%, 
                transparent 100%),
            radial-gradient(circle 40px at 85% 75%, 
                rgba(255, 198, 73, 0.7) 0%, 
                rgba(255, 149, 0, 0.6) 40%, 
                rgba(204, 119, 0, 0.4) 70%, 
                transparent 100%),
            radial-gradient(circle 30px at 25% 80%, 
                rgba(139, 115, 85, 0.6) 0%, 
                rgba(107, 91, 71, 0.5) 40%, 
                rgba(74, 63, 53, 0.3) 70%, 
                transparent 100%);
    }
}

/* Enhanced Form Styles for EOI */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-select option {
  background: var(--cosmic-dark);
  color: var(--text-primary);
}

/* Enhanced Modal for EOI */
#eoi-modal .modal-content {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(10, 12, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 96, 246, 0.3);
}

#eoi-modal h2 {
  text-align: center;
  margin-bottom: 30px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Success Message Styling */
#eoi-success {
  text-align: center;
  padding: 20px;
}

#eoi-success h3 {
  color: var(--success-color);
  margin-bottom: 15px;
}

#eoi-success .cta-row {
  margin-top: 20px;
  gap: 15px;
}

/* Mobile Responsive Form */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .modal-content {
    padding: 20px 15px;
    margin: 10px;
  }
  
  #eoi-modal .modal-content {
    max-width: 95vw;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 14px 16px;
  }
  
  .form-label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .btn {
    padding: 14px 24px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 10px;
  }
  
  .modal-content {
    padding: 15px 10px;
    border-radius: 15px;
  }
  
  #eoi-modal h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .form-row {
    gap: 10px;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
}

/* Form Validation Styles */
.form-input:invalid,
.form-select:invalid {
  border-color: var(--danger-color);
}

.form-input:valid,
.form-select:valid {
  border-color: var(--success-color);
}

/* Loading State for Form */
.form-loading {
  opacity: 0.7;
  pointer-events: none;
}

.form-loading .btn {
  position: relative;
}

.form-loading .btn::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Enhanced Glass Effect for Forms */
.form-input,
.form-select,
.form-textarea {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon-purple);
  box-shadow: 
    0 0 20px rgba(168, 107, 255, 0.3),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Form Error Styles */
.form-error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    animation: slideInDown 0.3s ease-out;
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    line-height: 1.4;
}

.error-message strong {
    font-weight: 600;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Field Validation States */
.form-input.invalid,
.form-select.invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.form-input:valid:not(:placeholder-shown),
.form-select:valid {
    border-color: var(--success-color);
}

/* Success Message Animation */
#eoi-success {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Enhanced CTA Button Styles */
#eoi-success .cta-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

#eoi-success .btn {
    min-width: 140px;
    transition: all 0.3s ease;
}

#eoi-success .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 96, 246, 0.4);
}

#eoi-whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    color: white;
}

#eoi-whatsapp-btn:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Mobile Responsive Success Message */
@media (max-width: 768px) {
    #eoi-success .cta-row {
        flex-direction: column;
        align-items: center;
    }
    
    #eoi-success .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Self Prediction Modal Scrollability */
#self-prediction-modal .modal-content {
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile optimizations for all modals */
@media (max-height: 600px) {
  .modal-content {
    max-height: 95vh;
    padding: 20px;
  }
  
  #eoi-modal .modal-content,
  #self-prediction-modal .modal-content {
    max-height: 95vh;
    padding: 15px;
  }
}

/* Enhanced Modal Scrollability */
.modal-content {
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #FF60F6 rgba(255, 255, 255, 0.1);
}

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

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #FF60F6, #8B5CF6);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #8B5CF6, #FF60F6);
}

/* EOI Modal Scrollability */
#eoi-modal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Self Prediction Modal Scrollability */
#self-prediction-modal .modal-content {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Modal Optimization */
@media (max-height: 600px) {
    .modal-content {
        max-height: 95vh;
        padding: 20px;
    }
    
    #eoi-modal .modal-content,
    #self-prediction-modal .modal-content {
        max-height: 95vh;
        padding: 15px;
    }
}

/* Improved Chat Container Spacing */
.chat-container {
    height: 60vh !important;
    justify-content: space-between !important;
}

.chat-messages {
    flex: 0 1 auto !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
    gap: 0.5rem !important;
    -webkit-overflow-scrolling: touch !important;
}

.chat-input-area {
    flex-shrink: 0 !important;
    gap: 0.6rem !important;
    margin-top: auto !important;
}

/* Input and Button Spacing Improvements */
.chat-input-area input[type="text"],
.chat-input-area input[type="date"],
.chat-input-area input[type="time"],
.chat-input-area select {
    margin: 0.5rem 0 !important;
}

.chat-input-area button {
    margin: 0.5rem 0 !important;
}

/* Self Prediction Modal Dark Background */
#self-prediction-modal .modal-content {
  background: rgba(10, 12, 42, 0.95) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 96, 246, 0.3);
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#self-prediction-modal .form-input,
#self-prediction-modal .form-select,
#self-prediction-modal .form-textarea {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 96, 246, 0.3);
  color: white;
}

#self-prediction-modal .form-input::placeholder,
#self-prediction-modal .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Enhanced EOI Form Field Visibility */
#eoi-modal .form-input,
#eoi-modal .form-select,
#eoi-modal .form-textarea {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 96, 246, 0.3);
  color: white;
}

#eoi-modal .form-input::placeholder,
#eoi-modal .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#eoi-modal .form-label,
#self-prediction-modal .form-label {
  color: white;
  font-weight: 500;
}

/* Conversational Form Improvements */
.chat-container {
  height: 60vh !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding-top: 40px !important; /* 40 character space above */
}

.chat-messages {
  flex: 1 !important;
  overflow-y: auto !important;
  max-height: calc(60vh - 200px) !important;
  margin-bottom: 20px !important;
  padding: 20px 0 !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
  scrollbar-color: #FF60F6 rgba(255, 255, 255, 0.1);
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #FF60F6, #8B5CF6);
  border-radius: 3px;
}

.chat-input-area {
  flex-shrink: 0 !important;
  margin-top: auto !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  border-radius: 0 0 20px 20px;
  padding: 20px;
}

.chat-input-area input,
.chat-input-area select,
.chat-input-area button {
  margin: 8px 0 !important;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 96, 246, 0.3);
  color: white;
}

.chat-input-area input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile Conversational Form */
@media (max-width: 768px) {
  .chat-container {
    height: 70vh !important;
    padding-top: 30px !important;
  }
  
  .chat-messages {
    max-height: calc(70vh - 180px) !important;
  }
  
  .chat-input-area {
    padding: 15px;
  }
}

@media (max-height: 600px) {
  .chat-container {
    height: 80vh !important;
    padding-top: 20px !important;
  }
  
  .chat-messages {
    max-height: calc(80vh - 160px) !important;
  }
}
