/* ============================================
   ToolVault — Design System
   Aesthetic: Sharp Editorial / Premium Utility
   Font: Clash Display + DM Sans
============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Syne:wght@400;500;600;700;800&display=swap');

:root {
  --bg:        #0a0a0f;
  --bg2:       #111118;
  --bg3:       #16161f;
  --surface:   #1c1c28;
  --border:    #2a2a3a;
  --accent:    #6c63ff;
  --accent2:   #ff6584;
  --accent3:   #43e97b;
  --text:      #f0f0f8;
  --muted:     #8888aa;
  --card-bg:   #14141e;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow:    0 8px 40px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 30px rgba(108,99,255,0.25);
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1,h2,h3,h4,h5 { font-family: var(--font-head); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
p  { color: var(--muted); font-size: 1rem; max-width: 65ch; }

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

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.logo span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface); }
.header-cta { display: flex; align-items: center; gap: 12px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,99,255,0.4);
}
.btn-primary:hover { background: #7c74ff; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(108,99,255,0.5); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg3); color: var(--text); border-color: var(--accent); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 12px; }

/* ---- HERO ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 20px 80px;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 1.15rem; margin: 0 auto 36px; max-width: 56ch; color: var(--muted); }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* ---- SEARCH ---- */
.search-wrapper {
  max-width: 560px;
  margin: 40px auto 0;
  position: relative;
}
.search-wrapper input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 56px 14px 20px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}
.search-wrapper input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }
.search-wrapper input::placeholder { color: var(--muted); }
.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
#search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  z-index: 200;
  display: none;
  box-shadow: var(--shadow);
}
#search-results a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
#search-results a:last-child { border-bottom: none; }
#search-results a:hover { background: var(--bg3); color: var(--text); }
#search-results a span.tag { font-size: 0.72rem; color: var(--muted); background: var(--bg3); border-radius: 4px; padding: 2px 7px; }

/* ---- CATEGORY TABS ---- */
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.cat-tab {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.cat-tab:hover, .cat-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- TOOL CARDS ---- */
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: var(--text);
}
.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,0.06), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.tool-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow), var(--shadow-accent); color: var(--text); }
.tool-card:hover::before { opacity: 1; }
.tool-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.tool-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tool-card p { font-size: 0.84rem; color: var(--muted); margin: 0; max-width: none; }
.tool-tag {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(108,99,255,0.15);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tool-tag.new { background: rgba(67,233,123,0.15); color: var(--accent3); }
.tool-tag.popular { background: rgba(255,101,132,0.15); color: var(--accent2); }

/* ---- SECTION HEADERS ---- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { margin: 0 auto; }

/* ---- AD PLACEHOLDERS ---- */
.ad-unit {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  letter-spacing: 0.03em;
}
.ad-leaderboard { height: 90px; width: 100%; max-width: 728px; margin: 0 auto; }
.ad-rectangle { height: 250px; width: 300px; }
.ad-sidebar { width: 160px; min-height: 600px; }
.ad-inline { height: 90px; width: 100%; margin: 24px 0; }

/* ---- TOOL PAGE LAYOUT ---- */
.tool-page-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) { .tool-page-layout { grid-template-columns: 1fr; } }
.tool-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ---- HOW-TO STEPS ---- */
.how-to-steps { display: flex; flex-direction: column; gap: 16px; }
.how-to-step {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px;
}
.how-to-step .step-num {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff; font-weight: 800; font-size: 0.9rem;
  border-radius: 8px; min-width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.how-to-step strong { color: var(--text); font-size: 0.95rem; }

/* ---- BENEFITS GRID ---- */
.benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .benefits-grid { grid-template-columns: 1fr; } }
.benefit-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.benefit-card .benefit-icon { font-size: 1.6rem; flex-shrink: 0; }
.benefit-card strong { color: var(--text); font-size: 0.9rem; display: block; }

/* ---- TOOL INTERFACE CARD ---- */
.tool-interface {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.tool-interface h2 { margin-bottom: 4px; font-size: 1.6rem; }
.tool-interface .tool-desc { margin-bottom: 28px; font-size: 0.9rem; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
input[type="text"], input[type="number"], input[type="email"], input[type="url"],
textarea, select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
  margin-bottom: 16px;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="email"]:focus,
input[type="url"]:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
}
select option { background: var(--bg3); }
textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.result-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 0.9rem;
  min-height: 60px;
  word-break: break-all;
  margin-top: 16px;
  color: var(--text);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ---- INFO SECTIONS ---- */
.info-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}
.info-section h2, .info-section h3 { margin-bottom: 14px; }
.info-section p { color: var(--muted); margin-bottom: 16px; max-width: none; }
.info-section ul { list-style: none; padding: 0; }
.info-section ul li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}
.info-section ul li:last-child { border-bottom: none; }
.info-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--surface);
  border: none;
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg3); }
.faq-question .faq-icon { color: var(--accent); font-size: 1.2rem; transition: transform var(--transition); flex-shrink: 0; }
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  background: var(--card-bg);
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.35s ease;
  font-size: 0.88rem;
  color: var(--muted);
}
.faq-answer.open { max-height: 300px; padding: 16px 20px; }

/* ---- RELATED TOOLS ---- */
.related-tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition);
  margin-bottom: 8px;
}
.related-tool-card:hover { border-color: var(--accent); background: var(--bg3); color: var(--text); }
.related-tool-card .icon { font-size: 1.3rem; }

/* ---- BLOG CARDS ---- */
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  color: var(--text);
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.blog-card-img {
  width: 100%; height: 180px;
  background: linear-gradient(135deg, var(--surface), var(--bg3));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.blog-card-body { padding: 20px; }
.blog-meta { font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; display: flex; gap: 12px; }
.blog-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.blog-card p { font-size: 0.84rem; max-width: none; }
.blog-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface);
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 60px 20px 30px;
  margin-top: 80px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: 0.85rem; margin: 12px 0 20px; max-width: 28ch; }
.footer-col h4 { font-family: var(--font-head); font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--muted); font-size: 0.85rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: var(--muted); margin: 0; max-width: none; }

/* ---- MOBILE MENU ---- */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; color: var(--text); }
@media (max-width: 768px) {
  .nav, .header-cta .btn { display: none; }
  .hamburger { display: block; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 999;
  }
  .nav.open a { display: block; }
}

/* ---- FEATURE SECTION ---- */
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; }

/* ---- BREADCRUMB ---- */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border); }

/* ---- PROGRESS / RANGE ---- */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--surface);
  border-radius: 3px;
  outline: none;
  margin-bottom: 16px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}
input[type="checkbox"] { width: auto; margin: 0 8px 0 0; accent-color: var(--accent); }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---- COOKIE BANNER ---- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 5000;
  flex-wrap: wrap;
  display: none;
}
.cookie-banner p { font-size: 0.84rem; color: var(--muted); margin: 0; }
.cookie-banner.show { display: flex; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-2 { animation: fadeUp 0.5s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.5s 0.2s ease both; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.hidden { display: none !important; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(108,99,255,0.15);
  color: var(--accent);
}

/* ====================================================
   Ads Toggle — controlled via Admin Dashboard
   To SHOW ads: remove the lines below (or comment them out)
   To HIDE ads: keep the lines below
   ==================================================== */
.ad-unit,
.adsbygoogle,
[data-ad-slot] {
  display: none !important;
}
