@import 'tailwindcss';
@import 'plyr/dist/plyr.css';

/* Enable class-based dark mode (toggled on <html class="dark">). */
@custom-variant dark (&:where(.dark, .dark *));

@theme {
  --color-brand-50: #eef2ff;
  --color-brand-100: #e0e7ff;
  --color-brand-200: #c7d2fe;
  --color-brand-300: #a5b4fc;
  --color-brand-400: #818cf8;
  --color-brand-500: #6366f1;
  --color-brand-600: #4f46e5;
  --color-brand-700: #4338ca;
  --color-brand-800: #3730a3;
  --color-brand-900: #312e81;
}

:root {
  color-scheme: light dark;
  /* Overridable brand color from admin settings. */
  --brand: #6366f1;
  --plyr-color-main: var(--brand);
}

html,
body,
#root {
  height: 100%;
}

body {
  @apply bg-gray-50 text-gray-900 antialiased dark:bg-gray-950 dark:text-gray-100;
}

/* Hide scrollbars on horizontal chip rows while keeping scroll. */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Marquee animation */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.animate-marquee {
  animation: marquee-scroll linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* Skeleton shimmer */
@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

/* ---------- Pro design utilities ---------- */

/* Brand gradient (derived from the admin-configurable --brand color). */
.bg-brand-gradient {
  background-image: linear-gradient(
    135deg,
    var(--brand),
    color-mix(in srgb, var(--brand) 55%, #8b5cf6)
  );
}
.text-gradient {
  background: linear-gradient(
    90deg,
    var(--brand),
    color-mix(in srgb, var(--brand) 45%, #ec4899)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Pulsing dot for LIVE badges. */
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}
.animate-pulse-dot {
  animation: pulse-dot 1.3s ease-in-out infinite;
}

/* Fade-up entrance for cards/sections. */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-up {
  animation: fade-up 0.35s ease both;
}

/* Slim, rounded scrollbar (WebKit). */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgb(148 163 184 / 0.35);
  border-radius: 9999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgb(148 163 184 / 0.6);
}

/* Consistent focus ring for keyboard users. */
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}
