@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
  --bg-color: #f8f6f0;
  --text-color: #1c1917;
  --card-bg: #ffffff;
  --card-border: #e7e5e4;
  --neon-color: rgba(245, 158, 11, 0.2);
  --neon-hover: rgba(245, 158, 11, 0.6);
  --gold-accent: #f59e0b;
}

.dark {
  --bg-color: #0f1115;
  --text-color: #fdfbf7;
  --card-bg: #18181b;
  --card-border: #27272a;
  --neon-color: rgba(251, 191, 36, 0.2);
  --neon-hover: rgba(251, 191, 36, 0.5);
  --gold-accent: #fbbf24;
}

body {
  font-family: 'Tajawal', sans-serif;
  color: var(--text-color);
  transition: color 0.3s ease;
  background-color: transparent;
}

/* Neon Glow Effect on Cards */
.link-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 10px var(--neon-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.link-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 10px 25px var(--neon-hover);
  border-color: rgba(251, 191, 36, 0.4);
}

/* Animated Gradient Background */
.animated-bg-container {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(135deg, #fef3c7, #f8f6f0, #fde68a);
  background-size: 400% 400%;
  animation: bgGradient 15s ease infinite;
  transition: background 0.5s ease;
}
.dark .animated-bg-container {
  background: linear-gradient(135deg, #0f1115, #1e1b29, #231f20);
}
@keyframes bgGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Background Image (GIF) */
.bg-video {
  display: block;
  opacity: 1;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

@media (max-width: 768px) {
  .bg-video {
    opacity: 1; /* Ensure opacity stays 1 on mobile too */
  }
}

/* Blur Overlay for readability */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(2px);
  transition: background 0.5s ease;
}
.dark .bg-overlay {
  background: rgba(15, 17, 21, 0.4);
}

/* Profile Card Animations */
@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-fade-slide-up {
  animation: fadeSlideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Desktop Hover for Profile Card */
@media (min-width: 768px) {
  .profile-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px var(--neon-hover);
    border-color: rgba(251, 191, 36, 0.4);
  }
}

/* Continuous Very Slow Tilt for Avatar */
@keyframes slowTilt {
  0% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
  100% { transform: rotate(-3deg); }
}
@keyframes hoverTilt {
  0% { transform: rotate(-6deg) scale(1.05); }
  50% { transform: rotate(6deg) scale(1.05); }
  100% { transform: rotate(-6deg) scale(1.05); }
}

.profile-avatar-container {
  animation: slowTilt 8s ease-in-out infinite;
  transition: box-shadow 0.3s ease;
}

.profile-avatar-container:hover {
  animation: hoverTilt 4s ease-in-out infinite;
  box-shadow: 0 0 25px var(--neon-hover);
}

/* Share Icon Animation */
@keyframes glowScale {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0)); }
  50% { transform: scale(1.2); filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8)); color: var(--gold-accent);}
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(245, 158, 11, 0)); }
}
.animate-glow-scale {
  animation: glowScale 0.6s ease;
}

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  opacity: 0;
  background: var(--card-bg);
  color: var(--text-color);
  padding: 12px 24px;
  border-radius: 99px;
  box-shadow: 0 4px 15px var(--neon-color);
  border: 1px solid var(--card-border);
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer Hover Neon */
.footer-name {
  transition: text-shadow 0.3s ease, color 0.3s ease;
  cursor: pointer;
}
.footer-name:hover {
  color: var(--gold-accent);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
}

/* Lenis Recommended CSS */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Admin specific styles */
.modal {
  display: none;
}
.modal.active {
  display: flex;
}
