﻿#loader-parent{
  position: fixed;
  top: 0px;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 9;
  display: none;
}
.loader {
  width: 30px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 0 #0004;
  animation: l2 1.5s infinite linear;
  position: relative;
  top: 47%;
  left: 49%;
}
.loader:before,
.loader:after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 #0004;
  animation: inherit;
  animation-delay: -0.5s;
}
.loader:after {
  animation-delay: -1s;
}
@keyframes l2 {
    100% {box-shadow: 0 0 0 40px #0000}
}
/* =====================================================
   TOKENS â€” CSS Variables (Light & Dark Theme)
   ===================================================== */
/* Applied by js/theme.js before first paint to prevent transition flash */
.no-transitions,
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
  transition: none !important;
}
.url-field-wrap,
.url-field-wrap input,
.url-field-wrap input::placeholder,
.paste-btn,
.search-wrap input,
.search-wrap input::placeholder,
.navbar .navbar-nav > .nav-item > .nav-link {
  transition: none !important;
}

:root {
  --bg: #f8fafc;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
                 radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.03) 0px, transparent 50%),
                 radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: rgba(226, 232, 240, 0.8);
  --border-hover: rgba(99, 102, 241, 0.35);
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;

  --accent: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-lt: rgba(99, 102, 241, 0.06);
  --accent-hv: #4f46e5;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(99, 102, 241, 0.05), 0 8px 10px -6px rgba(99, 102, 241, 0.03);
  --radius-card: 16px;

  --grid-color: rgba(99, 102, 241, 0.03);
  --hero-bg: #ffffff;

  /* Category Tag Colors */
  --tag-dl:   rgba(219, 234, 254, 0.7); --tag-dl-t:   #1e40af;
  --tag-img:  rgba(220, 252, 231, 0.7); --tag-img-t:  #15803d;
  --tag-json: rgba(254, 249, 195, 0.7); --tag-json-t: #a16207;
  --tag-unit: rgba(224, 231, 255, 0.7); --tag-unit-t: #3730a3;

  /* Icon Background Gradients */
  --ib-blue:   linear-gradient(135deg, #e0f2fe, #bae6fd);
  --ib-pink:   linear-gradient(135deg, #fce7f3, #fbcfe8);
  --ib-orange: linear-gradient(135deg, #ffedd5, #fed7aa);
  --ib-red:    linear-gradient(135deg, #fee2e2, #fecaca);
  --ib-green:  linear-gradient(135deg, #dcfce7, #bbf7d0);
  --ib-amber:  linear-gradient(135deg, #fef9c3, #fef08a);
  --ib-violet: linear-gradient(135deg, #f3e8ff, #e9d5ff);
}

[data-theme="dark"] {
  --bg: #030712;
  --bg-gradient: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
                 radial-gradient(at 50% 0%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
                 radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.12) 0px, transparent 50%);
  --surface: rgba(17, 24, 39, 0.7);
  --surface-hover: rgba(31, 41, 55, 0.85);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(139, 92, 246, 0.4);
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;

  --accent: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  --accent-lt: rgba(139, 92, 246, 0.12);
  --accent-hv: #c084fc;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(139, 92, 246, 0.15), 0 8px 10px -6px rgba(139, 92, 246, 0.08);

  --grid-color: rgba(255, 255, 255, 0.02);
  --hero-bg: #030712;

  /* Category Tag Colors (Dark) */
  --tag-dl:   rgba(30, 58, 138, 0.4);  --tag-dl-t:   #93c5fd;
  --tag-img:  rgba(6, 78, 59, 0.4);    --tag-img-t:  #6ee7b7;
  --tag-json: rgba(120, 53, 4, 0.4);   --tag-json-t: #fde68a;
  --tag-unit: rgba(49, 46, 129, 0.4);  --tag-unit-t: #a5b4fc;

  /* Icon Background Gradients (Dark) */
  --ib-blue:   linear-gradient(135deg, #1e3a8a, #172554);
  --ib-pink:   linear-gradient(135deg, #831843, #500724);
  --ib-orange: linear-gradient(135deg, #7c2d12, #431407);
  --ib-red:    linear-gradient(135deg, #7f1d1d, #450a0a);
  --ib-green:  linear-gradient(135deg, #064e3b, #022c22);
  --ib-amber:  linear-gradient(135deg, #78350f, #451a03);
  --ib-violet: linear-gradient(135deg, #4c1d95, #2e1065);
}

/* =====================================================
   BASE
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: relative;
  top: auto;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border) !important;
  padding: 0 !important;
}
[data-theme="dark"] .navbar {
  background: rgba(3, 7, 18, 0.85) !important;
}
.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.navbar .logo {
  width: 115px;
  transition: transform 0.3s ease, filter 0.25s ease;
}
.navbar .logo:hover { transform: scale(1.03); }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { filter: invert(1); }

/* Language Button */
.lang_btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-gradient) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  font-weight: 600;
  border: none !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
[data-theme="dark"] .lang_btn { box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25); }
.lang_btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Language dropdown panel */
.lang_opt { position: relative; }
.navbar,
.navbar .navbar-collapse,
.navbar .navbar-inner { overflow: visible !important; }
.lang_dropdown_panel {
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999 !important;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 8px;
}
[data-theme="dark"] .lang_dropdown_panel {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.lang {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  padding: 8px !important;
  gap: 4px !important;
}
.language_dropDownLink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.language_dropDownLink:hover {
  background: var(--accent-lt);
  color: var(--accent);
}
[dir="rtl"] .language_dropDownLink {
  flex-direction: row-reverse;
  text-align: right;
}
.lang-flag {
  font-size: 15px;
  line-height: 1;
}

/* Theme Toggle Button */
#themeBtn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#themeBtn:hover {
  border-color: var(--accent);
  background: var(--accent-lt);
  color: var(--accent);
  transform: scale(1.08) rotate(15deg);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}
#themeBtn svg { transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
#themeBtn:active svg { transform: scale(0.8); }

/* =====================================================
   HERO (Homepage only)
   ===================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px 60px;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.hero::after {
  content: '';
  position: absolute;
  top: -10%; left: 30%;
  width: 40%; height: 60%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.07) 0%, transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}
[data-theme="dark"] .hero::after {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, transparent 75%);
}
.hero::before {
  content: '';
  position: absolute;
  bottom: 0; right: 25%;
  width: 35%; height: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
  filter: blur(55px);
  z-index: 0;
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 75%);
}
.hero-shimmer {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, #6366f1, #06b6d4, #8b5cf6, #6366f1);
  background-size: 300% 100%;
  animation: shimmer-anim 4s linear infinite;
  z-index: 10;
}
@keyframes shimmer-anim {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-lt);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 24px;
  position: relative; z-index: 1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.03);
  transition: all 0.3s ease;
}
.hero-eyebrow:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}
[data-theme="dark"] .hero-eyebrow {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 850;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -.03em;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.hero h1 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 16.5px;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.7;
  position: relative; z-index: 1;
}
.search-wrap {
  max-width: 640px;
  margin: 0 auto 36px;
  position: relative; z-index: 5;
}
.search-wrap input {
  width: 100%;
  height: 60px;
  padding: 0 90px 0 24px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-lt), 0 16px 32px -12px rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
}
[data-theme="dark"] .search-wrap input:focus {
  box-shadow: 0 0 0 5px var(--accent-lt), 0 16px 32px -12px rgba(139, 92, 246, 0.3);
}
.search-wrap input::placeholder { color: var(--muted); }
.s-icon {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-wrap input:focus ~ .s-icon { color: var(--accent); }
.s-icon svg { width: 20px; height: 20px; display: block; }
.search-shortcut-hint {
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  border: 1.5px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
}
.search-wrap input:focus ~ .search-shortcut-hint {
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  position: relative; z-index: 1;
}
.stat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-chip:hover {
  border-color: var(--accent);
  background: var(--accent-lt);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}
.stat-chip svg { width: 15px; height: 15px; color: var(--accent); transition: transform 0.25s ease; }
.stat-chip:hover svg { transform: scale(1.15); }

/* =====================================================
   HOME PAGE WRAPPER & GRID
   ===================================================== */
.home-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  position: relative;
}
.home-grid-overlay {
  position: absolute;
  inset: 0; z-index: 0;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 50%, transparent 100%);
  opacity: 0.8;
  pointer-events: none;
}
.no-results {
  display: none; text-align: center; padding: 80px 20px;
  position: relative; z-index: 10;
}
.no-results svg { width: 52px; height: 52px; color: var(--border); margin-bottom: 14px; }
.no-results h2  { font-size: 19px; margin-bottom: 6px; font-weight: 700; color: var(--text); }
.no-results p   { font-size: 14px; color: var(--muted); }

/* =====================================================
   TOOL SECTIONS
   ===================================================== */
.tool-section { margin-bottom: 64px; position: relative; z-index: 10; }
.tool-section.s-hidden { display: none; }

.sec-head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1.5px solid var(--border);
}
.sec-ico {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; color: #fff;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sec-head:hover .sec-ico { transform: scale(1.08) rotate(3deg); }
.si-blue   { background: linear-gradient(135deg, #3b82f6, #06b6d4); box-shadow: 0 4px 14px rgba(59,130,246,0.2); }
.si-green  { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 4px 14px rgba(16,185,129,0.2); }
.si-amber  { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 4px 14px rgba(245,158,11,0.2); }
.si-violet { background: linear-gradient(135deg, #8b5cf6, #c084fc); box-shadow: 0 4px 14px rgba(139,92,246,0.2); }
.sec-head-txt { flex: 1; min-width: 0; }
.sec-head-txt h2 { font-size: 20px; font-weight: 750; color: var(--text); margin-bottom: 4px; letter-spacing: -.01em; max-width: 100%; }
.sec-head-txt p  { font-size: 13.5px; color: var(--text-secondary); max-width: 100%; }

.sub-lbl {
  font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted);
  margin: 32px 0 16px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

/* =====================================================
   CARDS GRID
   ===================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.tool-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 18px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative; overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  text-decoration: none;
  color: var(--text);
}
.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-card:hover::before { opacity: 1; transform: scaleX(1); }
.tc-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  box-shadow: inset 0 -1.5px 3px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.03);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-card:hover .tc-ico { transform: scale(1.1) rotate(2deg); }
.tc-name {
  display: block;
  font-size: 14.5px; font-weight: 650;
  line-height: 1.4; color: var(--text);
  margin-bottom: 2px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.tc-name::after {
  content: '';
  position: absolute;
  inset: 0;
}
.tc-name:hover { color: var(--accent); }
.tc-tag {
  display: block;
  width: fit-content;
  font-size: 10px; font-weight: 750;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 99px; margin-top: 4px;
  transition: all 0.2s ease;
}
.t-dl   { background: var(--tag-dl);   color: var(--tag-dl-t);   border: 1px solid rgba(37,99,235,0.08); }
.t-img  { background: var(--tag-img);  color: var(--tag-img-t);  border: 1px solid rgba(22,101,52,0.08); }
.t-json { background: var(--tag-json); color: var(--tag-json-t); border: 1px solid rgba(133,77,14,0.08); }
.t-unit { background: var(--tag-unit); color: var(--tag-unit-t); border: 1px solid rgba(55,48,163,0.08); }
[data-theme="dark"] .t-dl   { border-color: rgba(147,197,253,0.12); }
[data-theme="dark"] .t-img  { border-color: rgba(110,231,183,0.12); }
[data-theme="dark"] .t-json { border-color: rgba(253,230,138,0.12); }
[data-theme="dark"] .t-unit { border-color: rgba(165,180,252,0.12); }

/* Icon bg helpers */
.ib        { background: var(--ib-blue); }
.ib-pink   { background: var(--ib-pink); }
.ib-orange { background: var(--ib-orange); }
.ib-red    { background: var(--ib-red); }
.ib-green  { background: var(--ib-green); }
.ib-amber  { background: var(--ib-amber); }
.ib-violet { background: var(--ib-violet); }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: #080d18;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #94a3b8;
  position: relative;
  z-index: 10;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 32px 0;
}

/* Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Brand col */
.footer-logo-link { display: inline-block; margin-bottom: 16px; }
.footer-logo { height: 32px; width: auto; filter: invert(1); }
.footer-tagline {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.65;
  max-width: 280px;
  margin-bottom: 20px;
}

/* Social icons */
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: #94a3b8;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}
.footer-social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Link columns */
.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #e2e8f0;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col ul li a {
  font-size: 13.5px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #e2e8f0; }

/* Bottom bar */
.footer-bottom {
  padding: 20px 0;
  font-size: 13px;
  color: #475569;
  text-align: center;
}
.footer-bottom a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--accent); }

/* Footer responsive */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-tagline { max-width: 100%; }
}
@media (max-width: 640px) {
  .footer-inner { padding: 40px 20px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* =====================================================
   DOWNLOADER PAGES â€” Shared Styles
   ===================================================== */

/* â”€â”€ Page Header â”€â”€ */
.tool-page-header {
    padding: 48px 24px 32px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}
.tool-page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 850;
    color: var(--text);
    letter-spacing: -.02em;
    margin-bottom: 12px;
}
.tool-page-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* â”€â”€ Input Card â”€â”€ */
.downloader-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 36px 36px;
}
.downloader-card h2 {
    font-size: 18px;
    font-weight: 750;
    color: var(--text);
    text-align: center;
    margin-bottom: 6px;
}
.downloader-card .card-desc {
    font-size: 13.5px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 28px;
}

/* â”€â”€ URL field â”€â”€ */
.url-field-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 6px 6px 6px 20px;
    position: relative;
}
.url-field-wrap { transition: border-color 0.25s, box-shadow 0.25s; }
.url-field-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-lt);
}
.url-field-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    outline: none;
    min-width: 0;
    padding: 8px 0;
}
.url-field-wrap input::placeholder { color: var(--muted); }

.paste-btn {
    flex-shrink: 0;
    width: 42px; height: 42px;
    border-radius: 12px;
    border: none;
    background: var(--accent-lt);
    color: var(--accent);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.paste-btn:hover { background: var(--accent); color: #fff; transform: scale(1.05); }
.paste-btn:active { transform: scale(0.95); }
.paste-btn svg {
    width: 18px; height: 18px;
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.paste-btn .icon-paste { opacity: 1; transform: scale(1); }
.paste-btn .icon-clear { opacity: 0; transform: scale(0.7); }
.paste-btn.has-value .icon-paste { opacity: 0; transform: scale(0.7); }
.paste-btn.has-value .icon-clear { opacity: 1; transform: scale(1); }
.paste-btn.has-value { background: rgba(239,68,68,0.1); color: rgb(239,68,68); }
.paste-btn.has-value:hover { background: rgb(239,68,68); color: #fff; }

.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    height: 48px;
    padding: 0 36px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    letter-spacing: .01em;
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}
[data-theme="dark"] .btn-download { box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3); }
[data-theme="dark"] .btn-download:hover { box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45); }
.btn-download svg { width: 20px; height: 20px; }
.btn-download:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-download .spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dl-spin 0.7s linear infinite;
    display: none;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }
.btn-download.loading .btn-label { display: none; }
.btn-download.loading .spinner { display: block; }

/* â”€â”€ Initial Page Loader Animations â”€â”€ */
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-pulse {
    0%, 100% { transform: scale(0.9); opacity: 0.15; }
    50% { transform: scale(1.2); opacity: 0.3; }
}
@keyframes pl-text {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
#pageLoader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#pageLoader .pl-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
#pageLoader .pl-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--accent);
    opacity: 0.15;
    filter: blur(25px);
    border-radius: 50%;
    animation: pl-pulse 2s ease-in-out infinite;
}
#pageLoader .pl-spinner {
    width: 60px;
    height: 60px;
    animation: pl-spin 1s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}
#pageLoader .pl-text {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    letter-spacing: .03em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    animation: pl-text 1.5s ease-in-out infinite;
}

/* â”€â”€ Downloader Full-Page Preloader â”€â”€ */
#dlPageLoader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
#dlPageLoader .dpl-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
}
#dlPageLoader .dpl-box {
    position: relative;
    background: var(--surface);
    border-radius: 24px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
    min-width: 260px;
}
@keyframes dplIn {
    from { opacity: 0; transform: scale(.85); }
    to { opacity: 1; transform: scale(1); }
}
.dpl-rings {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
}
.dpl-rings span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: dplSpin 1.1s linear infinite;
}
.dpl-rings span:nth-child(1) {
    border-top-color: var(--accent);
    animation-duration: 1.1s;
}
.dpl-rings span:nth-child(2) {
    inset: 10px;
    border-right-color: var(--accent);
    opacity: .6;
    animation-duration: .8s;
    animation-direction: reverse;
}
.dpl-rings span:nth-child(3) {
    inset: 20px;
    border-bottom-color: var(--accent);
    opacity: .35;
    animation-duration: 1.4s;
}
@keyframes dplSpin { to { transform: rotate(360deg); } }
.dpl-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 18px;
    letter-spacing: .01em;
}
.dpl-bar {
    height: 4px;
    border-radius: 99px;
    background: var(--border);
    overflow: hidden;
}
.dpl-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    width: 0%;
    animation: dplProgress 8s cubic-bezier(.1, 0, .3, 1) forwards;
}
@keyframes dplProgress {
    0% { width: 0%; }
    60% { width: 75%; }
    85% { width: 88%; }
    100% { width: 92%; }
}

/* â”€â”€ Result Section â”€â”€ */
#resultSection { display: none; }
.result-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.result-card .result-header {
    padding: 20px 24px 18px;
    border-bottom: 1.5px solid var(--border);
    display: flex; align-items: center; gap: 12px;
}
.result-card .result-header h3 {
    font-size: 16px; font-weight: 750;
    color: var(--text); margin: 0;
}
.result-card .result-header .badge {
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 99px;
    text-transform: uppercase; letter-spacing: .05em;
}

.dl-btn {
    display: inline-flex; align-items: center; gap: 6px;
    color: #fff; border-radius: 10px;
    padding: 8px 20px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
}
.dl-btn:hover {
    transform: translateY(-1px);
    color: #fff;
}
.dl-btn svg { width: 14px; height: 14px; }

/* â”€â”€ Media info â”€â”€ */
.media-info {
    display: flex; align-items: center; gap: 20px;
    padding: 20px 24px;
    border-bottom: 1.5px solid var(--border);
}
.media-thumb-wrap {
    flex-shrink: 0;
    width: 100px; height: 100px;
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--bg);
    position: relative;
}
.media-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb-wrap .play-badge {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.3);
}
.media-thumb-wrap .play-badge svg { width: 28px; height: 28px; color: #fff; }
.media-meta { flex: 1; min-width: 0; }
.media-meta .media-title {
    font-size: 15px; font-weight: 650;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 8px;
}
.media-meta .meta-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--accent-lt);
    color: var(--accent);
    font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 99px;
}
.meta-chip svg { width: 13px; height: 13px; }

/* â”€â”€ Download rows â”€â”€ */
.download-options { padding: 0; }
.dl-row {
    display: flex; align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    transition: background 0.15s;
}
.dl-row:last-child { border-bottom: none; }
.dl-row:hover { background: var(--accent-lt); }
.dl-quality {
    min-width: 64px;
    font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .06em;
}
.dl-quality.q-hd    { color: #10b981; }
.dl-quality.q-sd    { color: #f59e0b; }
.dl-quality.q-audio { color: var(--accent); }
.dl-res {
    flex: 1;
    font-size: 13.5px;
    color: var(--text-secondary);
}
.dl-format {
    font-size: 12px; font-weight: 600;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 10px; border-radius: 6px;
}

/* â”€â”€ Result footer â”€â”€ */
.result-footer {
    padding: 16px 24px;
    border-top: 1.5px solid var(--border);
    display: flex; justify-content: center;
}
.start-over {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 13px; font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
}
.start-over:hover {
    border-color: var(--accent); color: var(--accent);
    transform: translateY(-1px);
}
.start-over svg { width: 16px; height: 16px; }

/* â”€â”€ Error box â”€â”€ */
#errorBox {
    display: none;
    max-width: 720px;
    margin: 0 auto;
    background: rgba(239,68,68,0.08);
    border: 1.5px solid rgba(239,68,68,0.3);
    border-radius: 14px;
    padding: 14px 20px;
    color: rgb(220,38,38);
    font-size: 14px; font-weight: 500;
    text-align: center;
}
[data-theme="dark"] #errorBox {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.25);
    color: #fca5a5;
}

/* â”€â”€ Sidebar â”€â”€ */
.sidebar-box {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 24px;
}
.sidebar-box h3 {
    color: var(--text); font-weight: 750; font-size: 16px;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1.5px solid var(--border);
}
.sidebar-box a {
    color: var(--text-secondary); text-decoration: none;
    padding: 9px 0; display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}
.sidebar-box a:last-child { border-bottom: none; }
.sidebar-box a:hover { color: var(--accent); }
.sidebar-box a svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.5; }

/* =====================================================
   BUTTON RESET â€” dl-btn (used as <button> in modal flow)
   ===================================================== */
button.dl-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    text-decoration: none;
}

/* =====================================================
   AD SLOTS
   ===================================================== */
.ad-slot {
    text-align: center;
    min-height: 0;
}
.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 20px 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .02em;
    user-select: none;
}
.ad-slot-leaderboard {
    max-width: 728px;
    margin: 0 auto 16px;
    padding: 0 16px;
}
.ad-slot-leaderboard .ad-placeholder { min-height: 90px; }
.ad-slot-side { flex: 0 0 auto; }

/* =====================================================
   DOWNLOAD MODAL + 30s WAIT GATE
   ===================================================== */
.dl-modal .modal-dialog.dl-modal-dialog { max-width: 560px; }
.dl-modal .modal-content {
    border-radius: 24px;
    overflow: hidden;
    border: 1.5px solid var(--border);
    background: var(--surface);
}
.dl-modal .modal-body.dl-modal-body {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    position: relative;
}
.dl-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 10;
    opacity: .6;
}
.dl-modal-close:hover { opacity: 1; }
.dl-modal-main {
    flex: 1 1 0%;
    padding: 36px 32px 32px;
    text-align: center;
    min-width: 0;
}
.dl-step { width: 100%; }

/* â”€â”€ Step 1: video info â”€â”€ */
.dl-modal-video-info { margin-bottom: 24px; }
.dl-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dl-modal-meta {
    font-size: 13px;
    color: var(--text-secondary);
}
.dl-modal-start {
    margin-bottom: 12px;
}
.dl-turnstile-wrap {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}
.dl-modal-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 8px;
}

/* â”€â”€ Step 2: countdown timer â”€â”€ */
.dl-timer-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--border);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.3s linear;
}
.dl-timer-ring::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: var(--surface);
}
.dl-timer-num {
    position: relative;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    z-index: 1;
}
.dl-timer-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.dl-timer-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* â”€â”€ Step 3: ready â”€â”€ */
.dl-ready-check { margin-bottom: 16px; }
.dl-ready-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}
.dl-modal-save { margin-top: 8px; }

/* â”€â”€ Shared CTA button (both .dl-btn-cta) â”€â”€ */
.dl-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.dl-btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.3);
    color: #fff;
}

/* â”€â”€ Modal ad slots â€” fixed on backdrop beside the modal â”€â”€ */
.dl-modal-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1056;
    width: 160px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    pointer-events: auto;
}
.dl-modal.show .dl-modal-ad { display: flex; }
.dl-modal-ad-left  { left:  16px; }
.dl-modal-ad-right { right: 16px; }
.dl-modal-ad .ad-placeholder {
    min-height: 300px;
    writing-mode: vertical-lr;
    text-orientation: mixed;
}
@media(max-width: 1200px) {
    .dl-modal-ad { width: 120px; }
}
@media(max-width: 992px) {
    .dl-modal-ad { display: none !important; }
    .dl-modal-body { flex-direction: column; }
    .dl-modal-main { padding: 28px 20px 24px; }
}
@media(max-width: 576px) {
    .dl-timer-ring { width: 100px; height: 100px; }
    .dl-timer-num { font-size: 28px; }
}

@media(max-width: 576px) {
    .downloader-card { padding: 28px 20px 24px; }
    .media-info { flex-direction: column; align-items: flex-start; }
    .dl-row { flex-wrap: wrap; gap: 10px; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 576px) {
  .search-shortcut-hint { display: none; }
  .search-wrap input { padding-right: 54px; }
}
@media (max-width: 768px) {
  .hero { padding: 48px 16px 48px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { max-width: 100%; }
  .home-wrap { padding: 40px 16px 60px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card  { padding: 16px 14px 14px; gap: 10px; }
  .tc-ico     { width: 40px; height: 40px; font-size: 18px; }
  .tc-name    { font-size: 13.5px; }
  .hero-stats { gap: 8px; }
  .stat-chip  { font-size: 11.5px; padding: 5px 12px; }
}
