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

@layer base {
  :root {
    --background: 0 0% 3%;
    --foreground: 0 0% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 142.1 76.2% 36.3%;
    --primary-foreground: 355.7 100% 97.3%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 142.1 76.2% 36.3%;
    --radius: 0.5rem;
  }

  * {
    border-color: hsl(var(--border));
  }

  body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-feature-settings: "rlig" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  @apply bg-dark-900;
}

::-webkit-scrollbar-thumb {
  @apply bg-dark-700 rounded-full;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-dark-600;
}

/* Trading chart styles */
.tv-lightweight-charts {
  border-radius: 0.75rem;
  overflow: hidden;
}

/* Gradient text */
.gradient-text {
  @apply bg-gradient-to-r from-brand-400 via-brand-500 to-emerald-500 bg-clip-text text-transparent;
}

/* Animated background */
.animated-gradient-bg {
  background: linear-gradient(-45deg, #0f172a, #1e3a5f, #0f4c3a, #1e3a5f);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

/* Card glow effect */
.card-glow {
  @apply relative;
}

.card-glow::before {
  content: '';
  @apply absolute -inset-0.5 bg-gradient-to-r from-brand-500/20 to-emerald-500/20 rounded-xl blur-lg opacity-0 transition-opacity duration-300;
}

.card-glow:hover::before {
  @apply opacity-100;
}

/* Profit/Loss colors */
.text-profit {
  @apply text-green-500;
}

.text-loss {
  @apply text-red-500;
}

.bg-profit {
  @apply bg-green-500/10;
}

.bg-loss {
  @apply bg-red-500/10;
}

/* Loading animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  @apply bg-dark-800 animate-pulse rounded;
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Number formatting */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}
