:root {
  --bg: #000000;
  --bg2: #0a0a0a;
  --bg3: #1a1a1a;
  --panel: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #cccccc;
  --accent: #0066ff;
  --accent-light: #4d94ff;
  --cosmic-white: rgba(255, 255, 255, 0.15);
  --cosmic-gray: rgba(128, 128, 128, 0.08);
  --cosmic-black: rgba(0, 0, 0, 0.3);
  --bg-glass: rgba(255, 255, 255, 0.03);
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  /* Enable hardware acceleration */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Smooth scroll animations */
* {
  scroll-behavior: smooth;
}

/* Page transition animations */
.page-transition {
  animation: pageFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform: translateZ(0);
  will-change: opacity, transform;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax scroll effect */
.parallax-element {
  transition: transform 0.1s linear;
  will-change: transform;
  transform: translateZ(0);
}

/* Smooth focus transitions */
:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
  transition: outline 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* High performance mode for 60fps+ */
@media (min-resolution: 120dpi) {
  .nav-link, .brand, .btn-primary, .btn-secondary, .tool-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
  }
}

body {
  background:
    radial-gradient(ellipse 1800px 1200px at 25% 15%, var(--cosmic-white), transparent 35%),
    radial-gradient(ellipse 1400px 900px at 75% 25%, var(--cosmic-gray), transparent 40%),
    radial-gradient(ellipse 1200px 700px at 20% 70%, var(--cosmic-black), transparent 45%),
    radial-gradient(circle 1000px at 80% 80%, rgba(255, 255, 255, 0.03), transparent 55%),
    radial-gradient(ellipse 1100px 600px at 50% 50%, rgba(255, 255, 255, 0.04), transparent 50%),
    radial-gradient(circle 600px at 30% 30%, rgba(255, 255, 255, 0.08), transparent 70%),
    radial-gradient(circle 800px at 70% 60%, rgba(0, 0, 0, 0.4), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2), var(--bg3));
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
  position: relative;
}

/* Subtle grid overlay for panels */
.grid-overlay {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent 70%);
}

/* Nav links glow */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.9);
  transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1), text-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: color, text-shadow, transform;
}

.nav-link:hover {
  color: var(--accent-light);
  text-shadow: 0 0 20px rgba(0, 102, 255, 0.6), 0 0 40px rgba(0, 102, 255, 0.3);
  transform: translateY(-1px);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 2px;
  transform: scaleX(0.25);
  transform-origin: left;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1), opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.nav-link:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

/* Brand */
.brand {
  font-family: Poppins, Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  transition: text-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
  will-change: text-shadow, color, transform;
}

.brand:hover {
  text-shadow: 0 0 25px rgba(0, 102, 255, 0.6), 0 0 50px rgba(0, 102, 255, 0.3);
  transform: translateY(-1px);
}

.brand__blue {
  color: rgba(255, 255, 255, 0.95);
}

.brand__spider {
  color: var(--accent-light);
}

.badge-online {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

/* Hero */
.hero-title {
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  line-height: 1.0;
  letter-spacing: 0.04em;
  font-weight: 900;
  text-shadow: 0 0 28px rgba(0, 102, 255, 0.20);
}

.hero-title__blue {
  color: rgba(255, 255, 255, 0.98);
}

.hero-title__spider {
  color: rgba(0, 102, 255, 0.98);
  text-shadow: 0 0 22px rgba(0, 102, 255, 0.38);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  color: #000000;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow, background;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #ffffff;
  box-shadow: 0 0 30px rgba(0, 102, 255, 0.5), 0 0 60px rgba(0, 102, 255, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.92);
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow, background, border-color;
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  color: #000000;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.15), 0 0 50px rgba(0, 102, 255, 0.1);
  transform: translateY(-2px) scale(1.02);
}

.section-title {
  font-size: 1.2rem;
  letter-spacing: 0.22em;
  font-weight: 800;
}

/* Highlight tool cards (DarkGPT-like) - Improved sizing */
.tool-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  min-height: 180px;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, border-color, box-shadow;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tool-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 0 35px rgba(0, 102, 255, 0.25), 0 0 70px rgba(0, 102, 255, 0.1);
  transform: translateY(-4px) scale(1.02);
}

.tool-card__title {
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.tool-card__desc {
  color: rgba(204, 204, 204, 0.9);
  line-height: 1.6;
  font-size: 0.95rem;
  flex-grow: 1;
}

.tool-card__badge {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(0, 102, 255, 0.45);
  color: rgba(0, 102, 255, 0.95);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  align-self: flex-start;
}

.showcase-link {
  color: rgba(0, 102, 255, 0.95);
  font-weight: 800;
  transition: text-shadow 200ms ease, text-decoration-color 200ms ease, color 200ms ease;
  text-decoration: none;
}

.showcase-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-shadow: 0 0 18px rgba(0, 102, 255, 0.35);
}

.footer-link {
  color: rgba(170, 170, 170, 0.92);
  transition: color 200ms ease, text-shadow 200ms ease;
}

.footer-link:hover {
  color: rgba(0, 102, 255, 0.95);
  text-shadow: 0 0 18px rgba(0, 102, 255, 0.25);
}

.footer-link-normal {
  color: rgba(170, 170, 170, 0.92);
  transition: color 200ms ease, text-shadow 200ms ease;
}

.footer-link-normal:hover {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 18px rgba(0, 102, 255, 0.18);
}

/* Small UI pills */
.pill {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

/* Neon cards */
.neon-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.neon-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 1.6rem;
  background: radial-gradient(700px 160px at 20% 0%, rgba(255, 255, 255, 0.16), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.neon-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  pointer-events: none;
  background: radial-gradient(480px 120px at 30% -10%, var(--neonGlow), transparent 55%);
  opacity: 0.75;
}

.neon-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 44px rgba(59, 130, 246, 0.12);
}

.neon-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.neon-card__icon {
  height: 44px;
  width: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 24px var(--neonGlowSoft);
}

.neon-card__title {
  font-family: Orbitron, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
}

.neon-card__subtitle {
  margin-top: 0.1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.neon-card__list {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding-left: 1.2rem;
  color: rgba(255, 255, 255, 0.68);
}

.neon-card__list li {
  list-style: disc;
  margin: 0.35rem 0;
}

.neon-card__badge {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  font-family: Orbitron, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.75);
}

.neon-featured {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 52px rgba(250, 204, 21, 0.12);
}

/* Neon themes */
.neon-orange {
  --neonGlow: rgba(249, 115, 22, 0.55);
  --neonGlowSoft: rgba(249, 115, 22, 0.25);
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.18), 0 0 28px rgba(249, 115, 22, 0.08);
}

.neon-red {
  --neonGlow: rgba(239, 68, 68, 0.55);
  --neonGlowSoft: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.18), 0 0 28px rgba(239, 68, 68, 0.08);
}

.neon-yellow {
  --neonGlow: rgba(250, 204, 21, 0.6);
  --neonGlowSoft: rgba(250, 204, 21, 0.25);
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.2), 0 0 30px rgba(250, 204, 21, 0.08);
}

.neon-blue {
  --neonGlow: rgba(59, 130, 246, 0.6);
  --neonGlowSoft: rgba(59, 130, 246, 0.25);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 0 30px rgba(59, 130, 246, 0.08);
}

.neon-green {
  --neonGlow: rgba(16, 185, 129, 0.55);
  --neonGlowSoft: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2), 0 0 30px rgba(16, 185, 129, 0.08);
}

/* Cosmic glass card variant (for tool cards) */
.cosmic-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.cosmic-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 102, 255, 0.35);
  box-shadow: 0 0 28px rgba(0, 102, 255, 0.14);
}

.cosmic-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 1.6rem;
  background: radial-gradient(600px 140px at 18% 0%, rgba(0,102,255,0.12), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Header positioning with Saturn */
header {
  position: relative;
  z-index: 40;
}

/* Ensure main content is above Saturn */
main {
  position: relative;
  z-index: 10;
}

/* Better responsive spacing */
@media (max-width: 768px) {
  .pt-14 {
    padding-top: 2rem;
  }
  
  .pt-18 {
    padding-top: 2.5rem;
  }
}

/* Saturn Planet - Bigger and more impressive */
.saturn-container {
  position: fixed;
  top: 15%;
  right: 8%;
  width: 300px;
  height: 300px;
  z-index: 5;
  pointer-events: none;
  transform: translateZ(0);
  will-change: transform;
}

.saturn-planet {
  position: relative;
  width: 100%;
  height: 100%;
  animation: saturnRotate 45s linear infinite;
  transform-style: preserve-3d;
}

.saturn-surface {
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle at 35% 35%, 
    rgba(255, 255, 255, 0.95), 
    rgba(220, 220, 220, 0.85), 
    rgba(180, 180, 180, 0.75),
    rgba(120, 120, 120, 0.65),
    rgba(60, 60, 60, 0.55));
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 
    0 0 80px rgba(255, 255, 255, 0.3),
    0 0 120px rgba(255, 255, 255, 0.15),
    inset -30px -30px 40px rgba(0, 0, 0, 0.6);
}

.saturn-ring {
  position: absolute;
  width: 280px;
  height: 90px;
  border: 12px solid transparent;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotateX(75deg);
  box-shadow: 
    0 0 30px rgba(255, 255, 255, 0.2),
    inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.saturn-ring {
  border-color: rgba(200, 200, 200, 0.6);
  background: radial-gradient(ellipse at center, 
    transparent 35%, 
    rgba(200, 200, 200, 0.12) 45%, 
    transparent 55%);
}

.saturn-ring-2 {
  width: 340px;
  height: 110px;
  border-color: rgba(150, 150, 150, 0.4);
  background: radial-gradient(ellipse at center, 
    transparent 40%, 
    rgba(150, 150, 150, 0.08) 50%, 
    transparent 60%);
}

@keyframes saturnRotate {
  from {
    transform: rotateY(0deg) rotateZ(15deg);
  }
  to {
    transform: rotateY(360deg) rotateZ(15deg);
  }
}

/* Responsive Saturn */
@media (max-width: 768px) {
  .saturn-container {
    width: 180px;
    height: 180px;
    top: 10%;
    right: 5%;
  }
  
  .saturn-surface {
    width: 100px;
    height: 100px;
  }
  
  .saturn-ring {
    width: 160px;
    height: 50px;
    border-width: 8px;
  }
  
  .saturn-ring-2 {
    width: 190px;
    height: 60px;
    border-width: 6px;
  }
}

/* Phone effects - Black & White */
@media (max-width: 640px) {
  body {
    background:
      radial-gradient(ellipse 1200px 800px at 25% 15%, var(--cosmic-white), transparent 30%),
      radial-gradient(ellipse 1000px 600px at 75% 25%, var(--cosmic-gray), transparent 35%),
      radial-gradient(ellipse 800px 500px at 20% 70%, var(--cosmic-black), transparent 40%),
      radial-gradient(circle 600px at 80% 80%, rgba(255, 255, 255, 0.02), transparent 50%),
      radial-gradient(ellipse 700px 400px at 50% 50%, rgba(255, 255, 255, 0.03), transparent 45%),
      radial-gradient(circle 400px at 30% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
      radial-gradient(circle 500px at 70% 60%, rgba(0, 0, 0, 0.3), transparent 50%),
      linear-gradient(180deg, var(--bg), var(--bg2), var(--bg3));
  }
  
  .saturn-container {
    width: 120px;
    height: 120px;
    top: 8%;
    right: 3%;
  }
  
  .saturn-surface {
    width: 70px;
    height: 70px;
    background: radial-gradient(circle at 35% 35%, 
      rgba(255, 255, 255, 0.9), 
      rgba(220, 220, 220, 0.8), 
      rgba(180, 180, 180, 0.7),
      rgba(120, 120, 120, 0.6),
      rgba(60, 60, 60, 0.5));
    box-shadow: 
      0 0 40px rgba(255, 255, 255, 0.25),
      0 0 60px rgba(255, 255, 255, 0.1),
      inset -15px -15px 20px rgba(0, 0, 0, 0.5);
  }
  
  .saturn-ring {
    width: 110px;
    height: 35px;
    border-width: 6px;
    box-shadow: 
      0 0 15px rgba(255, 255, 255, 0.15),
      inset 0 0 15px rgba(255, 255, 255, 0.08);
  }
  
  .saturn-ring-2 {
    width: 130px;
    height: 42px;
    border-width: 4px;
  }
  
  .saturn-planet {
    animation: saturnRotate 30s linear infinite;
  }
  
  /* Enhanced mobile glow effects */
  .tool-card:hover {
    border-color: var(--accent-light);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.15), 0 0 50px rgba(255, 255, 255, 0.08);
    transform: translateY(-2px) scale(1.01);
  }
  
  .nav-link:hover {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 30px rgba(255, 255, 255, 0.15);
  }
  
  .brand:hover {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.15);
  }
  
  /* Mobile snow adjustments */
  #snowCanvas {
    opacity: 0.8;
  }
  
  /* Mobile mouse effects adjustments */
  #mouseEffects {
    opacity: 0.9;
    transition: opacity 0.1s ease-out;
  }
}

/* Cosmic Blue Mouse Effect - Perfect Tracking */
#mouseEffects {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 99999 !important;
  opacity: 1 !important;
  transition: all 0.1s ease-out !important;
  will-change: opacity, transform;
}

#mouseEffects:hover {
  opacity: 1 !important;
}

