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

/* Base styles */
@layer base {
  html {
    @apply scroll-smooth;
  }

  body {
    @apply bg-gray-900 text-gray-100 antialiased;
  }

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

  ::-webkit-scrollbar-track {
    @apply bg-gray-800;
  }

  ::-webkit-scrollbar-thumb {
    @apply bg-gray-600 rounded-full;
  }

  ::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-500;
  }
}

/* Component styles */
@layer components {
  /* Buttons */
  .btn {
    @apply px-4 py-2 rounded-lg font-medium transition-colors duration-200
           disabled:opacity-50 disabled:cursor-not-allowed;
  }

  .btn-primary {
    @apply bg-primary-600 hover:bg-primary-700 text-white;
  }

  .btn-secondary {
    @apply bg-gray-700 hover:bg-gray-600 text-white;
  }

  .btn-outline {
    @apply border border-gray-600 hover:bg-gray-800 text-gray-300;
  }

  .btn-danger {
    @apply bg-red-600 hover:bg-red-700 text-white;
  }

  .btn-success {
    @apply bg-green-600 hover:bg-green-700 text-white;
  }

  /* Cards */
  .card {
    @apply bg-gray-800 rounded-xl border border-gray-700 p-6;
  }

  /* Form inputs */
  .input {
    @apply w-full px-4 py-2 bg-gray-800 border border-gray-700 rounded-lg
           text-gray-100 placeholder-gray-500
           focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent
           transition-colors duration-200;
  }

  .input-error {
    @apply border-red-500 focus:ring-red-500;
  }

  .label {
    @apply block text-sm font-medium text-gray-300 mb-1;
  }

  .error-text {
    @apply text-sm text-red-500 mt-1;
  }

  /* Tables */
  .table-container {
    @apply overflow-x-auto rounded-lg border border-gray-700;
  }

  .table {
    @apply w-full text-sm text-left;
  }

  .table thead {
    @apply bg-gray-800 text-gray-400 uppercase text-xs;
  }

  .table th {
    @apply px-6 py-3;
  }

  .table td {
    @apply px-6 py-4 border-t border-gray-700;
  }

  .table tbody tr {
    @apply hover:bg-gray-800/50 transition-colors;
  }

  /* Status badges */
  .badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
  }

  .badge-success {
    @apply bg-green-900/50 text-green-400 border border-green-800;
  }

  .badge-warning {
    @apply bg-yellow-900/50 text-yellow-400 border border-yellow-800;
  }

  .badge-danger {
    @apply bg-red-900/50 text-red-400 border border-red-800;
  }

  .badge-info {
    @apply bg-blue-900/50 text-blue-400 border border-blue-800;
  }

  .badge-neutral {
    @apply bg-gray-700 text-gray-300 border border-gray-600;
  }

  /* Trading specific */
  .price-up {
    @apply text-green-400;
  }

  .price-down {
    @apply text-red-400;
  }

  .price-neutral {
    @apply text-gray-400;
  }
}

/* Utilities */
@layer utilities {
  /* Animation utilities */
  .animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  /* Gradient text */
  .gradient-text {
    @apply bg-clip-text text-transparent bg-gradient-to-r from-primary-400 to-primary-600;
  }
}
