/* 
  LataXR Academy - Premium EdTech Theme & Motion Architecture
  Motion-First Continuous Interactive System
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-main: #090B16;
  --bg-secondary: #121827;
  --bg-section: #151C2F;
  
  --accent-primary: #00D4FF;
  --accent-secondary: #FF2E88;
  
  --text-primary: #FFFFFF;
  --text-secondary: #A6B0CF;
  
  /* Borders and Shadows */
  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-glass: 0 16px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(0, 212, 255, 0.25);
  --shadow-glow-pink: 0 0 25px rgba(255, 46, 136, 0.25);
  
  /* Continuous Flowing Gradient */
  --gradient-btn: linear-gradient(90deg, #FF2E88, #00D4FF, #FF2E88);
  --gradient-size: 200% 100%;
}

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

html {
  scroll-behavior: smooth;
}

/* Continuous Ambient Mesh Background Animation */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #090B16 0%, #151C2F 50%, #090B16 100%);
  background-size: 400% 400%;
  animation: ambientMesh 18s ease infinite;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

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

/* Continuous Floating Animations for Badges and Decorative Elements */
.floating-element, .hero-glow-card {
  animation: continuousFloat 5s ease-in-out infinite alternate;
}

@keyframes continuousFloat {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(1.5deg); }
  100% { transform: translate3d(0, 4px, 0) rotate(-1deg); }
}

.pulse-glow {
  animation: pulseGlowAnim 3s ease-in-out infinite alternate;
}

@keyframes pulseGlowAnim {
  0% { opacity: 0.15; filter: blur(140px); }
  100% { opacity: 0.28; filter: blur(180px); }
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 12px var(--accent-primary);
}

/* Scroll-to-Top Floating Ring Button (Side-by-side with Chatbot) */
#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 100px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(18, 24, 39, 0.75);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 20px, 0);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: var(--shadow-glass);
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

#scroll-to-top:hover {
  transform: translate3d(0, -5px, 0) scale(1.08);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

#scroll-to-top svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

#scroll-to-top circle {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 3;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  transition: stroke-dashoffset 0.1s ease-out;
}

/* Preloader Overlay */
#preloader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-main);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  width: 100px;
  animation: preloaderPulse 1.8s infinite ease-in-out;
}

.preloader-bar {
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 25px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.preloader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  animation: preloaderFill 1.5s ease forwards;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.2)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 25px rgba(255, 46, 136, 0.5)); }
}

@keyframes preloaderFill {
  to { left: 0%; }
}

/* Continuous Flowing Buttons */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-btn);
  background-size: var(--gradient-size);
  animation: gradientFlow 4s ease infinite;
  color: #fff !important;
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  will-change: transform;
}

.btn-premium:hover {
  transform: translate3d(0, -3px, 0) scale(1.02);
  box-shadow: var(--shadow-glow);
}

.btn-outline-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary) !important;
  padding: 12px 30px;
  border-radius: 10px;
  font-weight: 500;
  border: 1px solid rgba(0, 212, 255, 0.4);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.btn-outline-premium:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translate3d(0, -3px, 0) scale(1.02);
}

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

/* Button Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Glass Cards with Subtle 5° Max Tilt & Reflection Sweep */
.glass-card {
  background: rgba(21, 28, 47, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
  height: 100%;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 55%
  );
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.glass-card:hover::before {
  transform: rotate(30deg) translateY(100%);
}

.glass-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: var(--shadow-glow);
}

.glass-card.no-tilt::before,
.glass-card.no-tilt:hover::before {
  display: none;
}

.glass-card.no-tilt,
.glass-card.no-tilt:hover {
  transform: none;
  box-shadow: var(--shadow-glass);
}

/* Card Image Zoom + Saturation Shift */
.glass-card img {
  border-radius: 12px;
  transition: transform 0.5s ease, filter 0.5s ease;
  will-change: transform, filter;
}

.glass-card:hover img {
  transform: scale(1.04) rotate(0.5deg);
  filter: brightness(1.08) saturate(1.1);
}

/* Micro-interactions: Icon Rotations */
i, .card-icon {
  transition: transform 0.3s ease;
}

.glass-card:hover i, .btn-premium:hover i {
  transform: rotate(5deg) scale(1.1);
}

/* Navbar Advanced Blur & Bright Link Colors */
.navbar-premium {
  background: rgba(9, 11, 22, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 16px 0;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.navbar-premium.scrolled {
  padding: 10px 0;
  background: rgba(9, 11, 22, 0.95) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.navbar-premium .nav-link,
.nav-link {
  color: #A6B0CF !important;
  font-weight: 500 !important;
  margin: 0 10px;
  transition: color 0.3s ease !important;
  position: relative;
}

.navbar-premium .nav-link:hover, 
.navbar-premium .nav-link.active,
.nav-link:hover,
.nav-link.active {
  color: #00D4FF !important;
}

.navbar-brand img {
  transition: transform 0.4s ease;
}

.navbar-premium.scrolled .navbar-brand img {
  transform: scale(0.88);
}

/* OVERRIDE AUTOFILL PALE YELLOW BACKGROUNDS IN CHROME/EDGE/FIREFOX */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #121827 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    border-color: rgba(0, 212, 255, 0.4) !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Glass Form Inputs Styling */
.glass-input,
input.form-control,
select.form-control,
input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"] {
  background: rgba(18, 24, 39, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 10px !important;
  padding: 12px 18px !important;
  color: #ffffff !important;
  font-size: 15px !important;
  transition: all 0.3s ease !important;
}

.glass-input:focus,
input.form-control:focus,
select.form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="email"]:focus {
  outline: none !important;
  background: rgba(21, 28, 47, 0.95) !important;
  border-color: #00D4FF !important;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3) !important;
  color: #ffffff !important;
}

.glass-input::placeholder,
input::placeholder {
  color: rgba(166, 176, 207, 0.6) !important;
}

/* Word Reveal Classes */
.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.word-reveal.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Page Entrance Animation */
.page-entrance {
  animation: pageEntranceAnim 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes pageEntranceAnim {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Footer */
.footer-premium {
  background: #090B16;
  color: var(--text-secondary);
  padding: 60px 0 30px;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.footer-premium h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.footer-premium p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-premium a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-premium a:hover {
  color: var(--text-primary);
}

.footer-premium ul li {
  color: var(--text-secondary);
}

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

.footer-social a {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.footer-social a:hover {
  color: var(--accent-primary);
}

/* Reduced Motion Respect */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
