:root {
  --primary-glow: #38bdf8;
  --secondary-glow: #22d3ee;
  --accent-glow: #818cf8;
  --glass-bg: rgba(8, 16, 26, 0.7);
  --glass-hover-bg: rgba(12, 28, 38, 0.9);
  --glass-border: rgba(125, 211, 252, 0.18);
  --glass-border-hover: rgba(103, 232, 249, 0.5);
  --text-muted-custom: #94a3b8;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: #020b16;
  color: #f8fafc;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(2, 11, 22, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(96, 165, 250, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(103, 232, 249, 0.55);
}

/* Video Background */
.video-background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.video-background-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.05);
  object-fit: cover;
  filter: saturate(1.1) brightness(0.55) hue-rotate(65deg);
}

.video-fallback-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 24%, rgba(14, 116, 144, 0.7) 0%, rgba(2, 11, 22, 0.92) 58%, #020b16 100%);
  z-index: -1;
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(2, 11, 22, 0.48) 0%,
    rgba(7, 18, 34, 0.24) 50%,
    rgba(2, 11, 22, 0.58) 100%
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
  pointer-events: none;
}

.ambient-glow {
  position: fixed;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 1;
}

.glow-1 {
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.08));
}

.glow-2 {
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.06));
}

/* Ambient Particles Canvas */
#ambient-particles-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
}

/* Shimmer Headline Light-Sweep */
.shimmer-headline {
  background: linear-gradient(
    110deg,
    #ffffff 0%,
    #e2e8f0 25%,
    #67e8f9 45%,
    #ffffff 50%,
    #38bdf8 55%,
    #dbeafe 70%,
    #ffffff 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: lightSweep 6s ease-in-out infinite;
}

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

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.animate-pulse-dot {
  animation: pulseDot 2s infinite ease-in-out;
}

/* Hero Rotating Description */
@keyframes heroSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-slide-in {
  animation: heroSlideIn 0.5s ease-out both;
}

/* Glass Card */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.5), transparent);
  opacity: 0.6;
}

.glass-card:hover {
  background: var(--glass-hover-bg);
  border-color: var(--glass-border-hover);
}

/* App Card Accent Themes */
.app-card {
  --accent: #34d399;
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.app-card.theme-brown {
  --accent: #d4a373;
}
.app-card.theme-green {
  --accent: #4ade80;
}
.app-card.theme-azure {
  --accent: #4aa8ff;
}
.app-card.theme-orange {
  --accent: #fb923c;
}
.app-card.theme-tosca {
  --accent: #2dd4bf;
}
.app-card.theme-ruby {
  --accent: #fb7185;
}
.app-card.theme-burgundy {
  --accent: #b91c46;
}

.app-card:hover {
  border-color: color-mix(in srgb, var(--accent) 90%, transparent);
}

.app-card .theme-tile {
  background: color-mix(in srgb, var(--accent) 12%, #07150e);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.app-card .theme-badge {
  color: color-mix(in srgb, var(--accent) 80%, #f8fafc);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.app-card .theme-dot {
  color: var(--accent);
  fill: var(--accent);
}

.app-card .theme-title {
  color: var(--accent);
}

.app-card .theme-link {
  color: var(--accent);
}

/* App Card Theme Hover Overlay */
.app-card-overlay {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.app-card-overlay-label {
  color: #ffffff;
  background: color-mix(in srgb, var(--accent) 55%, rgba(2, 11, 22, 0.35));
  border-color: color-mix(in srgb, var(--accent) 75%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide-in {
    animation: none;
    opacity: 1;
  }
}

/* Glass Modal */
.custom-glass-modal {
  background: rgba(6, 26, 17, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(52, 211, 153, 0.22);
}