/* Tailwind Base */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #4387f4;
  --primary-dark: #306bcc;
  --background-light: #ffffff;
  --background-dark: #101722;
  --surface-light: #f8f9fa;
  --surface-dark: #1a2433;
  --text-main: #111418;
  --text-muted: #60708a;
  --border-light: #e5e7eb;
  --border-dark: #2d3748;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Swiper Custom Styles */
.swiper-pagination-bullet {
  background: var(--primary);
  opacity: 0.5;
}

.swiper-pagination-bullet-active {
  opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--primary);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background 0.3s;
}

:hover::-webkit-scrollbar-thumb,
html:hover::-webkit-scrollbar-thumb,
body:hover::-webkit-scrollbar-thumb {
    background: rgba(67, 135, 244, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(67, 135, 244, 0.8);
}

* {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

*:hover {
    scrollbar-color: rgba(67, 135, 244, 0.5) transparent;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow: hidden;
}

.loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(67, 135, 244, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 135, 244, 0.08) 1px, transparent 1px);
  background-size: 50px 50px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 100%);
}

.loading-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #ffffff 100%);
  pointer-events: none;
}

.loader-logo {
  width: 200px;
  height: 200px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 30px rgba(67, 135, 244, 0.5));
}

.loader-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loading-text {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  color: #4387f4;
  letter-spacing: 3px;
  text-transform: uppercase;
  z-index: 1;
}

.loading-text::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

@media (max-width: 768px) {
  .loader-logo {
    width: 120px;
    height: 120px;
  }
  
  .loading-text {
    bottom: 40px;
    font-size: 12px;
    letter-spacing: 2px;
  }
  
  .loading-screen::before {
    background-size: 30px 30px;
  }
}

/* Dark Mode */
.dark {
  --background-light: #101722;
  --surface-light: #1a2433;
  --text-main: #ffffff;
  --border-light: #2d3748;
}

/* Smooth Transitions */
.transition-theme {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
  background: rgba(26, 36, 51, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mesh Grid Animation */
.mesh-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  background-size: 400% 400%;
  animation: meshMove 15s ease infinite;
  opacity: 0.3;
}

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

.mesh-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(67, 135, 244, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 135, 244, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: meshScroll 20s linear infinite;
}

@keyframes meshScroll {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Floating Boxes */
.floating-box {
  position: absolute;
  width: 50px;
  height: 50px;
  background: rgba(67, 135, 244, 0.15);
  border: 1px solid rgba(67, 135, 244, 0.3);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.dark .floating-box {
  background: rgba(67, 135, 244, 0.2);
  border: 1px solid rgba(67, 135, 244, 0.4);
}

@keyframes floatGrid1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(100px, 0); }
  50% { transform: translate(100px, 100px); }
  75% { transform: translate(0, 100px); }
}

@keyframes floatGrid2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(150px, 0); }
  66% { transform: translate(150px, 150px); }
}

@keyframes floatGrid3 {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(50px, 0); }
  40% { transform: translate(50px, 50px); }
  60% { transform: translate(100px, 50px); }
  80% { transform: translate(100px, 100px); }
}

@keyframes floatGrid4 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(200px, 100px); }
}

@keyframes floatGrid5 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(0, 100px); }
  50% { transform: translate(100px, 100px); }
  75% { transform: translate(100px, 0); }
}

/* Edge Blur Effect */
.hero-blur {
  overflow: hidden;
  position: relative;
}

.hero-blur::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse at center, transparent 30%, rgba(255, 255, 255, 0.9) 100%);
  z-index: 1;
}

.dark .hero-blur::before {
  background: 
    radial-gradient(ellipse at center, transparent 30%, rgba(10, 14, 26, 0.95) 100%);
}

.hero-blur::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  mask-image: radial-gradient(ellipse at center, transparent 40%, black 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 40%, black 100%);
  background: inherit;
  filter: blur(20px);
  z-index: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--surface-light);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Mobile Menu */
#mobileMenu.active {
  transform: translateX(0) !important;
}

/* Navigation Responsive */
@media (max-width: 768px) {
  header {
    padding: 0.5rem 1rem !important;
  }
  
  header img {
    height: 2.5rem !important;
  }
  
  #mobileMenu nav {
    padding: 1.5rem !important;
  }
  
  #mobileMenu a {
    font-size: 1rem !important;
    padding: 0.75rem 0 !important;
  }
}

@media (max-width: 480px) {
  header img {
    height: 2rem !important;
  }
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .hero-blur {
    min-height: auto !important;
    padding: 4rem 1rem !important;
  }
  
  h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  .floating-box {
    display: none;
  }
  
  section {
    padding: 3rem 1rem !important;
  }
  
  .grid {
    gap: 1rem !important;
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  .flex.gap-6 {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .flex-shrink-0.w-24 {
    width: auto !important;
    text-align: left !important;
  }
  
  .text-4xl {
    font-size: 2rem !important;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
  }
  
  .text-2xl {
    font-size: 1.25rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  .p-8 {
    padding: 1.5rem !important;
  }
  
  .p-6 {
    padding: 1rem !important;
  }
}
