/* ========== Theme System ========== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --hover-bg: #fff7ed;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

body.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --hover-bg: rgba(255, 107, 0, 0.1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
}

* {
  font-family: "Vazirmatn FD NL", "Vazirmatn", system-ui, sans-serif;
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(2deg);
  }
}

@keyframes floatReverse {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(15px) rotate(-2deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(255, 107, 0, 0.4);
  }

  50% {
    box-shadow:
      0 0 30px rgba(255, 107, 0, 0.9),
      0 0 20px rgba(232, 62, 140, 0.6);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200%;
  }

  100% {
    background-position: 200%;
  }
}

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.float-animation {
  animation: float 5s ease-in-out infinite;
}

.float-reverse {
  animation: floatReverse 6s ease-in-out infinite;
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.shimmer-bg {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.spin-slow {
  animation: spin-slow 20s linear infinite;
}

.theme-transition {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Scroll Animations */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Cards */
.feature-card,
.category-card,
.testimonial-card,
.winner-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
}

.feature-card:hover,
.category-card:hover,
.testimonial-card:hover,
.winner-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.faq-item {
  transition: all 0.3s ease;
}

.faq-question {
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-question:hover {
  color: #ff6b00;
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    padding 0.3s ease;
  padding: 0 1.25rem;
}

.faq-answer.active {
  max-height: 300px;
  opacity: 1;
  padding: 0 1.25rem 1.25rem 1.25rem;
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--border-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b00, #e83e8c);
  border-radius: 10px;
}

.gradient-text {
  background: linear-gradient(135deg, #ff6b00, #e83e8c, #6c2bd9, #00d4ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s ease infinite;
}

.gradient-border {
  position: relative;
}

.gradient-border::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ff6b00, #e83e8c, #6c2bd9);
  transform: scaleX(0);
  transition: transform 0.5s ease;
  transform-origin: right;
}

.gradient-border:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.counter {
  display: inline-block;
  min-width: 60px;
  text-align: center;
}
