@import 'tailwindcss';
@import 'tw-animate-css';
@import 'shadcn/tailwind.css';

@custom-variant dark (&:is(.dark *));

@theme inline {
  --font-heading: var(--font-orbitron);
  --font-sans: var(--font-rajdhani), ui-sans-serif, system-ui, sans-serif;
  --font-mono: var(--font-orbitron), ui-monospace, monospace;
  --font-display: var(--font-orbitron);

  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);

  /* Cosmic palette */
  --color-cosmic-bg: #030712;
  --color-glow-primary: #00e5ff;
  --color-glow-secondary: #7c3aed;
  --color-gold: #ffd700;
  --color-white: #f8fafc;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
}

:root {
  --radius: 0.75rem;
  --background: #030712;
  --foreground: #f8fafc;
  --card: rgba(15, 23, 42, 0.45);
  --card-foreground: #f8fafc;
  --popover: #0b1220;
  --popover-foreground: #f8fafc;
  --primary: #00e5ff;
  --primary-foreground: #030712;
  --secondary: #7c3aed;
  --secondary-foreground: #f8fafc;
  --muted: rgba(148, 163, 184, 0.12);
  --muted-foreground: #94a3b8;
  --accent: #ffd700;
  --accent-foreground: #030712;
  --destructive: #ef4444;
  --border: rgba(0, 229, 255, 0.18);
  --input: rgba(148, 163, 184, 0.2);
  --ring: #00e5ff;
}

.dark {
  --background: #030712;
  --foreground: #f8fafc;
  --card: rgba(15, 23, 42, 0.45);
  --card-foreground: #f8fafc;
  --popover: #0b1220;
  --popover-foreground: #f8fafc;
  --primary: #00e5ff;
  --primary-foreground: #030712;
  --secondary: #7c3aed;
  --secondary-foreground: #f8fafc;
  --muted: rgba(148, 163, 184, 0.12);
  --muted-foreground: #94a3b8;
  --accent: #ffd700;
  --accent-foreground: #030712;
  --destructive: #ef4444;
  --border: rgba(0, 229, 255, 0.18);
  --input: rgba(148, 163, 184, 0.2);
  --ring: #00e5ff;
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
    overflow-x: hidden;
  }
  html {
    @apply font-sans;
    -webkit-font-smoothing: antialiased;
  }
}

@layer utilities {
  .font-display {
    font-family: var(--font-orbitron), ui-monospace, monospace;
  }

  .glass {
    background: linear-gradient(
      160deg,
      rgba(15, 23, 42, 0.55),
      rgba(3, 7, 18, 0.35)
    );
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 229, 255, 0.14);
    box-shadow:
      0 0 0 1px rgba(0, 229, 255, 0.04),
      inset 0 1px 0 rgba(248, 250, 252, 0.06),
      0 18px 40px -20px rgba(0, 0, 0, 0.9);
  }

  .glass-hover {
    transition:
      transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
      border-color 0.4s ease,
      box-shadow 0.4s ease;
  }

  .glass-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 229, 255, 0.45);
    box-shadow:
      0 0 30px -6px rgba(0, 229, 255, 0.35),
      inset 0 1px 0 rgba(248, 250, 252, 0.1),
      0 24px 50px -20px rgba(0, 0, 0, 0.9);
  }

  .text-glow-primary {
    text-shadow:
      0 0 8px rgba(0, 229, 255, 0.6),
      0 0 24px rgba(0, 229, 255, 0.3);
  }

  .text-glow-gold {
    text-shadow:
      0 0 8px rgba(255, 215, 0, 0.6),
      0 0 24px rgba(255, 215, 0, 0.25);
  }

  .text-glow-danger {
    text-shadow:
      0 0 8px rgba(239, 68, 68, 0.6),
      0 0 20px rgba(239, 68, 68, 0.3);
  }

  .tracking-cosmic {
    letter-spacing: 0.28em;
  }

  @keyframes spin-slow {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes spin-reverse {
    to {
      transform: rotate(-360deg);
    }
  }

  @keyframes pulse-glow {
    0%,
    100% {
      opacity: 0.55;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.04);
    }
  }

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