@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');

:root {
  --bg-main: #07080c;
  --bg-surface: #0c0e15;
  --bg-card: rgba(15, 18, 28, 0.75);
  --border-card: rgba(255, 255, 255, 0.07);
  --border-card-hover: rgba(244, 63, 94, 0.28);
  --accent-rose: #f43f5e;
  --accent-pink: #ec4899;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #ec4899 55%, #c084fc 100%);
  --accent-subtle: rgba(244, 63, 94, 0.12);
}

* {
  font-family: 'Plus Jakarta Sans', 'Noto Sans Thai', sans-serif;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden; /* No scrollbar for full-screen layout */
  background-color: var(--bg-main);
  color: #f1f5f9;
  user-select: none;
}

/* Custom Scrollbar for inner elements only */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(244, 63, 94, 0.45);
}

/* Ambient Backdrop Glow for Vertical Videos */
.ambient-backdrop {
  position: absolute;
  inset: -15%;
  filter: blur(54px) brightness(0.65) saturate(1.4);
  transform: scale(1.15);
  opacity: 0.6;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}
.glass-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.gradient-btn {
  background: var(--accent-gradient);
  box-shadow: 0 4px 18px rgba(244, 63, 94, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.gradient-btn:hover {
  box-shadow: 0 6px 24px rgba(244, 63, 94, 0.5);
  transform: translateY(-1px);
}
.gradient-btn:active {
  transform: translateY(0);
}

/* Video Containers */
.aspect-landscape {
  aspect-ratio: 16 / 9;
}
.aspect-vertical {
  aspect-ratio: 9 / 16;
  max-height: 85vh;
}

/* Custom Range Slider */
input[type=range] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  height: 4px;
  transition: background 0.15s ease;
}
input[type=range]:hover {
  background: rgba(255, 255, 255, 0.2);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #f43f5e;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.85);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 14px rgba(244, 63, 94, 1);
}

/* Pulsing Online Dot */
.pulse-dot {
  position: relative;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: #10b981;
  opacity: 0.75;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

/* Equalizer Animated Soundwave */
.equalizer-container {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.equalizer-bar {
  width: 2.5px;
  border-radius: 9999px;
  background: #f43f5e;
  animation: eq-bounce 1s ease-in-out infinite;
  transform-origin: bottom;
}

.equalizer-bar:nth-child(1) { height: 6px; animation-delay: 0.0s; }
.equalizer-bar:nth-child(2) { height: 13px; animation-delay: 0.2s; }
.equalizer-bar:nth-child(3) { height: 9px; animation-delay: 0.4s; }
.equalizer-bar:nth-child(4) { height: 14px; animation-delay: 0.15s; }

.equalizer-container.paused .equalizer-bar {
  animation-play-state: paused;
  height: 3px !important;
  opacity: 0.6;
}

@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1.0); }
}

/* Glowing Border Accent */
.border-accent-glow {
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 0 18px -4px rgba(244, 63, 94, 0.22);
}

/* Toast Animation */
.toast-slide {
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
