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

/* === Dark theme base styles === */
:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1a1a1a;
  --border: #262626;
  --text: #fafafa;
  --text-muted: #a1a1aa;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === Custom scrollbar for dark theme === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* === Timeline segment hover effect === */
.segment-bar {
  transition: opacity 0.1s ease;
}

.segment-bar:hover {
  opacity: 0.8;
  cursor: pointer;
}

/* === Video player controls === */
video::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.7);
}

/* === Slider thumb === */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #3B82F6;
  border-radius: 50%;
  margin-top: -5px;
  cursor: pointer;
}

input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #3B82F6;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* === Loading animation === */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.loading-pulse {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

/* === Focus states === */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}
