@import "tailwindcss";

@theme inline {
  --color-bg: var(--pt-bg);
  --color-bg-elevated: var(--pt-bg-elevated);
  --color-surface: var(--pt-surface);
  --color-surface-hover: var(--pt-surface-hover);
  --color-line: var(--pt-line);
  --color-fg: var(--pt-fg);
  --color-muted: var(--pt-muted);
  --color-brand: var(--pt-brand);
  --color-brand-hover: var(--pt-brand-hover);
  --color-brand-fg: var(--pt-brand-fg);
  --color-chip: var(--pt-chip);
  --font-sans: "Roboto", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root {
  --pt-bg: #ffffff;
  --pt-bg-elevated: #ffffff;
  --pt-surface: #f9f9f9;
  --pt-surface-hover: #f2f2f2;
  --pt-line: #e5e5e5;
  --pt-fg: #0f0f0f;
  --pt-muted: #606060;
  --pt-brand: #ff0033;
  --pt-brand-hover: #e6002e;
  --pt-brand-fg: #ffffff;
  --pt-chip: #f2f2f2;
  color-scheme: light;
}

[data-theme="dark"] {
  --pt-bg: #0f0f0f;
  --pt-bg-elevated: #181818;
  --pt-surface: #212121;
  --pt-surface-hover: #2f2f2f;
  --pt-line: #303030;
  --pt-fg: #f1f1f1;
  --pt-muted: #aaaaaa;
  --pt-brand: #ff0033;
  --pt-brand-hover: #ff1a48;
  --pt-brand-fg: #ffffff;
  --pt-chip: #272727;
  color-scheme: dark;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  background: var(--pt-bg);
  color: var(--pt-fg);
  overscroll-behavior-y: none;
}

body {
  font-family: var(--font-sans);
}

::selection {
  background: color-mix(in srgb, var(--pt-brand) 40%, transparent);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--pt-muted) 45%, transparent);
  border-radius: 999px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  scrollbar-width: none;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-1 {
  -webkit-line-clamp: 1;
}
.line-clamp-2 {
  -webkit-line-clamp: 2;
}
.line-clamp-3 {
  -webkit-line-clamp: 3;
}

@keyframes pt-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.animate-fade-up {
  animation: pt-fade-up 0.28s ease-out both;
}

@keyframes pt-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}
.skeleton {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--pt-muted) 12%, transparent) 25%,
    color-mix(in srgb, var(--pt-muted) 22%, transparent) 37%,
    color-mix(in srgb, var(--pt-muted) 12%, transparent) 63%
  );
  background-size: 800px 100%;
  animation: pt-shimmer 1.3s infinite linear;
}

@keyframes pt-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--pt-brand) 60%, transparent);
  }
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}
.live-dot {
  animation: pt-pulse-ring 1.6s infinite;
}

input[type="range"].pt-range {
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"].pt-range::-webkit-slider-runnable-track {
  height: 3px;
  background: color-mix(in srgb, var(--pt-fg) 30%, transparent);
  border-radius: 999px;
}
input[type="range"].pt-range::-webkit-slider-thumb {
  appearance: none;
  height: 13px;
  width: 13px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--pt-brand);
}
input[type="range"].pt-range::-moz-range-thumb {
  height: 13px;
  width: 13px;
  border: none;
  border-radius: 50%;
  background: var(--pt-brand);
}

video::cue {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1rem;
}

*:focus-visible {
  outline: 2px solid var(--pt-brand);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
