/* CSS Variables for Light and Dark Mode */
:root {
  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(241, 245, 249, 0.95);
  --bg-overlay: rgba(241, 245, 249, 0.98);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-accent: #3b82f6;
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --border-color: rgba(148, 163, 184, 0.6);
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.12);
  --shadow-strong: rgba(0, 0, 0, 0.2);
  --glow-color: rgba(59, 130, 246, 0.15);
  --card-bg: rgba(241, 245, 249, 0.9);
}

/* Dark Mode Colors */
body.dark-mode {
  --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --bg-secondary: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.25);
  --bg-overlay: rgba(30, 41, 59, 0.9);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-accent: #60a5fa;
  --accent-primary: #60a5fa;
  --accent-secondary: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.5);
  --shadow-strong: rgba(0, 0, 0, 0.8);
  --glow-color: rgba(96, 165, 250, 0.6);
  --card-bg: rgba(30, 41, 59, 0.9);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  min-height: 100vh;
}

body.loaded {
  opacity: 1;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.floating-shapes::before,
.floating-shapes::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

.floating-shapes::before {
  width: 400px;
  height: 400px;
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.floating-shapes::after {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: -150px;
  animation-delay: 10s;
}

/* Add more floating shapes */
.floating-shapes {
  position: relative;
}

.floating-shapes::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
  border-radius: 50%;
  top: 10%;
  left: 10%;
  opacity: 0.2;
  animation: float 15s infinite ease-in-out;
}

.floating-shapes::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  border-radius: 50%;
  bottom: 10%;
  right: 10%;
  opacity: 0.25;
  animation: float 18s infinite ease-in-out reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  width: 50px;
  height: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px var(--shadow-light);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px var(--shadow-strong), 0 0 20px var(--glow-color);
  border-color: var(--accent-primary);
}

.sun-icon, .moon-icon {
  font-size: 16px;
  transition: all 0.3s ease;
}

.moon-icon {
  display: none;
}

/* Navigation Dots */
.nav-dots {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--accent-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.nav-dot:hover {
  transform: scale(1.2);
  background: var(--accent-primary);
}

.nav-dot.active {
  background: var(--accent-primary);
  transform: scale(1.3);
}

.nav-dot.active::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-primary);
  opacity: 0.5;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

@keyframes subtle-bob {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.hero-header {
  max-width: 800px;
  margin: 0 auto;
}

.logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
  padding: 80px 60px;
  overflow: visible;
}

.logo {
  font-size: 4rem;
  font-weight: 700;
  margin: 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 2;
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 25px var(--glow-color)) drop-shadow(0 0 50px var(--glow-color));
  }
  to {
    filter: drop-shadow(0 0 35px var(--glow-color)) drop-shadow(0 0 70px var(--glow-color));
  }
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 50%);
  opacity: 0.4;
  z-index: 1;
  animation: glowPulse 3s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glowPulse {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.4;
  }
  to {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.6;
  }
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  min-width: 120px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-medium);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-underline {
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
}

.title-underline::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--accent-gradient);
  border-radius: 4px;
  opacity: 0.3;
  filter: blur(8px);
  z-index: -1;
}

/* Links Section */
.links-section {
  padding: 80px 0;
}

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.link-card {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  transform-origin: center center;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.link-card:hover::before {
  transform: scaleX(1);
}


.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.link-card h3 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.link-card p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-gradient);
  color: white;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: translateZ(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px var(--glow-color);
}

.card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
  border-radius: 25px;
}

.card-link:hover::before {
  left: 100%;
}

/* Add a 3D button face effect */
.card-link::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
  border-radius: 25px;
  pointer-events: none;
  z-index: 1;
}

/* Button text depth */
.card-link span {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.card-link:hover {
  transform: translateZ(20px) scale(1.05);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-color), 0 5px 15px rgba(0, 0, 0, 0.2);
}

.link-arrow {
  transition: transform 0.3s ease;
}

.card-link:hover .link-arrow {
  transform: translateX(5px);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.link-card:hover .card-glow {
  opacity: 0.15;
}

/* Enhanced 3D effect elements */
.card-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.1) 45%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 55%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
  pointer-events: none;
}

.link-card:hover .card-shine {
  transform: translateX(100%);
}

/* Features Section */
.features-section {
  padding: 80px 0;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.feature-item {
  text-align: center;
  padding: 40px 30px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-item:hover::before {
  opacity: 0.05;
}

.feature-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 0 30px var(--glow-color), 0 10px 20px var(--shadow-strong);
  border-color: var(--accent-primary);
}

.feature-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}

.feature-icon {
  font-size: 3rem;
  display: block;
  position: relative;
  z-index: 2;
}

.icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  opacity: 0.3;
  z-index: 1;
  animation: iconGlow 3s ease-in-out infinite alternate;
}

@keyframes iconGlow {
  from {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }
  to {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.5;
  }
}

.feature-item h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.3rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.feature-item p {
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

/* Footer */
.footer {
  margin-top: 100px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

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

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-medium);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-strong);
}

/* Responsive Design */
@media (max-width: 768px) {
  .logo {
    font-size: 3rem;
  }
  
  .hero-stats {
    gap: 20px;
  }
  
  .stat-item {
    min-width: 100px;
    padding: 15px;
  }
  
  .nav-dots {
    right: 15px;
  }
  
  .theme-toggle {
    top: 15px;
    right: 15px;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .links {
    grid-template-columns: 1fr;
  }
  
  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px;
  }
  
  .logo {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }
  
  .stat-item {
    width: 100%;
    max-width: 200px;
  }
}

/* Loading Animation */
@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero-section > * {
  animation: slideInUp 0.8s ease forwards;
}

.hero-section > *:nth-child(1) { animation-delay: 0.1s; }
.hero-section > *:nth-child(2) { animation-delay: 0.2s; }
.hero-section > *:nth-child(3) { animation-delay: 0.3s; }
.hero-section > *:nth-child(4) { animation-delay: 0.4s; }

/* Performance Optimizations */
.link-card,
.feature-item {
  will-change: transform;
}

.floating-shapes::before,
.floating-shapes::after {
  will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}