@import "tailwindcss";

/* Import distinctive fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-emerald-400: #34d399;
  --color-emerald-500: #10b981;
  --color-amber-400: #fbbf24;
  --color-amber-500: #f59e0b;
  --color-rose-500: #f43f5e;
  --color-cyan-400: #22d3ee;
  --color-cyan-500: #06b6d4;
}

/* Base styles */
html {
  font-family: 'Outfit', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: linear-gradient(135deg, var(--color-slate-950) 0%, var(--color-slate-900) 50%, #0c1929 100%);
  min-height: 100vh;
  color: var(--color-slate-200);
  position: relative;
}

/* Subtle noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.015;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Mono font for numbers */
.font-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}

/* Animated gradient background */
.animated-gradient {
  background: linear-gradient(-45deg, var(--color-slate-900), #0c1929, var(--color-slate-950), #091318);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Glass morphism card */
.glass-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 1.5rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.3),
    0 2px 4px -2px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.glass-card-light {
  background: rgba(241, 245, 249, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1.5rem;
}

/* Rate display with glow */
.rate-display {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 0 40px currentColor;
}

.rate-display-green {
  color: var(--color-emerald-400);
  text-shadow: 0 0 60px rgba(52, 211, 153, 0.5);
}

.rate-display-amber {
  color: var(--color-amber-400);
  text-shadow: 0 0 60px rgba(251, 191, 36, 0.5);
}

.rate-display-rose {
  color: var(--color-rose-500);
  text-shadow: 0 0 60px rgba(244, 63, 94, 0.5);
}

/* Glowing border animation */
.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1.75rem;
  background: linear-gradient(45deg, var(--color-cyan-500), var(--color-emerald-500), var(--color-cyan-400));
  background-size: 200% 200%;
  animation: border-glow 3s ease infinite;
  z-index: -1;
  opacity: 0.6;
}

@keyframes border-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Input styles */
.input-dark {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--color-slate-100);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.input-dark:focus {
  outline: none;
  border-color: var(--color-cyan-500);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.input-dark::placeholder {
  color: var(--color-slate-500);
}

/* Button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--color-emerald-500), var(--color-cyan-500));
  color: var(--color-slate-950);
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--color-slate-200);
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(100, 116, 139, 0.3);
  border-color: rgba(148, 163, 184, 0.5);
}

/* Status badges */
.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-paused {
  background: rgba(100, 116, 139, 0.15);
  color: var(--color-slate-400);
  border: 1px solid rgba(100, 116, 139, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Table styles */
.table-dark {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-dark th {
  background: rgba(15, 23, 42, 0.6);
  color: var(--color-slate-400);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.table-dark th:first-child {
  border-radius: 1rem 0 0 0;
}

.table-dark th:last-child {
  border-radius: 0 1rem 0 0;
}

.table-dark td {
  padding: 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  color: var(--color-slate-200);
}

.table-dark tr:last-child td {
  border-bottom: none;
}

.table-dark tr:last-child td:first-child {
  border-radius: 0 0 0 1rem;
}

.table-dark tr:last-child td:last-child {
  border-radius: 0 0 1rem 0;
}

.table-dark tbody tr {
  transition: background 0.2s ease;
}

.table-dark tbody tr:hover {
  background: rgba(148, 163, 184, 0.05);
}

/* Floating shapes decoration */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  pointer-events: none;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--color-cyan-500);
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--color-emerald-500);
  bottom: 10%;
  left: -50px;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: var(--color-amber-500);
  top: 40%;
  right: 5%;
}

/* Animated entry */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in-up 0.8s ease forwards;
}

.animate-delay-100 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-300 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-400 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-500 { animation-delay: 0.5s; opacity: 0; }

/* Pulse animation for live indicator */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px currentColor; }
  50% { opacity: 0.6; box-shadow: 0 0 20px currentColor; }
}

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

/* Number counter animation placeholder */
.counter-animate {
  transition: all 0.5s ease-out;
}

/* Select styling */
select.input-dark {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
}

/* Flash message styles */
.flash-notice {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-emerald-400);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
}

.flash-alert,
.flash-error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--color-rose-500);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
}

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

::-webkit-scrollbar-track {
  background: var(--color-slate-900);
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate-600);
}
