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

@layer base {
  :root {
    --color-bg-primary: #0B0E14;
    --color-bg-secondary: #121826;
    --color-bg-card: #1A2234;
    --color-brand: #7B3FE4;
    --color-brand-light: #9B5FF4;
    --color-accent: #F2C94C;
    --color-success: #27AE60;
    --color-alert: #EB5757;
    --color-text-primary: #F5F5F7;
    --color-text-secondary: #A0AEC0;
    --color-text-muted: #64748B;
    --font-ui: 'Inter', 'Manrope', system-ui, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-ui);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  ::selection {
    background: rgba(123, 63, 228, 0.4);
    color: #fff;
  }
}

@layer components {
  .container-vox {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
  }

  @media (min-width: 640px) {
    .container-vox { padding: 0 1.5rem; }
  }

  @media (min-width: 1024px) {
    .container-vox { padding: 0 2rem; }
  }

  .glass-card {
    background: rgba(26, 34, 52, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
  }

  .glow-brand {
    box-shadow: 0 0 40px rgba(123, 63, 228, 0.3), 0 0 80px rgba(123, 63, 228, 0.1);
  }

  .glow-accent {
    box-shadow: 0 0 30px rgba(242, 201, 76, 0.2);
  }

  .btn-primary {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-light) 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    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.2), transparent);
    transition: left 0.5s ease;
  }

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

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(123, 63, 228, 0.4);
  }

  .btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-primary);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
  }

  .btn-outline:hover {
    border-color: var(--color-brand);
    color: var(--color-brand-light);
    background: rgba(123, 63, 228, 0.1);
  }

  .gradient-text {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-grid {
    background-image: 
      linear-gradient(rgba(123, 63, 228, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(123, 63, 228, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  .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 rgba(0, 0, 0, 0.3);
  }

  .focus-ring:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
  }

  .skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-brand);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
  }

  .skip-link:focus {
    top: 0;
  }

  .animate-shine {
    animation: shine 3s infinite;
  }

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

  .slot-reel {
    animation: reel-spin 0.5s ease-in-out;
  }

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

  .confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color-accent);
    animation: confetti-fall 3s ease-out forwards;
  }

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

  .provider-logo {
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.3s ease;
  }

  .provider-logo:hover {
    filter: grayscale(0%) opacity(1);
  }

  .game-card {
    aspect-ratio: 3/4;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
  }

  .game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 14, 20, 0.9) 0%, transparent 50%);
  }

  .rtp-badge {
    background: rgba(39, 174, 96, 0.2);
    color: var(--color-success);
    border: 1px solid rgba(39, 174, 96, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s ease;
  }

  .cookie-banner.active {
    transform: translateY(0);
  }
}

@layer utilities {
  .text-balance {
    text-wrap: balance;
  }
}
