/* =============================
   Theme & Design System
   ============================= */
:root {
  /* Paleta de colores (HSL) */
  --color-primary-h: 260;
  --color-primary-s: 70%;
  --color-primary-l: 55%;
  --color-primary: hsl(var(--color-primary-h), var(--color-primary-s), var(--color-primary-l));

  --color-bg-light: #ffffff;
  --color-bg-dark: #07050d;
  --color-text-light: #07050d;
  --color-text-dark: #f3f4f6;

  /* Transparencias para glassmorphism */
  --glass-bg: rgba(10, 7, 20, 0.45);
  --glass-border: rgba(168, 85, 247, 0.15);

  /* Tipografía */
  --font-primary: 'Inter', system-ui, sans-serif;
  --font-heading: 'Outfit', system-ui, sans-serif;
}

/* Modo oscuro */
[data-theme='dark'] {
  --color-bg: var(--color-bg-dark);
  --color-text: var(--color-text-dark);
  --glass-bg: rgba(10, 7, 20, 0.45);
  --glass-border: rgba(168, 85, 247, 0.15);
}

/* Modo claro */
[data-theme='light'] {
  --color-bg: var(--color-bg-light);
  --color-text: var(--color-text-light);
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(0, 0, 0, 0.08);
}

/* Aplicación global */
html, body {
  background: transparent !important;
  color: var(--color-text);
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism reusable class */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(5px) saturate(130%);
  -webkit-backdrop-filter: blur(5px) saturate(130%);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  will-change: transform;
}

/* Micro‑animaciones */
@keyframes bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.bump {
  animation: bump 0.4s ease-out;
}

/* Navbar scrolling effect */
.navbar.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  transition: background 0.3s ease;
}

/* Responsividad básica */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 1rem;
    display: none;
  }
  .navbar-actions {
    gap: 0.5rem;
  }
  .mobile-toggle {
    display: block;
  }
}

/* Dark‑mode toggle button styling */
.theme-toggle {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: 1.2rem;
}

/* Transición de carga suave para imágenes diferidas */
img[data-src] {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
img.loaded {
  opacity: 1;
}

/* Banner de Consentimiento de Cookies Premium */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 380px;
  background: rgba(15, 11, 28, 0.9);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner h4 i {
  color: var(--color-primary);
}

.cookie-banner p {
  font-size: 13px;
  line-height: 1.5;
  color: #9ca3af;
  margin: 0;
}

.cookie-actions {
  display: flex;
  gap: 12px;
}

.cookie-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.cookie-btn.accept {
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  border: none;
  color: #fff;
}

.cookie-btn.accept:hover {
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

.cookie-btn.reject {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cookie-btn.reject:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 480px) {
  .cookie-banner {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ==========================================
   REALTIME CHET WIDGET PREMIUM STYLES
   ========================================== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
}

.chat-widget-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.chat-widget-toggle:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 25px rgba(var(--color-primary-rgb), 0.6);
}

.chat-widget-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  animation: pulseChatBorder 2s infinite;
  pointer-events: none;
}

@keyframes pulseChatBorder {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.3); opacity: 0; }
}

.chat-window {
  position: fixed;
  bottom: 96px;
  left: 24px;
  width: 360px;
  height: 480px;
  background: rgba(15, 11, 28, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-window.visible {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-primary);
}

.chat-header-text h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.chat-status {
  font-size: 11px;
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.close-chat {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
  transition: color 0.3s;
}

.close-chat:hover {
  color: #fff;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(7, 5, 13, 0.2);
}

.chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: msgFadeIn 0.3s ease forwards;
}

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-msg.staff {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff;
  border-bottom-left-radius: 2px;
}

.chat-msg.system {
  align-self: center;
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 11px;
  padding: 0;
  text-align: center;
  max-width: 100%;
}

.msg-meta {
  font-size: 10px;
  opacity: 0.6;
}

.chat-input-bar {
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 16px;
}

.chat-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 10px 18px;
  color: #fff;
  font-size: 13px;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.02);
}

.chat-send-btn {
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.4);
}

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  width: fit-content;
}

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator .dot:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
  .chat-window {
    left: 16px;
    right: 16px;
    bottom: 96px;
    width: auto;
    height: 400px;
  }
  .chat-widget {
    left: 16px;
    bottom: 16px;
  }
}

/* ==========================================
   FIXED PARALLAX BACKGROUND & LOGO OVERLAY
   ========================================== */
.fixed-parallax-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
  background-color: #050308; /* Fondo base ultra oscuro premium */
  background-image: 
    /* Brillo neón morado superior izquierdo (Glow Blob 1) */
    radial-gradient(circle at 10% 15%, rgba(168, 85, 247, 0.12) 0%, transparent 45%),
    /* Brillo neón cian superior derecho (Glow Blob 2) */
    radial-gradient(circle at 90% 20%, rgba(0, 242, 255, 0.08) 0%, transparent 40%),
    /* Gran destello de luz central morada */
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  background-position: center;
  background-attachment: fixed;
  transition: background-color 0.5s ease;
}

/* Grid cibernético futurista de fondo (sobredimensionado para scroll parallax) */
.bg-cyber-grid {
  position: absolute;
  top: -200px;
  left: 0;
  width: 100%;
  height: calc(100% + 400px);
  background-image: 
    linear-gradient(rgba(168, 85, 247, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center;
  will-change: transform;
  z-index: 2;
}

/* Estrellas y partículas cibernéticas de fondo */
.bg-cyber-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(255, 255, 255, 0.12), transparent),
    radial-gradient(2px 2px at 40% 75%, rgba(168, 85, 247, 0.15), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255, 255, 255, 0.08), transparent),
    radial-gradient(1.5px 1.5px at 85% 65%, rgba(0, 242, 255, 0.12), transparent);
  background-size: 500px 500px;
  opacity: 0.7;
  pointer-events: none;
  animation: backgroundStarsPulse 8s ease-in-out infinite alternate;
  z-index: 3;
}

@keyframes backgroundStarsPulse {
  0% { opacity: 0.4; }
  100% { opacity: 0.9; }
}

/* Animated glowing blobs (nebulas) in the background - Optimized without filter: blur and mix-blend-mode to maximize GPU render speed */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  z-index: 1;
}

.glow-purple {
  top: -15%;
  left: -10%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.28) 0%, rgba(168, 85, 247, 0.1) 40%, transparent 70%);
  animation: floatGlow1 22s ease-in-out infinite alternate;
}

.glow-cyan {
  bottom: -15%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.2) 0%, rgba(0, 242, 255, 0.08) 40%, transparent 70%);
  animation: floatGlow2 28s ease-in-out infinite alternate;
}

@keyframes floatGlow1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(8vw, 6vh) scale(1.1);
  }
  100% {
    transform: translate(-3vw, 12vh) scale(0.9);
  }
}

@keyframes floatGlow2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-10vw, -8vh) scale(0.9);
  }
  100% {
    transform: translate(3vw, -4vh) scale(1.05);
  }
}

/* Brillo difuminado dinámico detrás del logo - Optimizado sin filter: blur */
.bg-glow-blur {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, rgba(124, 58, 237, 0.03) 30%, rgba(168, 85, 247, 0.01) 55%, transparent 70%);
  border-radius: 50%;
}

/* Envoltura del logotipo que recibe el scroll parallax desde JS */
.fixed-bg-logo-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% - 80px));
  width: 50vw;
  max-width: 680px;
  min-width: 300px;
  height: auto;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}

/* Logo oficial de EngineX en marca de agua fija al 10% - Optimizado sin drop-shadow pesado */
.fixed-bg-logo {
  width: 100%;
  height: auto;
  opacity: 0.1; /* 10% opacidad premium */
  filter: grayscale(8%);
  animation: gentlePulseLogo 18s ease-in-out infinite alternate;
}

@keyframes gentlePulseLogo {
  0% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.025) rotate(0.6deg);
  }
  100% {
    transform: scale(1) rotate(-0.6deg);
  }
}

/* Adaptación del fondo en Modo Claro */
[data-theme='light'] .fixed-parallax-bg {
  background: #f8fafc !important;
  background-image: none !important;
}

[data-theme='light'] .bg-cyber-grid {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.012) 1px, transparent 1px);
}

[data-theme='light'] .bg-glow-blur {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.03) 0%, transparent 60%);
}

[data-theme='light'] .fixed-bg-logo {
  opacity: 0.04;
  filter: grayscale(100%) brightness(0.2);
}

/* ==========================================================================
   PREMIUM BACKGROUNDS FOR SPA OVERLAYS (DOCS, BOT PANEL, STAFF PANEL)
   ========================================================================== */
#docs-panel-overlay,
#admin-panel-overlay,
#staff-panel-overlay {
  background-color: #05030a !important; /* Solid dark background to prevent underlying main page bleed-through */
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Soporte para modo claro en overlays */
[data-theme='light'] #docs-panel-overlay,
[data-theme='light'] #admin-panel-overlay,
[data-theme='light'] #staff-panel-overlay {
  background-color: #f8fafc !important;
  background-image: none !important;
}

#docs-panel-overlay .fixed-parallax-bg,
#admin-panel-overlay .fixed-parallax-bg,
#staff-panel-overlay .fixed-parallax-bg {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1 !important;
  pointer-events: none;
}

#staff-panel-overlay > header,
#staff-panel-overlay > div,
#admin-panel-overlay > header,
#admin-panel-overlay > div,
#docs-panel-overlay > header,
#docs-panel-overlay > div,
.staff-panel-container {
  position: relative;
  z-index: 2;
}

/* Optimización de Scroll para deshabilitar backdrop-filter y animaciones costosas */
body.is-scrolling .glass-card,
body.is-scrolling .tilt-element {
  pointer-events: none !important;
}

/* ==========================================
   CYBERPUNK SHOOTING STARS (GPU ANIMATED COMETS)
   ========================================== */
.shooting-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1.5; /* Above nebulas, below grid lines */
  pointer-events: none;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  width: 240px; /* Longer majestic tail */
  height: 3px;  /* Thicker tail to show the gradient colors clearly */
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

/* White-hot glowing head of the comet */
.shooting-star::before {
  content: '';
  position: absolute;
  width: 8px;  /* Larger head core */
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  top: -2.5px;
}

/* --- STAR 1: Left-bound, shallow, high altitude, Cyan --- */
.shooting-star:nth-child(1) {
  top: 8%;
  left: 100%;
  background: 
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(95deg, #ffffff 0%, rgba(0, 242, 255, 0.9) 15%, rgba(0, 242, 255, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  transform: rotate(-15deg) scale(0);
  animation: shoot-left-shallow 46s linear infinite, spark-slide-left 0.5s linear infinite;
  animation-delay: 0s;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.7));
}
.shooting-star:nth-child(1)::before {
  left: 0;
  box-shadow: 0 0 20px 6px #00f2ff, 0 0 8px 2px #ffffff;
}

/* --- STAR 2: Right-bound, shallow, medium-high altitude, Purple --- */
.shooting-star:nth-child(2) {
  top: 25%;
  left: -200px;
  background: 
    repeating-linear-gradient(-90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(-95deg, #ffffff 0%, rgba(168, 85, 247, 0.9) 15%, rgba(168, 85, 247, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  transform: rotate(15deg) scale(0);
  animation: shoot-right-shallow 52s linear infinite, spark-slide-right 0.5s linear infinite;
  animation-delay: 9s;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.7));
}
.shooting-star:nth-child(2)::before {
  right: 0;
  box-shadow: 0 0 20px 6px #a855f7, 0 0 8px 2px #ffffff;
}

/* --- STAR 3: Left-bound, shallow, medium-low altitude, Purple --- */
.shooting-star:nth-child(3) {
  top: 45%;
  left: 100%;
  background: 
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(95deg, #ffffff 0%, rgba(168, 85, 247, 0.9) 15%, rgba(168, 85, 247, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  transform: rotate(-12deg) scale(0);
  animation: shoot-left-shallow 48s linear infinite, spark-slide-left 0.5s linear infinite;
  animation-delay: 18s;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.7));
}
.shooting-star:nth-child(3)::before {
  left: 0;
  box-shadow: 0 0 20px 6px #a855f7, 0 0 8px 2px #ffffff;
}

/* --- STAR 4: Right-bound, shallow, low altitude, Cyan --- */
.shooting-star:nth-child(4) {
  top: 65%;
  left: -200px;
  background: 
    repeating-linear-gradient(-90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(-95deg, #ffffff 0%, rgba(0, 242, 255, 0.9) 15%, rgba(0, 242, 255, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  transform: rotate(14deg) scale(0);
  animation: shoot-right-shallow 56s linear infinite, spark-slide-right 0.5s linear infinite;
  animation-delay: 28s;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.7));
}
.shooting-star:nth-child(4)::before {
  right: 0;
  box-shadow: 0 0 20px 6px #00f2ff, 0 0 8px 2px #ffffff;
}

/* --- STAR 5: Steep Left-bound, top to bottom, Cyan --- */
.shooting-star:nth-child(5) {
  top: -100px;
  left: 75%;
  background: 
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(95deg, #ffffff 0%, rgba(0, 242, 255, 0.9) 15%, rgba(0, 242, 255, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  transform: rotate(-55deg) scale(0);
  animation: shoot-left-steep 44s linear infinite, spark-slide-left 0.4s linear infinite;
  animation-delay: 37s;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.7));
}
.shooting-star:nth-child(5)::before {
  left: 0;
  box-shadow: 0 0 20px 6px #00f2ff, 0 0 8px 2px #ffffff;
}

/* --- STAR 6: Steep Right-bound, top to bottom, Purple --- */
.shooting-star:nth-child(6) {
  top: -100px;
  left: 25%;
  background: 
    repeating-linear-gradient(-90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(-95deg, #ffffff 0%, rgba(168, 85, 247, 0.9) 15%, rgba(168, 85, 247, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(100% 0, 100% 100%, 0 50%);
  transform: rotate(55deg) scale(0);
  animation: shoot-right-steep 50s linear infinite, spark-slide-right 0.4s linear infinite;
  animation-delay: 46s;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.7));
}
.shooting-star:nth-child(6)::before {
  right: 0;
  box-shadow: 0 0 20px 6px #a855f7, 0 0 8px 2px #ffffff;
}

/* --- STAR 7: Left-bound, shallow, high-medium altitude, Cyan --- */
.shooting-star:nth-child(7) {
  top: 20%;
  left: 100%;
  background: 
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0px, rgba(255, 255, 255, 0.95) 2px, transparent 2px, transparent 15px) repeat-x,
    linear-gradient(95deg, #ffffff 0%, rgba(0, 242, 255, 0.9) 15%, rgba(0, 242, 255, 0.3) 50%, transparent 100%);
  background-size: 20px 100%, 100% 100%;
  clip-path: polygon(0 0, 0 100%, 100% 50%);
  transform: rotate(-16deg) scale(0);
  animation: shoot-left-shallow 54s linear infinite, spark-slide-left 0.5s linear infinite;
  animation-delay: 22s;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.7));
}
.shooting-star:nth-child(7)::before {
  left: 0;
  box-shadow: 0 0 20px 6px #00f2ff, 0 0 8px 2px #ffffff;
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes spark-slide-left {
  0% {
    background-position: 0px 0, 0px 0;
  }
  100% {
    background-position: 240px 0, 0px 0;
  }
}

@keyframes spark-slide-right {
  0% {
    background-position: 0px 0, 0px 0;
  }
  100% {
    background-position: -240px 0, 0px 0;
  }
}

@keyframes shoot-left-shallow {
  0% {
    transform: translate3d(0, 0, 0) rotate(-15deg) scale(0);
    opacity: 0;
  }
  0.2% {
    transform: translate3d(0, 0, 0) rotate(-15deg) scale(1);
    opacity: 1;
  }
  3.5% {
    opacity: 1;
  }
  5.5% {
    opacity: 0;
    transform: translate3d(-115vw, 31vh, 0) rotate(-15deg) scale(1);
  }
  100% {
    transform: translate3d(-115vw, 31vh, 0) rotate(-15deg) scale(0);
    opacity: 0;
  }
}

@keyframes shoot-right-shallow {
  0% {
    transform: translate3d(0, 0, 0) rotate(15deg) scale(0);
    opacity: 0;
  }
  0.2% {
    transform: translate3d(0, 0, 0) rotate(15deg) scale(1);
    opacity: 1;
  }
  3.5% {
    opacity: 1;
  }
  5.5% {
    opacity: 0;
    transform: translate3d(115vw, 31vh, 0) rotate(15deg) scale(1);
  }
  100% {
    transform: translate3d(115vw, 31vh, 0) rotate(15deg) scale(0);
    opacity: 0;
  }
}

@keyframes shoot-left-steep {
  0% {
    transform: translate3d(0, 0, 0) rotate(-55deg) scale(0);
    opacity: 0;
  }
  0.2% {
    transform: translate3d(0, 0, 0) rotate(-55deg) scale(1);
    opacity: 1;
  }
  3.5% {
    opacity: 1;
  }
  5.5% {
    opacity: 0;
    transform: translate3d(-65vw, 110vh, 0) rotate(-55deg) scale(1);
  }
  100% {
    transform: translate3d(-65vw, 110vh, 0) rotate(-55deg) scale(0);
    opacity: 0;
  }
}

@keyframes shoot-right-steep {
  0% {
    transform: translate3d(0, 0, 0) rotate(55deg) scale(0);
    opacity: 0;
  }
  0.2% {
    transform: translate3d(0, 0, 0) rotate(55deg) scale(1);
    opacity: 1;
  }
  3.5% {
    opacity: 1;
  }
  5.5% {
    opacity: 0;
    transform: translate3d(65vw, 110vh, 0) rotate(55deg) scale(1);
  }
  100% {
    transform: translate3d(65vw, 110vh, 0) rotate(55deg) scale(0);
    opacity: 0;
  }
}
