/* =========================================
   ToolMaster Pro — Premium CSS
   Glassmorphism + Dark Gradient Theme
   ========================================= */

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

:root {
  --bg-dark: #0a0a0f;
  --bg-dark2: #0f0f1a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(139,92,246,0.5);
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --green: #10b981;
  --pink: #ec4899;
  --orange: #f97316;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --glow-purple: 0 0 30px rgba(139,92,246,0.3);
  --glow-cyan: 0 0 30px rgba(6,182,212,0.3);
  --glow-green: 0 0 30px rgba(16,185,129,0.3);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* --- BACKGROUND GRADIENT ORBS --- */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 8s ease-in-out infinite;
}
body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 30px) scale(1.05); }
}

/* --- 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 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.logo-text { background: linear-gradient(135deg, var(--purple), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}
.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-menu a:hover, .nav-menu a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-cta {
  background: linear-gradient(135deg, var(--purple), var(--cyan)) !important;
  color: white !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- AD BANNER --- */
.ad-banner {
  width: 100%;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.ad-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 10px;
  padding: 10px 24px;
  max-width: 728px;
  width: 100%;
  justify-content: center;
}
.ad-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--text-muted);
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.ad-content { font-size: 0.85rem; color: var(--text-secondary); }

/* --- HERO --- */
.hero {
  position: relative;
  z-index: 1;
  padding: 80px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--purple);
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--purple), var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* --- SEARCH BAR --- */
.search-wrap {
  max-width: 560px;
  margin: 0 auto 48px;
  animation: fadeInUp 0.6s ease 0.3s both;
}
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 4px 4px 16px;
  gap: 10px;
  transition: var(--transition);
}
.search-box:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.search-icon { font-size: 1.1rem; color: var(--text-muted); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  padding: 10px 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  border: none;
  border-radius: 10px;
  color: white;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.search-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15,15,26,0.98);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: none;
  z-index: 100;
  backdrop-filter: blur(20px);
}
.search-wrap { position: relative; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.search-result-item:hover { background: rgba(139,92,246,0.1); }
.search-result-item .ri { font-size: 1rem; color: var(--purple); }

/* --- STATS BAR --- */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease 0.4s both;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* --- SECTION --- */
.section {
  position: relative;
  z-index: 1;
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}
.section-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; }
.view-all {
  color: var(--purple);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.view-all:hover { gap: 10px; }

/* --- CATEGORY CARDS --- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  display: block;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: var(--transition);
  border-radius: var(--radius);
}
.cat-card.purple::before { background: radial-gradient(circle at 30% 50%, rgba(139,92,246,0.15) 0%, transparent 70%); }
.cat-card.cyan::before { background: radial-gradient(circle at 30% 50%, rgba(6,182,212,0.15) 0%, transparent 70%); }
.cat-card.green::before { background: radial-gradient(circle at 30% 50%, rgba(16,185,129,0.15) 0%, transparent 70%); }
.cat-card:hover { transform: translateY(-6px); border-color: var(--border-hover); }
.cat-card.cyan:hover { border-color: rgba(6,182,212,0.5); }
.cat-card.green:hover { border-color: rgba(16,185,129,0.5); }
.cat-card:hover::before { opacity: 1; }
.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.cat-icon.purple { background: rgba(139,92,246,0.2); }
.cat-icon.cyan { background: rgba(6,182,212,0.2); }
.cat-icon.green { background: rgba(16,185,129,0.2); }
.cat-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.cat-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.6; }
.cat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.cat-count { font-size: 0.85rem; color: var(--text-muted); }
.cat-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
}
.purple .cat-arrow { background: rgba(139,92,246,0.2); color: var(--purple); }
.cyan .cat-arrow { background: rgba(6,182,212,0.2); color: var(--cyan); }
.green .cat-arrow { background: rgba(16,185,129,0.2); color: var(--green); }
.cat-card:hover .cat-arrow { transform: translateX(4px); }

/* --- TOOL CARDS GRID --- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,0.4);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 32px rgba(139,92,246,0.15);
}
.tool-card:hover::after { transform: scaleX(1); }
.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
  background: rgba(139,92,246,0.15);
}
.tool-icon.cyan { background: rgba(6,182,212,0.15); }
.tool-icon.green { background: rgba(16,185,129,0.15); }
.tool-icon.pink { background: rgba(236,72,153,0.15); }
.tool-icon.orange { background: rgba(249,115,22,0.15); }
.tool-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.tool-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.tool-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-new { background: rgba(16,185,129,0.2); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-hot { background: rgba(249,115,22,0.2); color: var(--orange); border: 1px solid rgba(249,115,22,0.3); }
.badge-popular { background: rgba(139,92,246,0.2); color: var(--purple); border: 1px solid rgba(139,92,246,0.3); }

/* --- AD BLOCK --- */
.ad-block {
  background: rgba(139,92,246,0.05);
  border: 1px dashed rgba(139,92,246,0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin: 40px 0;
}
.ad-block-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.ad-block-slot {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- TOOL PAGE LAYOUT --- */
.tool-page-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}
@media(max-width:960px) {
  .tool-page-wrapper { grid-template-columns: 1fr; }
}

/* --- BREADCRUMB --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--purple); }
.breadcrumb span { color: var(--purple); }

/* --- TOOL MAIN CARD --- */
.tool-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tool-header {
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.tool-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(139,92,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.tool-header h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.tool-header p { color: var(--text-secondary); font-size: 0.9rem; }
.tool-body { padding: 28px; }

/* --- FORM ELEMENTS --- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: var(--transition);
  outline: none;
  resize: vertical;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
  background: rgba(255,255,255,0.06);
}
.form-select option { background: #1a1a2e; }
.form-textarea { min-height: 160px; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.9rem; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:active::before { opacity: 0.06; }
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  color: white;
  box-shadow: 0 4px 15px rgba(139,92,246,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139,92,246,0.4); }
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }
.btn-success {
  background: linear-gradient(135deg, var(--green), #059669);
  color: white;
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16,185,129,0.3); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* --- OUTPUT BOX --- */
.output-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 80px;
  line-height: 1.6;
  position: relative;
}
.output-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

/* --- STATS CHIPS --- */
.stats-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.chip {
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip strong { color: var(--purple); }
.chip.cyan { background: rgba(6,182,212,0.1); border-color: rgba(6,182,212,0.2); }
.chip.cyan strong { color: var(--cyan); }
.chip.green { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); }
.chip.green strong { color: var(--green); }

/* --- SIDEBAR --- */
.tool-sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.sidebar-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.related-tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--transition);
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.related-tool-link:hover {
  background: rgba(139,92,246,0.1);
  color: var(--text-primary);
}
.related-tool-link .ri { font-size: 1rem; color: var(--purple); width: 20px; flex-shrink: 0; }
.sidebar-ad {
  background: rgba(139,92,246,0.05);
  border: 1px dashed rgba(139,92,246,0.2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sidebar-ad .ad-label { margin-bottom: 0; }
.sidebar-ad .ad-slot-text { color: var(--text-muted); font-size: 0.8rem; }

/* --- SEO CONTENT --- */
.seo-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
}
.seo-content h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 12px; }
.seo-content h3 { font-size: 1rem; font-weight: 600; color: var(--purple); margin: 20px 0 8px; }
.seo-content p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 14px; }
.seo-content ul { color: var(--text-secondary); font-size: 0.9rem; padding-left: 20px; margin-bottom: 14px; }
.seo-content li { margin-bottom: 6px; line-height: 1.6; }

/* --- FAQ --- */
.faq-section { margin-top: 24px; }
.faq-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  user-select: none;
}
.faq-question:hover { background: rgba(255,255,255,0.03); }
.faq-icon { color: var(--purple); font-size: 1rem; transition: transform 0.3s; }
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 400px; padding: 0 20px 16px; }
.faq-item.open .faq-icon { transform: rotate(180deg); }

/* --- CATEGORY PAGE HERO --- */
.cat-hero {
  position: relative;
  z-index: 1;
  padding: 60px 24px 40px;
  text-align: center;
}
.cat-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 14px; }
.cat-hero p { color: var(--text-secondary); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* --- FOOTER --- */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 40px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; margin-top: 12px; max-width: 260px; }
.footer-col h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--purple); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: var(--purple); }

/* --- LOADING SPINNER --- */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(139,92,246,0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- TOAST --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: rgba(15,15,26,0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(20px);
  animation: toastIn 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  max-width: 320px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.success .toast-icon { color: var(--green); }
.toast.error { border-color: rgba(239,68,68,0.4); }
.toast.error .toast-icon { color: #ef4444; }
.toast.info { border-color: rgba(139,92,246,0.4); }
.toast.info .toast-icon { color: var(--purple); }
@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --- SCROLL ANIMATIONS --- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- DIFF VIEW (Text Compare) --- */
.diff-line { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; padding: 4px 10px; border-radius: 4px; margin: 2px 0; }
.diff-added { background: rgba(16,185,129,0.12); color: #6ee7b7; border-left: 3px solid var(--green); }
.diff-removed { background: rgba(239,68,68,0.12); color: #fca5a5; border-left: 3px solid #ef4444; }
.diff-same { color: var(--text-muted); }

/* --- PROGRESS BAR --- */
.progress-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-bar { height: 100%; border-radius: 6px; transition: width 0.4s ease; }
.progress-bar.purple { background: linear-gradient(90deg, var(--purple), var(--cyan)); }
.progress-bar.green { background: linear-gradient(90deg, var(--green), #059669); }
.progress-bar.orange { background: linear-gradient(90deg, var(--orange), #dc2626); }

/* --- TAG CLOUD --- */
.keyword-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.keyword-row:last-child { border-bottom: none; }
.kw-word { flex: 0 0 160px; color: var(--text-primary); font-weight: 500; }
.kw-count { flex: 0 0 50px; color: var(--cyan); font-weight: 600; }
.kw-density { flex: 1; }
.kw-bar-wrap { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; }
.kw-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--purple), var(--cyan)); }

/* --- PAGE HEADER (Category/Tool Pages) --- */
.page-header {
  position: relative;
  z-index: 1;
  padding: 48px 24px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(139,92,246,0.05) 0%, transparent 100%);
}
.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-menu { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(10,10,15,0.98); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--border); backdrop-filter: blur(20px); }
  .nav-menu.open { display: flex; }
  .hamburger { display: flex; }
  .site-header { position: relative; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-bar { gap: 24px; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; justify-content: center; }
}
