/*
Theme Name: SaveTok
Theme URI: https://savetok.net/
Author: SaveTok Team
Author URI: https://savetok.net/
Description: A premium, dark-mode focused video downloader platform for YouTube, TikTok, Facebook, and Instagram.
Version: 2.0.0
*/

/* ============================================
   DESIGN TOKENS
============================================ */
:root {
  /* Brand */
  --brand-primary:   #7C4DFF;
  --brand-secondary: #FF2D55;
  --brand-accent:    #00E5FF;
  --brand-gradient:  linear-gradient(135deg, #7C4DFF 0%, #00E5FF 50%, #FF2D55 100%);

  /* Platform colors */
  --yt-red:   #ff0000;
  --tt-black: #010101;
  --tt-accent:#ffffff;
  --fb-blue:  #1877f2;
  --ig-grad:  linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);

  /* Dark UI */
  --bg-base:    #06060E;
  --bg-surface: #0D0D16;
  --bg-card:    rgba(25, 25, 45, 0.6);
  --bg-hover:   rgba(40, 40, 65, 0.8);

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: #A5A5C9;
  --text-muted:     #67678F;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow:   rgba(124, 77, 255, 0.4);

  /* Shadows */
  --shadow-sm:  0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 12px 36px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 24px 64px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 50px rgba(124, 77, 255, 0.3);

  /* Spacing & radius */
  --radius-sm:  12px;
  --radius-md:  20px;
  --radius-lg:  28px;
  --radius-xl:  48px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-bounce: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Typography */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-heading: 'Inter', system-ui, sans-serif;
}

/* ============================================
   LIGHT MODE TOKENS
============================================ */
[data-theme="light"] {
  --bg-base:    #F6F8FC;
  --bg-surface: #FFFFFF;
  --bg-card:    rgba(255, 255, 255, 0.9);
  --bg-hover:   rgba(240, 242, 246, 0.9);

  /* Accent inverted */
  --tt-accent:#010101;

  /* Text mapped to dark text */
  --text-primary:   #181824;
  --text-secondary: #55556E;
  --text-muted:     #8E8EAA;

  /* Borders inverted */
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-glow:   rgba(124, 77, 255, 0.25);

  /* Shadows inverted to darker but softer */
  --shadow-sm:  0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md:  0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg:  0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 50px rgba(124, 77, 255, 0.2);
}

/* ============================================
   BASE RESET
============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

p { color: var(--text-secondary); }

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover { color: var(--brand-accent); }

img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   SECTION HELPERS
============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  background: rgba(108,71,255,0.15);
  border: 1px solid rgba(108,71,255,0.35);
  color: var(--brand-primary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================
   SCROLL REVEAL UTILITIES (PREMIUM ENHANCEMENT)
   ============================================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(35px) scale(0.98);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Sequential Reveal Delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ============================================
   FLOATING LOCAL SAVE ALERT (PREMIUM TOAST)
   ============================================ */
.local-save-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 380px;
  z-index: 9999;
  transform: translateY(150px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.local-save-toast.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.lst-inner {
  display: flex;
  align-items: flex-start;
  background: rgba(18, 18, 29, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1.5px solid rgba(25, 135, 84, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 25px rgba(25, 135, 84, 0.15);
  position: relative;
  gap: 1rem;
}

.lst-icon {
  background: rgba(25, 135, 84, 0.15);
  color: #2ec4b6;
  font-size: 1.25rem;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(25, 135, 84, 0.3);
  animation: lst-pulse 2s infinite;
}

.lst-body {
  flex: 1;
  padding-right: 1rem;
}

.lst-body h6 {
  color: #fff;
  font-weight: 700;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.lst-body p {
  color: var(--text-secondary);
  font-size: 0.825rem;
  margin: 0;
  line-height: 1.4;
}

.lst-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
  line-height: 1;
}

.lst-close:hover {
  color: #fff;
}

@keyframes lst-pulse {
  0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(25, 135, 84, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

@media (max-width: 480px) {
  .local-save-toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* ============================================
   FDOWN.NET STYLE MIRROR ARCHITECTURE
   ============================================ */
.fdown-results {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fdown-card {
  background: rgba(30, 30, 50, 0.6) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1.5px solid rgba(255,255,255,0.06) !important;
  border-radius: 16px !important;
  overflow: hidden;
}

.fdown-dl-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  padding: 1rem 1.5rem !important;
  border-radius: 8px !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
  text-transform: none !important;
}

.btn-normal-quality {
  background: linear-gradient(135deg, #1877f2, #1566d4) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.btn-normal-quality:hover {
  background: linear-gradient(135deg, #1566d4, #1054b5) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.4);
}

.btn-hd-quality {
  background: linear-gradient(135deg, #00a896, #028090) !important;
  color: white !important;
  box-shadow: 0 4px 15px rgba(0, 168, 150, 0.3);
}

.btn-hd-quality:hover {
  background: linear-gradient(135deg, #028090, #02c39a) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 168, 150, 0.4);
}

.fdown-reset a {
  font-size: 0.9rem;
  color: var(--text-secondary) !important;
  transition: color 0.2s;
}

.fdown-reset a:hover {
  color: var(--brand-primary) !important;
}
