/**
 * Subtitle Master - World-Class Custom Styles, Animations & Tokens
 */

@layer base {
  html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.6);
}
.dark ::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.45);
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 140, 248, 0.7);
}

/* Full-Screen Drag & Drop Overlay */
#globalDropOverlay {
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#globalDropOverlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Glowing Border & Dropzone Active */
.drop-active {
  border-color: #6366f1 !important;
  background-color: rgba(99, 102, 241, 0.08) !important;
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.25) inset;
}

/* Pop-in animation */
@keyframes popIn {
  0% { transform: scale(0.92) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.animate-pop-in {
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Realistic Cinema Video Player Simulation */
.cinema-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 40%, #1e1b4b 0%, #0f172a 60%, #020617 100%);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 1.5rem;
  user-select: none;
}

/* Cinema background subtle animated glow */
.cinema-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
}

.cinema-subtitle-render {
  position: relative;
  z-index: 10;
  text-align: center;
  font-weight: 700;
  line-height: 1.35;
  transition: all 0.15s ease;
  white-space: pre-wrap;
  max-width: 90%;
}

/* Glassmorphism Classes */
.glass-surface {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dark .glass-surface {
  background: rgba(15, 23, 42, 0.85);
}

/* Custom range slider thumb */
input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.6);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -4px;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.25);
}
.dark input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(51, 65, 85, 0.6);
}
