@tailwind base;
@tailwind components;
@tailwind utilities;

/* Dark Theme Colors */
:root {
  --color-primary: #1E40AF; /* Navy Blue */
  --color-secondary: #F59E0B; /* Amber-500 */
  --color-accent: #10B981; /* Emerald-500 */
  --color-background: #111827; /* Gray-900 */
  --color-text: #F9FAFB; /* Gray-50 */
  --color-card: #1F2937; /* Gray-800 */
  --color-border: #374151; /* Gray-700 */
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #10b981 #111827;
}

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease-out;
}

/* Additional animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

.animate-slideInUp {
  animation: slideInUp 0.8s ease-out;
}

.animate-slideInDown {
  animation: slideInDown 0.8s ease-out;
}

.animate-scaleIn {
  animation: scaleIn 0.6s ease-out;
}

.animate-rotateIn {
  animation: rotateIn 0.8s ease-out;
}

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

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

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Gradient text animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Scrollbar styling */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #10b981 0%, #0ea5e9 100%);
  border-radius: 999px;
  border: 2px solid #111827;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #34d399 0%, #38bdf8 100%);
}

/* Loading animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

@keyframes swipeHint {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(6px);
    opacity: 1;
  }
}

.swipe-hint-icon {
  animation: swipeHint 1.3s ease-in-out infinite;
}

@keyframes dividerScan {
  0% {
    background-position: -200% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.section-divider-scan {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(16, 185, 129, 0) 35%,
    rgba(16, 185, 129, 0.9) 50%,
    rgba(16, 185, 129, 0) 65%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: dividerScan 4.5s linear infinite;
}

.section-divider-grid {
  background-image: radial-gradient(circle, rgba(107, 114, 128, 0.4) 0.75px, transparent 0.75px);
  background-size: 12px 12px;
  mask-image: linear-gradient(to bottom, transparent, black 28%, black 72%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .section-divider-scan {
    animation: none;
  }

  .swipe-hint-icon {
    animation: none;
  }
}

.scroll-progress-wrap {
  height: 3px;
}

.scroll-progress-bar {
  height: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #34d399 0%, #0ea5e9 60%, #60a5fa 100%);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.55);
  transition: transform 120ms linear;
}

.scroll-top-btn {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
}

.scroll-top-btn:hover {
  border-color: #34d399;
  color: #ffffff;
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress-bar {
    transition: none;
  }

  .scroll-top-btn {
    transition: opacity 200ms linear;
    transform: none;
  }

  .scroll-top-btn:hover {
    transform: none;
  }
}