/* Heaven 7.0 Custom Styles - Futuristic Edition */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

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

body {
  font-family: 'Exo 2', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  position: relative;
}

/* Animated Particle Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(241, 196, 15, 0.08) 0%, transparent 50%);
  animation: floatBackground 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatBackground {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

/* Cyberpunk Grid Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.4; }
}

/* RTL Support for Arabic */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
  background: #0A3D62;
}

::-webkit-scrollbar-thumb {
  background: #F1C40F;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #F9E79F;
}

/* Futuristic Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 
      0 0 5px rgba(0, 255, 255, 0.5),
      0 0 10px rgba(0, 255, 255, 0.3),
      0 0 20px rgba(0, 255, 255, 0.2),
      inset 0 0 10px rgba(0, 255, 255, 0.1);
  }
  50% {
    box-shadow: 
      0 0 10px rgba(0, 255, 255, 0.8),
      0 0 20px rgba(0, 255, 255, 0.6),
      0 0 40px rgba(0, 255, 255, 0.4),
      inset 0 0 20px rgba(0, 255, 255, 0.2);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 
      0 0 10px rgba(0, 255, 255, 0.8),
      0 0 20px rgba(0, 255, 255, 0.6),
      0 0 30px rgba(0, 255, 255, 0.4),
      0 0 40px rgba(0, 255, 255, 0.2);
  }
  50% {
    text-shadow: 
      0 0 20px rgba(0, 255, 255, 1),
      0 0 30px rgba(0, 255, 255, 0.8),
      0 0 40px rgba(0, 255, 255, 0.6),
      0 0 50px rgba(0, 255, 255, 0.4),
      0 0 60px rgba(0, 255, 255, 0.2);
  }
}

@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  }
  50% {
    border-color: rgba(0, 255, 255, 1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6);
  }
}

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

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Futuristic Glow Effects */
.glow-gold {
  text-shadow: 0 0 10px rgba(241, 196, 15, 0.5),
               0 0 20px rgba(241, 196, 15, 0.3),
               0 0 30px rgba(241, 196, 15, 0.2);
}

.glow-cyan {
  text-shadow: 
    0 0 10px rgba(0, 255, 255, 0.8),
    0 0 20px rgba(0, 255, 255, 0.6),
    0 0 30px rgba(0, 255, 255, 0.4),
    0 0 40px rgba(0, 255, 255, 0.2);
  animation: glow 2s ease-in-out infinite;
}

.glow-purple {
  text-shadow: 
    0 0 10px rgba(138, 43, 226, 0.8),
    0 0 20px rgba(138, 43, 226, 0.6),
    0 0 30px rgba(138, 43, 226, 0.4);
}

/* Futuristic Card Effects */
.glass-card {
  background: rgba(7, 55, 99, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.37),
    inset 0 0 20px rgba(0, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 255, 255, 0.05),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

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

.glass-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 
    0 15px 50px rgba(0, 255, 255, 0.3),
    0 0 30px rgba(0, 255, 255, 0.2),
    inset 0 0 30px rgba(0, 255, 255, 0.1);
}

/* Neon Border Effect */
.neon-border {
  border: 2px solid rgba(0, 255, 255, 0.5);
  box-shadow: 
    0 0 10px rgba(0, 255, 255, 0.3),
    inset 0 0 10px rgba(0, 255, 255, 0.1);
  animation: borderGlow 2s ease-in-out infinite;
}

/* Holographic Effect */
.holographic {
  position: relative;
  background: linear-gradient(
    45deg,
    rgba(0, 255, 255, 0.1) 0%,
    rgba(138, 43, 226, 0.1) 50%,
    rgba(241, 196, 15, 0.1) 100%
  );
  background-size: 200% 200%;
  animation: holographicShift 5s ease infinite;
}

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

/* Language selector custom style */
#language-selector {
  /* Dark blue gradient background matching the navigation */
  background: linear-gradient(135deg, #073763 0%, #0D47A1 100%) !important;
  /* Neon cyan dropdown arrow for better visibility */
  background-image: linear-gradient(135deg, #073763 0%, #0D47A1 100%), 
                    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2300FFFF' d='M8 11L3 6h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: 0 0, right 12px center;
  padding-right: 40px;
  appearance: none;
  /* Enhanced border and glow for visibility */
  border: 2px solid rgba(0, 255, 255, 0.6) !important;
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 15px rgba(0, 255, 255, 0.3),
    inset 0 0 10px rgba(0, 255, 255, 0.05);
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: white !important;
}

#language-selector:hover {
  border-color: rgba(0, 255, 255, 1) !important;
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(0, 255, 255, 0.5),
    inset 0 0 15px rgba(0, 255, 255, 0.1);
  transform: translateY(-2px);
}

#language-selector:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 1) !important;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(0, 255, 255, 0.6),
    inset 0 0 20px rgba(0, 255, 255, 0.15);
}

#language-selector option {
  background: #073763;
  color: white;
  padding: 10px;
  font-weight: 600;
}

/* Futuristic Chapter Selector */
#chapter-selector {
  background: linear-gradient(135deg, rgba(7, 55, 99, 0.9) 0%, rgba(10, 61, 98, 0.9) 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%2300FFFF' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 45px;
  appearance: none;
  border: 2px solid rgba(0, 255, 255, 0.4);
  box-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 255, 255, 0.2),
    inset 0 0 15px rgba(0, 255, 255, 0.05);
  transition: all 0.3s ease;
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.5px;
}

#chapter-selector:hover {
  border-color: rgba(0, 255, 255, 0.7);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(0, 255, 255, 0.4),
    inset 0 0 20px rgba(0, 255, 255, 0.1);
  transform: translateY(-2px);
}

#chapter-selector:focus {
  outline: none;
  border-color: rgba(0, 255, 255, 1);
  box-shadow: 
    0 0 0 3px rgba(0, 255, 255, 0.3),
    0 0 40px rgba(0, 255, 255, 0.5),
    inset 0 0 25px rgba(0, 255, 255, 0.15);
}

#chapter-selector option {
  background-color: #073763;
  color: white;
  padding: 10px;
  font-family: 'Exo 2', sans-serif;
}

#chapter-selector optgroup {
  background-color: #0A3D62;
  color: #00FFFF;
  font-weight: bold;
  font-style: normal;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Video container responsiveness */
.aspect-video {
  aspect-ratio: 16 / 9;
}

/* Futuristic Typography */
h1, h2, h3 {
  font-family: 'Orbitron', 'Exo 2', sans-serif;
  letter-spacing: 2px;
  font-weight: 700;
}

/* Neon Button Styles */
.btn-neon {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2) 0%, rgba(138, 43, 226, 0.2) 100%);
  border: 2px solid rgba(0, 255, 255, 0.6);
  color: #00FFFF;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
  box-shadow: 
    0 0 15px rgba(0, 255, 255, 0.4),
    inset 0 0 15px rgba(0, 255, 255, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-neon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(0, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-neon:hover::before {
  width: 300px;
  height: 300px;
}

.btn-neon:hover {
  border-color: rgba(0, 255, 255, 1);
  box-shadow: 
    0 0 25px rgba(0, 255, 255, 0.6),
    0 0 50px rgba(0, 255, 255, 0.4),
    inset 0 0 25px rgba(0, 255, 255, 0.2);
  transform: translateY(-3px);
  text-shadow: 0 0 15px rgba(0, 255, 255, 1);
}

/* Glowing Icons */
.icon-glow {
  filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.8));
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 255, 255, 0.8)); }
  50% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 1)); }
}

/* Scan Line Effect */
.scanline {
  position: relative;
  overflow: hidden;
}

.scanline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.8), transparent);
  animation: scan 3s linear infinite;
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(3000%); }
}

/* Social Media Link Styles */
.social-link {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.social-link:hover::before {
  width: 200px;
  height: 200px;
}

.social-link i {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.social-link:hover i {
  transform: scale(1.2) rotateY(360deg);
}

.social-link span {
  position: relative;
  z-index: 1;
}

/* Responsive grid improvements */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  body::after {
    background-size: 30px 30px;
  }
  
  /* Social media grid on mobile */
  #social-media .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}