@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/GeistMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/GeistMono-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'BricolageGrotesque';
  src: url('../fonts/BricolageGrotesque-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'BricolageGrotesque';
  src: url('../fonts/BricolageGrotesque-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/Outfit-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../fonts/Outfit-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg-primary: #09090b;
  --bg-secondary: #18181b;
  --bg-tertiary: #27272a;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(6, 182, 212, 0.3);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-soft: rgba(6, 182, 212, 0.1);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.font-mono {
  font-family: 'Geist Mono', monospace;
}

.font-display {
  font-family: 'BricolageGrotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

@layer utilities {
  .glass-card {
    backdrop-filter: blur(12px);
    background: rgba(24, 24, 27, 0.8);
    border: 1px solid var(--border-color);
  }

  .glass-card-dark {
    backdrop-filter: blur(16px);
    background: rgba(9, 9, 11, 0.7);
    border: 1px solid var(--border-color);
  }

  .text-gradient {
    background: linear-gradient(135deg, #22d3ee 0%, #10b981 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .bg-gradient-hero {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  }

  .bg-gradient-card {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  }

  .glow-border {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
  }

  .glow-text {
    text-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
  }

  .animate-bounce-dot {
    animation: bounceDot 1.4s infinite ease-in-out both;
  }

  .animate-bounce-dot:nth-child(1) { animation-delay: -0.32s; }
  .animate-bounce-dot:nth-child(2) { animation-delay: -0.16s; }
  .animate-bounce-dot:nth-child(3) { animation-delay: 0s; }

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

  .animate-slide-up {
    animation: slideUp 0.3s ease-out forwards;
  }

  .animate-slide-up-delayed {
    animation: slideUp 0.3s ease-out 0.1s forwards;
    opacity: 0;
  }

  .animate-slide-down {
    animation: slideDown 0.3s ease-out forwards;
  }

  .animate-slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
  }

  .animate-fade-scale {
    animation: fadeScale 0.2s ease-out forwards;
  }

  .animate-number-roll {
    animation: numberRoll 0.8s ease-out forwards;
  }

  .animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .animate-ring-progress {
    animation: ringProgress 1s ease-out forwards;
  }

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

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

  .animate-glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
  }

  .animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
  }

  .card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
    border-color: var(--border-hover);
  }

  .card-hover:active {
    transform: translateY(-2px);
  }

  .btn-hover {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-hover:hover {
    transform: translateY(-2px);
  }

  .btn-hover:active {
    transform: translateY(0);
  }

  .tag-hover {
    transition: all 0.2s ease-out;
  }

  .tag-hover:hover {
    transform: scale(1.05);
    background: var(--accent-soft);
  }

  .ai-recommendation {
    border-left: 3px solid var(--accent);
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
  }

  .skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s infinite;
  }

  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

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

  .focus-ring {
    outline: none;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
  }

  .btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
    color: white;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }

  .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
  }

  .btn-primary:hover::before {
    left: 100%;
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
  }

  .btn-primary:active {
    transform: translateY(0);
  }

  .btn-ai {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
  }

  .btn-ai::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
  }

  .btn-ai:hover::before {
    left: 100%;
  }

  .btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
  }

  .btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
  }

  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 8px 0 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  .gradient-text-ai {
    background: linear-gradient(135deg, #22d3ee 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .input-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.2s ease;
  }

  .input-dark:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--bg-tertiary);
  }

  .input-dark::placeholder {
    color: var(--text-muted);
  }

  .card-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .badge-dark {
    background: var(--accent-soft);
    color: var(--accent-light);
    border: 1px solid var(--border-hover);
  }

  .divider-dark {
    background: var(--border-color);
  }

  .particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
  }

  .dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
      radial-gradient(ellipse at center, rgba(6, 182, 212, 0.08) 0%, transparent 60%),
      linear-gradient(180deg, rgba(9, 9, 11, 0.3) 0%, rgba(9, 9, 11, 0.6) 50%, rgba(9, 9, 11, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
  }

  .content-layer {
    position: relative;
    z-index: 10;
  }

  .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatOrb 20s ease-in-out infinite;
    pointer-events: none;
  }

  .grid-bg {
    background-image:
      linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  .scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
    animation: scanLine 4s linear infinite;
    pointer-events: none;
  }
}

@keyframes bounceDot {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes numberRoll {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes ringProgress {
  from {
    stroke-dashoffset: 100%;
  }
}

@keyframes confetti {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(720deg);
    opacity: 0;
  }
}

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

@keyframes glowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(6, 182, 212, 0.8));
  }
}

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

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

@keyframes scanLine {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
