/* ============================================
   عالم الذكاء — Dark Cosmos Design System
   ============================================ */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&family=Syne:wght@700;800&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg-void: #020408;
  --bg-surface: #080D18;
  --bg-elevated: #0D1526;
  --bg-overlay: #111B30;
  --primary: #6366F1;
  --primary-bright: #818CF8;
  --accent: #22D3EE;
  --accent-warm: #F472B6;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #475569;
  --border: rgba(99,102,241,0.15);
  --border-bright: rgba(99,102,241,0.4);
  --glow-primary: 0 0 40px rgba(99,102,241,0.3);
  --glow-accent: 0 0 40px rgba(34,211,238,0.2);

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 17px;
  --text-lg: 19px;
  --text-xl: 22px;
  --text-2xl: 26px;
  --text-3xl: 32px;
  --text-4xl: 40px;
  --text-5xl: 48px;
  --text-6xl: 60px;
  --text-7xl: 72px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.5s cubic-bezier(0.4,0,0.2,1);
}

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

html {
  direction: rtl;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Tajawal', sans-serif;
  font-weight: 400;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-bright); }

/* ===== SELECTION ===== */
::selection { background: rgba(99,102,241,0.3); color: var(--text-primary); }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.display-font { font-family: 'Syne', sans-serif; }

a { color: inherit; text-decoration: none; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: 'Tajawal', sans-serif; border: none; outline: none; }
input, textarea, select {
  font-family: 'Tajawal', sans-serif;
  outline: none;
  border: none;
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: rgba(13,21,38,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
}

.glass-bright {
  background: rgba(99,102,241,0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-bright);
}

/* ===== GRADIENT UTILITIES ===== */
.gradient-text {
  background: linear-gradient(135deg, #818CF8, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-warm {
  background: linear-gradient(135deg, #F472B6, #FB923C);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ===== READING PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(2,4,8,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(99,102,241,0.1);
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(2,4,8,0.96);
  border-bottom-color: rgba(99,102,241,0.2);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 8px rgba(99,102,241,0.6));
  line-height: 1;
}

.logo-text {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: var(--text-xl);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  right: 16px;
  left: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transition: transform var(--transition);
  transform-origin: center;
}

.nav-link:hover { color: var(--text-primary); background: rgba(99,102,241,0.08); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--text-primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav open state */
.nav-links.open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 68px;
  right: 0;
  left: 0;
  background: rgba(2,4,8,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 4px;
  z-index: 999;
  animation: fadeInUp 0.2s ease;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(99,102,241,0.45);
  color: white;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-bright);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-ghost:hover {
  background: rgba(99,102,241,0.1);
  color: var(--text-primary);
  border-color: var(--primary-bright);
  box-shadow: 0 0 20px rgba(99,102,241,0.15);
}

.btn-affiliate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #F472B6, #FB923C);
  color: white;
  font-family: 'Tajawal', sans-serif;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-affiliate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(244,114,182,0.4);
  color: white;
}

/* ===== SECTIONS ===== */
.section { padding: 96px 0; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header-left { display: flex; flex-direction: column; gap: 8px; }

.section-title { font-size: var(--text-4xl); font-weight: 700; line-height: 1.2; }
.section-subtitle { color: var(--text-secondary); font-size: var(--text-md); max-width: 520px; line-height: 1.7; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.18) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.5;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99,102,241,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(34,211,238,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 80%, rgba(244,114,182,0.07) 0%, transparent 60%);
  animation: meshShift 12s ease-in-out infinite;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.2) 1px, transparent 1px);
  background-size: 48px 48px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.22), transparent);
  top: -150px; right: -150px;
  animation: floatOrb 8s ease-in-out infinite;
}

.orb-2 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(34,211,238,0.13), transparent);
  bottom: -50px; left: -100px;
  animation: floatOrb 10s ease-in-out infinite reverse;
}

.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(244,114,182,0.1), transparent);
  top: 50%; left: 40%;
  transform: translate(-50%,-50%);
  animation: floatOrb 14s ease-in-out infinite 2s;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary-bright);
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease both;
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulseGlow 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeInUp 0.6s ease 0.2s both;
  line-height: 1.8;
}

.hero-search { animation: fadeInUp 0.6s ease 0.3s both; }

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 20px;
  border-radius: var(--radius-xl);
  max-width: 600px;
  margin: 0 auto 20px;
  transition: all var(--transition);
}

.search-wrapper:focus-within {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15), var(--glow-primary);
}

.search-icon { color: var(--text-muted); flex-shrink: 0; }

.search-wrapper input {
  flex: 1;
  background: transparent;
  color: var(--text-primary);
  font-size: var(--text-base);
  min-width: 0;
}

.search-wrapper input::placeholder { color: var(--text-muted); }
.search-btn { flex-shrink: 0; border-radius: 14px; }

.popular-searches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.popular-label { font-size: var(--text-sm); color: var(--text-muted); }

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}

.tag-pill:hover {
  background: rgba(99,102,241,0.2);
  border-color: var(--border-bright);
  color: var(--primary-bright);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: fadeInUp 0.6s ease 0.8s both;
}

.scroll-line {
  width: 2px; height: 48px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
  border-radius: var(--radius-full);
}

/* ===== STATS BAR ===== */
.stats-bar { padding: 0 0 40px; }

.stats-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 32px 48px;
  border-radius: var(--radius-xl);
  animation: fadeInUp 0.6s ease 0.5s both;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1;
}

.stat-plus {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
}

.stat-label { font-size: var(--text-sm); color: var(--text-muted); font-weight: 500; }

.stat-divider {
  width: 1px; height: 52px;
  background: linear-gradient(180deg, transparent, var(--border-bright), transparent);
}

/* ===== AD SLOTS ===== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px dashed rgba(99,102,241,0.2);
  border-radius: var(--radius-md);
  background: rgba(13,21,38,0.3);
  text-transform: uppercase;
  transition: all var(--transition);
}

.ad-slot:hover { border-color: rgba(99,102,241,0.35); }
.ad-slot-horizontal { height: 90px; margin: 8px 0 32px; }
.ad-slot-square { height: 250px; margin: 16px 0; }
.ad-slot-sidebar { min-height: 200px; margin: 16px 0; }

/* ===== CATEGORIES ===== */
.categories-section { padding: 80px 0; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--glow-primary), 0 20px 40px rgba(0,0,0,0.3);
}

.category-card:hover::after { opacity: 1; }

.category-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.category-name { font-size: var(--text-md); font-weight: 700; color: var(--text-primary); }

.category-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: rgba(99,102,241,0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

/* ===== TOOLS GRID ===== */
.tools-section { background: var(--bg-void); padding: 96px 0; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(99,102,241,0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), var(--glow-primary);
  border-color: var(--border-bright);
}

.tool-card:hover::before { opacity: 1; }

.tool-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
}

.tool-header { display: flex; align-items: flex-start; gap: 14px; }

.tool-logo {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: white;
  font-family: 'Syne', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.tool-info { flex: 1; min-width: 0; }

.tool-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-category-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--primary-bright);
  font-weight: 500;
}

.pricing-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.pricing-free { background: rgba(52,211,153,0.15); color: #34D399; border: 1px solid rgba(52,211,153,0.3); }
.pricing-paid { background: rgba(244,63,94,0.15); color: #F43F5E; border: 1px solid rgba(244,63,94,0.3); }
.pricing-freemium { background: rgba(245,158,11,0.15); color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }

.tool-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.tool-rating { display: flex; align-items: center; gap: 6px; }
.stars { color: #F59E0B; font-size: var(--text-sm); letter-spacing: 1px; }
.rating-number { font-size: var(--text-sm); font-weight: 700; color: var(--text-primary); }
.rating-count { font-size: var(--text-xs); color: var(--text-muted); }

/* ===== CHARTS ===== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.chart-container {
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.chart-wide { grid-column: span 2; }

.chart-title {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #818CF8, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.chart-svg { width: 100%; height: auto; display: block; }

.chart-axis-label {
  fill: #475569;
  font-family: 'Tajawal', sans-serif;
  font-size: 10px;
}

.chart-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 0;
}

.donut-wrapper {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
}

.donut-svg {
  width: 190px; height: 190px;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.donut-segment { stroke-linecap: round; }

.donut-legend { display: flex; flex-direction: column; gap: 10px; }

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.donut-legend-item span {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Horizontal Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }

.bar-row { display: flex; align-items: center; gap: 16px; }

.bar-label {
  width: 100px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  text-align: right;
  flex-shrink: 0;
}

.bar-track {
  flex: 1; height: 28px;
  background: rgba(99,102,241,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: width 0.9s cubic-bezier(0.4,0,0.2,1);
  min-width: 48px;
}

.bar-value { font-size: var(--text-xs); font-weight: 700; color: white; }

.stacked-bar { transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }

/* ===== COMPARISON TABLE ===== */
.compare-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare-table th {
  padding: 18px 22px;
  text-align: center;
  font-weight: 700;
  font-size: var(--text-base);
  background: var(--bg-elevated);
  color: var(--text-primary);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.compare-table th:first-child { text-align: right; }

.compare-table td {
  padding: 14px 22px;
  text-align: center;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(99,102,241,0.06);
  transition: all var(--transition);
}

.compare-table td:first-child { text-align: right; font-weight: 500; color: var(--text-primary); }
.compare-table tr:nth-child(even) td { background: rgba(13,21,38,0.4); }
.compare-table tr:hover td { background: rgba(99,102,241,0.05); }

.winner-col {
  background: rgba(99,102,241,0.1) !important;
  border-right: 1px solid rgba(99,102,241,0.3) !important;
  border-left: 1px solid rgba(99,102,241,0.3) !important;
}

.winner-col-header {
  background: rgba(99,102,241,0.18) !important;
  color: var(--primary-bright) !important;
  border-right: 1px solid rgba(99,102,241,0.4) !important;
  border-left: 1px solid rgba(99,102,241,0.4) !important;
}

.check-icon { color: var(--accent); font-size: 16px; font-weight: 700; }
.x-icon { color: #F43F5E; font-size: 16px; }

/* ===== RADAR CHART ===== */
.radar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.radar-svg { width: 320px; height: 320px; overflow: visible; }

.radar-web { fill: none; stroke: rgba(99,102,241,0.15); stroke-width: 1; }
.radar-axis { stroke: rgba(99,102,241,0.2); stroke-width: 1; }

.radar-data {
  fill-opacity: 0.15;
  stroke-width: 2.5;
  transition: fill-opacity var(--transition);
}
.radar-data:hover { fill-opacity: 0.3; }

.radar-label {
  fill: #94A3B8;
  font-family: 'Tajawal', sans-serif;
  font-size: 12px;
  text-anchor: middle;
}

.radar-legend { display: flex; flex-direction: column; gap: 14px; }

.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.radar-legend-color {
  width: 20px; height: 3px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ===== BLOG CARDS ===== */
.blog-section { background: var(--bg-void); padding: 96px 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), var(--glow-primary);
}

.blog-card:hover .glass { border-color: var(--border-bright); }

.blog-card-image {
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.blog-category-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: white;
}

.blog-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-card-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ===== NEWSLETTER ===== */
.newsletter-section { padding: 80px 0; }

.newsletter-box {
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-glow {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15), transparent);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}

.newsletter-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }

.newsletter-content h2 { font-size: var(--text-3xl); font-weight: 700; margin-bottom: 12px; }
.newsletter-content p { color: var(--text-secondary); font-size: var(--text-md); margin-bottom: 28px; line-height: 1.7; }

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 14px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
}

.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-note { font-size: var(--text-xs) !important; color: var(--text-muted) !important; margin-bottom: 0 !important; }

/* ===== FOOTER ===== */
.footer { background: var(--bg-void); border-top: 1px solid var(--border); }

.footer-gradient-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--primary), transparent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 64px 24px 48px;
}

.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand .logo { margin-bottom: 4px; }
.footer-brand p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.8; max-width: 280px; }

.social-links { display: flex; gap: 10px; }

.social-link {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}

.social-link:hover {
  background: rgba(99,102,241,0.2);
  border-color: var(--border-bright);
  color: var(--primary-bright);
  transform: translateY(-2px);
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links h4 { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.footer-links a { font-size: var(--text-sm); color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--primary-bright); }

.footer-bottom { border-top: 1px solid var(--border); padding: 20px 24px; }

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p { font-size: var(--text-xs); color: var(--text-muted); }

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated), var(--bg-overlay), var(--bg-elevated));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: white;
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  direction: rtl;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: linear-gradient(135deg, #059669, #10B981); }
.toast-error { background: linear-gradient(135deg, #DC2626, #F43F5E); }

/* ===== ANIMATE ON SCROLL ===== */
/* Elements above the fold (hero, stats) never use this class — safe to hide */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1), transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* ===== FILTER SIDEBAR (tools.html) ===== */
.tools-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: flex-start;
}

.sidebar {
  position: sticky;
  top: 88px;
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-section h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(13,21,38,0.6);
  transition: all var(--transition);
}

.sidebar-search:focus-within {
  border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.sidebar-search input { flex: 1; background: transparent; color: var(--text-primary); font-size: var(--text-sm); }
.sidebar-search input::placeholder { color: var(--text-muted); }

.filter-pills { display: flex; flex-direction: column; gap: 6px; }

.filter-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: right;
  width: 100%;
  font-family: 'Tajawal', sans-serif;
}

.filter-pill:hover { background: rgba(99,102,241,0.08); color: var(--text-primary); border-color: var(--border); }
.filter-pill.active { background: rgba(99,102,241,0.15); color: var(--primary-bright); border-color: var(--border-bright); }

.filter-pill-count {
  font-size: var(--text-xs);
  background: rgba(99,102,241,0.15);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--primary-bright);
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition);
}

.filter-checkbox:hover { color: var(--text-primary); }

.filter-checkbox input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.star-filter { display: flex; flex-direction: column; gap: 6px; }

.star-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.star-option:hover { background: rgba(99,102,241,0.08); }
.star-option.selected { background: rgba(99,102,241,0.12); color: var(--text-primary); }
.star-option .stars { font-size: 13px; }

.load-more-wrap { text-align: center; padding: 40px 0; }

/* ===== COMPARE PAGE ===== */
.tool-selector-section {
  padding: 48px 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.tool-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}

.tool-selector-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selector-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.glass-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(13,21,38,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 36px;
}

.glass-select:focus { border-color: var(--primary-bright); outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }

.compare-vs {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-2xl);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  padding: 0 8px;
}

.tool-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.tool-spotlight-card {
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  position: relative;
}

.winner-badge-absolute {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(99,102,241,0.5);
}

.spotlight-logo {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: white;
  font-family: 'Syne', sans-serif;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.spotlight-name { font-size: var(--text-xl); font-weight: 700; margin-bottom: 8px; }
.spotlight-stars { color: #F59E0B; font-size: var(--text-md); letter-spacing: 2px; margin-bottom: 6px; }
.spotlight-stat { font-size: var(--text-sm); color: var(--text-secondary); }

/* ===== ARTICLE PAGE ===== */
.article-layout {
  display: grid;
  grid-template-columns: 260px 1fr 240px;
  gap: 40px;
  align-items: flex-start;
  padding: 40px 0 80px;
}

.toc {
  position: sticky;
  top: 88px;
  border-radius: var(--radius-xl);
  padding: 24px;
}

.toc h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #818CF8, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.toc-list { display: flex; flex-direction: column; gap: 2px; }

.toc-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.5;
}

.toc-item:hover { background: rgba(99,102,241,0.08); color: var(--text-primary); }
.toc-item.active { background: rgba(99,102,241,0.12); color: var(--primary-bright); border-color: var(--border); }

.toc-num { font-size: var(--text-xs); color: var(--primary-bright); font-weight: 700; flex-shrink: 0; margin-top: 3px; }

.article-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 88px; }

.article-body { max-width: 720px; }

.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: rgba(99,102,241,0.15);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary-bright);
  margin-bottom: 20px;
}

.article-title { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); font-weight: 800; line-height: 1.2; margin-bottom: 20px; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.article-meta-item { display: flex; align-items: center; gap: 6px; }

.article-content h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 44px 0 16px;
  color: var(--text-primary);
  padding-right: 16px;
  border-right: 3px solid var(--primary);
  scroll-margin-top: 90px;
}

.article-content h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--primary-bright);
  scroll-margin-top: 90px;
}

.article-content p { color: var(--text-secondary); font-size: var(--text-base); line-height: 1.9; margin-bottom: 20px; }

.article-content ul { list-style: none; margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }

.article-content ul li {
  color: var(--text-secondary);
  font-size: var(--text-base);
  padding-right: 20px;
  position: relative;
  line-height: 1.7;
}

.article-content ul li::before {
  content: '▸';
  color: var(--primary);
  position: absolute;
  right: 0;
  font-size: 12px;
  top: 4px;
}

.article-tool-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-tool-info { flex: 1; min-width: 200px; }
.article-tool-info h4 { font-size: var(--text-lg); font-weight: 700; margin-bottom: 6px; }
.article-tool-info p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.7; margin: 0; }

.author-bio {
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.author-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.author-info h4 { font-size: var(--text-md); font-weight: 700; margin-bottom: 4px; }
.author-info p { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; }

.share-buttons { display: flex; align-items: center; gap: 10px; margin-top: 40px; flex-wrap: wrap; }

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: rgba(13,21,38,0.6);
  color: var(--text-secondary);
  font-family: 'Tajawal', sans-serif;
}

.share-btn:hover {
  background: rgba(99,102,241,0.15);
  border-color: var(--border-bright);
  color: var(--primary-bright);
  transform: translateY(-1px);
}

/* ===== BLOG PAGE ===== */
.featured-post {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
}

.featured-post-image {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 32px;
  min-height: 380px;
}

.featured-post-content {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
}

.featured-post-content h2 { font-size: var(--text-3xl); font-weight: 800; line-height: 1.3; }
.featured-post-content p { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.8; }

.blog-sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget { border-radius: var(--radius-xl); padding: 24px; }

.sidebar-widget h4 {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #818CF8, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.trending-list { display: flex; flex-direction: column; gap: 12px; }

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
  cursor: pointer;
}

.trending-item:hover { background: rgba(99,102,241,0.08); }

.trending-num {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--primary-bright);
  opacity: 0.6;
  flex-shrink: 0;
  width: 24px;
  line-height: 1.3;
}

.trending-title { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; }

.category-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.cloud-tag {
  padding: 5px 12px;
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}

.cloud-tag:hover { background: rgba(99,102,241,0.2); border-color: var(--border-bright); color: var(--primary-bright); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 140px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.12) 0%, transparent 70%);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99,102,241,0.1) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
}

.page-hero-content { position: relative; z-index: 1; }

.page-hero h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.page-hero p { font-size: var(--text-lg); color: var(--text-secondary); max-width: 560px; margin: 0 auto; line-height: 1.8; }

/* ===== RELATED POSTS ===== */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.related-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.related-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }

.related-card-image { height: 100px; }
.related-card-body { padding: 14px; }
.related-card-title { font-size: var(--text-sm); font-weight: 700; line-height: 1.4; color: var(--text-primary); }
.related-card-meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 6px; }

/* ===== MISC UTILITIES ===== */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.mt-8 { margin-top: 32px; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  background: rgba(99,102,241,0.1);
  border: 1px solid var(--border-bright);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 17px;
  flex-shrink: 0;
  color: var(--text-primary);
}
.theme-toggle:hover {
  background: rgba(99,102,241,0.22);
  transform: rotate(20deg);
  box-shadow: 0 0 14px rgba(99,102,241,0.3);
}

/* ===== SPOTLIGHT (Tool of the Day) ===== */
.spotlight-section { background: var(--bg-void); padding: 80px 0; }

.spotlight-card {
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.spotlight-card::after {
  content: '';
  position: absolute;
  top: -60px; left: -60px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(99,102,241,0.15), transparent);
  border-radius: 50%;
  pointer-events: none;
}
.spotlight-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 5px 14px;
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 12px rgba(245,158,11,0.4);
}
.spotlight-inner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.spotlight-logo {
  width: 80px; height: 80px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: white;
  font-family: 'Syne', sans-serif;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.spotlight-content { flex: 1; min-width: 0; }
.spotlight-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.spotlight-category {
  font-size: var(--text-xs); color: var(--text-muted);
  background: rgba(99,102,241,0.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}
.spotlight-stars { font-size: var(--text-sm); color: #F59E0B; font-weight: 600; }
.spotlight-title { font-size: var(--text-2xl); font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.spotlight-desc { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; max-width: 700px; }
.spotlight-features { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.feature-tag {
  padding: 5px 14px;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 500;
}
.spotlight-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ===== TRENDING TOOLS ===== */
.trending-section { padding: 80px 0; }
.trending-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.trending-tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.trending-tool-card:hover {
  transform: translateX(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--glow-primary);
}
.trending-rank {
  font-family: 'Syne', sans-serif;
  font-size: var(--text-3xl);
  font-weight: 800;
  background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(34,211,238,0.2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  width: 44px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.trending-rank.top { background: linear-gradient(135deg, #F59E0B, #F97316); -webkit-background-clip: text; background-clip: text; }
.trending-logo {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: white;
  font-family: 'Syne', sans-serif;
  flex-shrink: 0;
}
.trending-info { flex: 1; min-width: 0; }
.trending-name { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.trending-meta { font-size: var(--text-xs); color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.trending-stars { color: #F59E0B; }
.trending-badge {
  margin-right: auto;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  background: rgba(99,102,241,0.12);
  border: 1px solid var(--border);
  color: var(--primary-bright);
  white-space: nowrap;
}

/* ===== HOW IT WORKS ===== */
.howto-section { background: var(--bg-void); padding: 80px 0; }
.howto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.howto-step {
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.howto-step:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: var(--glow-primary), 0 20px 40px rgba(0,0,0,0.3);
}
.step-number {
  font-family: 'Syne', sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.25;
  position: absolute;
  top: 12px; left: 20px;
}
.step-icon {
  font-size: 40px;
  margin-top: 16px;
}
.howto-step h3 { font-size: var(--text-xl); font-weight: 700; }
.howto-step p { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.8; }

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
  --bg-void: #EEF2FF;
  --bg-surface: #F8FAFF;
  --bg-elevated: #FFFFFF;
  --bg-overlay: #E8EEFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: rgba(99,102,241,0.13);
  --border-bright: rgba(99,102,241,0.32);
  --glow-primary: 0 0 30px rgba(99,102,241,0.12);
  --glow-accent: 0 0 30px rgba(34,211,238,0.08);
}

[data-theme="light"] .navbar {
  background: rgba(248,250,255,0.92);
  border-bottom-color: rgba(99,102,241,0.1);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(248,250,255,0.98);
  box-shadow: 0 4px 24px rgba(99,102,241,0.08);
}
[data-theme="light"] .nav-links.open {
  background: rgba(248,250,255,0.99);
  backdrop-filter: blur(20px);
}
[data-theme="light"] .glass {
  background: rgba(255,255,255,0.88);
  border-color: rgba(99,102,241,0.1);
}
[data-theme="light"] .glass-bright {
  background: rgba(99,102,241,0.05);
  border-color: rgba(99,102,241,0.22);
}
[data-theme="light"] .hero-bg::before { opacity: 0.25; }
[data-theme="light"] .orb-1 { background: radial-gradient(circle, rgba(99,102,241,0.12), transparent); }
[data-theme="light"] .orb-2 { background: radial-gradient(circle, rgba(34,211,238,0.08), transparent); }
[data-theme="light"] .orb-3 { background: radial-gradient(circle, rgba(244,114,182,0.07), transparent); }
[data-theme="light"] .dot-grid { background-image: radial-gradient(circle, rgba(99,102,241,0.15) 1px, transparent 1px); }
[data-theme="light"] .tools-section { background: var(--bg-surface); }
[data-theme="light"] .blog-section { background: var(--bg-surface); }
[data-theme="light"] .spotlight-section { background: var(--bg-surface); }
[data-theme="light"] .howto-section { background: var(--bg-surface); }
[data-theme="light"] .ad-slot {
  background: rgba(99,102,241,0.03);
  border-color: rgba(99,102,241,0.13);
}
[data-theme="light"] .category-count { background: rgba(99,102,241,0.07); }
[data-theme="light"] .tool-category-tag { background: rgba(99,102,241,0.07); }
[data-theme="light"] .tag-pill { background: rgba(99,102,241,0.07); }
[data-theme="light"] .tag-pill:hover { background: rgba(99,102,241,0.14); }
[data-theme="light"] .compare-table th { background: rgba(248,250,255,0.95); }
[data-theme="light"] .compare-table tr:nth-child(even) td { background: rgba(99,102,241,0.03); }
[data-theme="light"] .featured-post-content { background: var(--bg-elevated); }
[data-theme="light"] .share-btn { background: rgba(248,250,255,0.9); }
[data-theme="light"] .chart-section { background: var(--bg-surface) !important; }
[data-theme="light"] .chart-axis-label { fill: #64748B; }
[data-theme="light"] .radar-web { stroke: rgba(99,102,241,0.12); }
[data-theme="light"] .radar-axis { stroke: rgba(99,102,241,0.15); }
[data-theme="light"] .radar-label { fill: #475569; }
[data-theme="light"] .bar-track { background: rgba(99,102,241,0.06); border-color: rgba(99,102,241,0.1); }
[data-theme="light"] .footer { background: var(--bg-elevated); }
[data-theme="light"] .footer-bottom { background: var(--bg-void); }
[data-theme="light"] .winner-col { background: rgba(99,102,241,0.07) !important; }
[data-theme="light"] .winner-col-header { background: rgba(99,102,241,0.12) !important; }
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-surface); }
[data-theme="light"] ::selection { background: rgba(99,102,241,0.18); color: var(--text-primary); }
[data-theme="light"] .spotlight-card::after { background: radial-gradient(circle, rgba(99,102,241,0.08), transparent); }
[data-theme="light"] .tool-card:hover { box-shadow: 0 12px 40px rgba(99,102,241,0.12), 0 4px 12px rgba(0,0,0,0.08); }
[data-theme="light"] .blog-card:hover { box-shadow: 0 12px 40px rgba(99,102,241,0.12); }
[data-theme="light"] .category-card:hover { box-shadow: 0 8px 30px rgba(99,102,241,0.12); }
[data-theme="light"] .howto-step:hover { box-shadow: 0 8px 30px rgba(99,102,241,0.12); }
[data-theme="light"] .trending-tool-card:hover { box-shadow: 0 4px 20px rgba(99,102,241,0.1); }

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(34,211,238,0.6); opacity: 1; }
  50% { box-shadow: 0 0 24px rgba(34,211,238,0.9); opacity: 0.7; }
}

@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes meshShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.9); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-wide { grid-column: span 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .article-layout { grid-template-columns: 1fr; }
  .toc, .article-sidebar { position: static; }
  .tools-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .tool-selectors { grid-template-columns: 1fr; }
  .compare-vs { display: none; }
  .tool-spotlight-grid { grid-template-columns: 1fr; gap: 16px; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-content { border-right: none; border-top: 1px solid var(--border); }
  .trending-tools-grid { grid-template-columns: 1fr; }
  .howto-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .stats-inner { flex-direction: column; gap: 20px; padding: 28px 24px; }
  .stat-divider { width: 80px; height: 1px; }
  .section { padding: 64px 0; }
  .section-title { font-size: var(--text-3xl); }
  .newsletter-box { padding: 40px 24px; }
  .newsletter-form { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom .container { flex-direction: column; text-align: center; }
  .donut-wrapper { flex-direction: column; }
  .radar-container { flex-direction: column; }
  .tool-spotlight-grid { grid-template-columns: 1fr; }
  .spotlight-inner { flex-direction: column; align-items: center; text-align: center; }
  .spotlight-actions { justify-content: center; }
  .howto-grid { grid-template-columns: 1fr; }
  .trending-tools-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: 1fr; }
  .section-title { font-size: var(--text-2xl); }
  .newsletter-content h2 { font-size: var(--text-2xl); }
  .stats-inner { padding: 20px 16px; }
  .share-buttons { flex-direction: column; align-items: flex-start; }
  .spotlight-card { padding: 24px 20px; }
  .spotlight-logo { width: 60px; height: 60px; font-size: 24px; }
  .spotlight-title { font-size: var(--text-xl); }
}
