/* ========== Theme System With Root ========== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --hover-bg: #fff7ed;
}

body.dark {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --hover-bg: rgba(255, 107, 0, 0.1);
}

* {
  font-family: "Vazirmatn FD NL", "Vazirmatn", system-ui, sans-serif;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ===== NEW SMOOTH INFINITE SHINE WITHOUT CUT ===== */
@keyframes shineInfinite {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes borderGlow {
  0%,
  100% {
    border-color: rgba(255, 107, 0, 0.3);
  }
  50% {
    border-color: rgba(232, 62, 140, 0.6);
  }
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

/* improved shine effect - infinite loop without restart lag */
.shine-effect {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  background-size: 200% 100%;
  animation: shineInfinite 3.5s ease-in-out infinite;
  pointer-events: none;
}

body.dark .shine-effect {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  background-size: 200% 100%;
}

.border-glow {
  animation: borderGlow 3s ease-in-out infinite;
}

.theme-transition {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.social-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-card:hover {
  transform: translateY(-3px) scale(1.05);
}

.footer-link {
  position: relative;
  display: inline-block;
}

.footer-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b00, #e83e8c);
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
  left: 0;
  right: auto;
}

/* ========== BADGE STYLE DOWNLOAD (FIXED BORDERS, BETTER LAYOUT) ========== */
.download-badge {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(2px);
  border-width: 1.5px;
  border-style: solid;
}

.download-badge:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.15);
}

.download-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.download-badge:hover::before {
  left: 100%;
}

.badge-icon-pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--border-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b00, #e83e8c);
  border-radius: 10px;
}

/* Download Section Responsive with fixed spacing */
@media (max-width: 768px) {
  .download-badge {
    padding: 10px 14px !important;
  }
  .download-badge i {
    font-size: 20px !important;
  }
  .download-badge .badge-text {
    font-size: 12px !important;
  }
  .download-badge .badge-sub {
    font-size: 9px !important;
  }
  .badge-tag {
    font-size: 8px !important;
    padding: 2px 6px !important;
    top: -8px !important;
    right: -8px !important;
  }
}

/* improved badge tag style */
.badge-tag {
  position: absolute;
  top: -10px;
  right: -10px;
  font-weight: bold;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  z-index: 5;
}

/* Android badge border fix for light/dark mode */
.android-badge {
  background: linear-gradient(
    135deg,
    rgba(61, 220, 132, 0.08),
    rgba(61, 220, 132, 0.02)
  );
  border-color: rgba(61, 220, 132, 0.5);
}

body.dark .android-badge {
  background: linear-gradient(
    135deg,
    rgba(61, 220, 132, 0.15),
    rgba(61, 220, 132, 0.05)
  );
  border-color: rgba(61, 220, 132, 0.6);
}

.webbadge-badge {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 0, 0.08),
    rgba(232, 62, 140, 0.04)
  );
  border-color: rgba(255, 107, 0, 0.45);
}

body.dark .webbadge-badge {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 0, 0.2),
    rgba(232, 62, 140, 0.08)
  );
  border-color: rgba(255, 107, 0, 0.6);
}

.download-badge .icon-gradient-android {
  background: linear-gradient(145deg, #3ddc84, #1f8b4c);
}

.download-badge .icon-gradient-web {
  background: linear-gradient(145deg, #ff6b00, #e83e8c);
}

.badge-text-primary {
  color: var(--text-primary);
}

.badge-text-muted {
  color: var(--text-muted);
}
