/* ═══════════════════════════════════════════════
   Sora Video Downloader — Custom Styles
   ═══════════════════════════════════════════════ */

/* ─── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #141517;
}
::-webkit-scrollbar-thumb {
  background: #373a40;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5c5f66;
}

/* ─── Selection ───────────────────────────────── */
::selection {
  background: rgba(92, 124, 250, 0.3);
  color: white;
}

/* ─── Smooth scroll ───────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ─── Body ────────────────────────────────────── */
body {
  background: #101113;
  min-height: 100vh;
}

/* ─── Navbar Scroll Effect ────────────────────── */
#navbar.scrolled {
  background: rgba(16, 17, 19, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(55, 58, 64, 0.2);
}

/* ─── Drop Zone Active State ──────────────────── */
#drop-zone.drag-over .absolute.-inset-0\.5 {
  opacity: 0.7 !important;
}
#drop-zone.drag-over {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

/* ─── Input Focus Glow ────────────────────────── */
#url-input:focus {
  box-shadow: 0 0 0 2px rgba(92, 124, 250, 0.15),
              inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ─── Video Player Styling ────────────────────── */
#video-preview {
  background: #101113;
}

video::-webkit-media-controls {
  border-radius: 0;
}

/* ─── FAQ Accordion ───────────────────────────── */
.faq-item {
  background: rgba(37, 38, 43, 0.4);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
  background: rgba(37, 38, 43, 0.6);
}

.faq-toggle[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  animation: faqOpen 0.3s ease-out;
}

@keyframes faqOpen {
  0% {
    opacity: 0;
    max-height: 0;
  }
  100% {
    opacity: 1;
    max-height: 300px;
  }
}

/* ─── Toast Notification ──────────────────────── */
#toast {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#toast.toast-hidden {
  opacity: 0;
  transform: translateY(20px);
}

/* ─── Shimmer loading effect ──────────────────── */
.shimmer {
  background: linear-gradient(
    90deg,
    rgba(55, 58, 64, 0.3) 25%,
    rgba(92, 124, 250, 0.1) 50%,
    rgba(55, 58, 64, 0.3) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* ─── Button loading spinner ──────────────────── */
.btn-loading {
  position: relative;
  pointer-events: none;
}
.btn-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Feature Cards Glass Effect ──────────────── */
@supports (backdrop-filter: blur(10px)) {
  .feature-glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* ─── Gradient text animation ─────────────────── */
.gradient-text-animate {
  background-size: 200% auto;
  animation: gradientShift 3s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 100% center; }
}

/* ─── Responsive adjustments ──────────────────── */
@media (max-width: 640px) {
  #hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
  
  .faq-toggle {
    padding: 1rem 1.25rem;
  }
  
  .faq-content {
    padding: 0 1.25rem 1rem;
  }
}

/* ─── Toast success/error variants ────────────── */
.toast-success {
  border-color: rgba(32, 201, 151, 0.3) !important;
}
.toast-error {
  border-color: rgba(240, 101, 149, 0.3) !important;
}

/* ─── Pulse ring animation ────────────────────── */
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.pulse-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: pulse-ring 1.5s ease-out infinite;
}

/* ─── Custom border width for spinner ─────────── */
.border-3 {
  border-width: 3px;
}
