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

:root {
  /* ═══ VIBE FARSI — OBSIDIAN & CRIMSON THEME ═══ */
  --bg-deep: #09090b;
  --bg-panel: #111114;
  --bg-surface: #17171c;
  --bg-elevated: #202027;
  --bg-hover: #292932;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #8b92a2;
  --text-dim: #545b6a;

  /* Erfan Brand Accent (Crimson Red & Neon Glow) */
  --brand: #dc2626;
  --brand-light: #ef4444;
  --brand-dark: #b91c1c;
  --brand-glow: rgba(220, 38, 38, 0.18);
  --brand-glow-strong: rgba(220, 38, 38, 0.35);

  /* Modern Glass & Depth */
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --border-brand: rgba(220, 38, 38, 0.5);
  --glass: rgba(23, 23, 28, 0.65);
  --glass-hover: rgba(32, 32, 39, 0.85);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px var(--brand-glow);

  --transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Vazirmatn', 'Inter', system-ui, -apple-system, sans-serif;
      background: var(--bg-deep);
      color: var(--text-primary);
      line-height: 1.7;
      min-height: 100vh;
      overflow-x: hidden;
    }

    /* ─── HEADER ─── */
    .header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(10,10,11,0.88);
      backdrop-filter: blur(24px) saturate(1.3);
      -webkit-backdrop-filter: blur(24px) saturate(1.3);
      border-bottom: 1px solid var(--border);
      padding: 0 24px;
    }
    .header-inner {
      max-width: 1280px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 64px;
    }
    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
      color: var(--text-primary);
    }
    .logo-icon {
      width: 34px;
      height: 34px;
      background: linear-gradient(135deg, var(--brand), var(--brand-light));
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      font-weight: 700;
      color: white;
      letter-spacing: -0.5px;
    }
    .logo-text {
      font-size: 18px;
      font-weight: 700;
      letter-spacing: -0.3px;
    }
    .nav-links {
      display: flex;
      gap: 6px;
      align-items: center;
    }
    .nav-link {
      padding: 7px 14px;
      border-radius: var(--radius-sm);
      font-size: 14px;
      font-weight: 500;
      color: var(--text-secondary);
      text-decoration: none;
      cursor: pointer;
      transition: all var(--transition);
      border: none;
      background: none;
      font-family: inherit;
    }
    .nav-link:hover, .nav-link.active {
      color: var(--text-primary);
      background: var(--glass-hover);
    }
    .nav-link.active {
      color: var(--brand-light);
    }
    .hamburger {
      display: none;
      background: none;
      border: none;
      color: var(--text-primary);
      font-size: 24px;
      cursor: pointer;
      padding: 8px;
    }

    /* ─── SEARCH ─── */
    .search-section {
      max-width: 1280px;
      margin: 0 auto;
      padding: 20px 24px 0;
    }
    .search-bar {
      position: relative;
      max-width: 560px;
      margin: 0 auto;
    }
    .search-bar input {
      width: 100%;
      padding: 13px 48px 13px 20px;
      background: var(--bg-surface);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-md);
      color: var(--text-primary);
      font-size: 15px;
      font-family: inherit;
      outline: none;
      transition: all var(--transition);
    }
    .search-bar input::placeholder { color: var(--text-muted); }
    .search-bar input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px var(--brand-glow);
    }
    .search-icon {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      font-size: 16px;
      pointer-events: none;
    }

    /* ─── WIZARD ─── */
    .wizard-section {
      max-width: 1280px;
      margin: 0 auto;
      padding: 36px 24px;
    }
    .wizard-container {
      background: linear-gradient(160deg, var(--bg-panel) 0%, var(--bg-surface) 100%);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      padding: 36px;
      position: relative;
      overflow: hidden;
    }
    .wizard-container::before {
      content: '';
      position: absolute;
      top: -80px;
      right: -80px;
      width: 280px;
      height: 280px;
      background: radial-gradient(circle, var(--brand-glow-strong), transparent 70%);
      pointer-events: none;
    }
    .wizard-title {
      font-size: 22px;
      font-weight: 700;
      margin-bottom: 6px;
      position: relative;
    }
    .wizard-subtitle {
      color: var(--text-muted);
      font-size: 14px;
      margin-bottom: 28px;
      position: relative;
    }
    .wizard-steps {
      display: flex;
      gap: 20px;
      margin-bottom: 24px;
      position: relative;
    }
    .wizard-step {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .step-num {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border-light);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .step-num.active {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }
    .step-num.done {
      background: #16a34a;
      border-color: #16a34a;
      color: white;
    }
    .step-label {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 500;
      white-space: nowrap;
    }
    .step-label.active { color: var(--text-primary); }

    .wizard-options {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      position: relative;
    }
    .wizard-option {
      padding: 10px 20px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-secondary);
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: all var(--transition);
      font-family: inherit;
    }
    .wizard-option:hover {
      border-color: var(--brand);
      color: var(--text-primary);
      background: var(--brand-glow);
    }
    .wizard-option.selected {
      border-color: var(--brand);
      background: var(--brand);
      color: white;
    }
    .wizard-result {
      display: none;
      margin-top: 24px;
      position: relative;
    }
    .wizard-result.show { display: block; }
    .wizard-result h3 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 14px;
      color: var(--brand-light);
    }
    .recommendation-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 12px;
    }
    .rec-card {
      padding: 18px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      transition: all var(--transition);
    }
    .rec-card:hover {
      border-color: var(--brand);
      transform: translateY(-2px);
      box-shadow: 0 4px 20px var(--brand-glow);
    }
    .rec-card-name {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .rec-card-desc {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 10px;
      line-height: 1.6;
    }
    .rec-card-link {
      display: inline-block;
      padding: 5px 14px;
      background: var(--brand);
      color: white;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      transition: all var(--transition);
    }
    .rec-card-link:hover { background: var(--brand-light); }

    /* ─── CATEGORIES ─── */
    .categories-section {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 24px 40px;
    }
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .section-title {
      font-size: 20px;
      font-weight: 700;
    }
    .section-badge {
      padding: 4px 12px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      font-size: 12px;
      color: var(--text-muted);
      font-weight: 500;
    }
    .category-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px;
    }
    .category-card {
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 26px;
      cursor: pointer;
      transition: all var(--transition);
      position: relative;
      overflow: hidden;
    }
    .category-card::before {
      content: '';
      position: absolute;
      inset: -1px;
      border-radius: inherit;
      background: radial-gradient(
        380px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
        rgba(220, 38, 38, 0.32),
        rgba(220, 38, 38, 0.06) 45%,
        transparent 70%
      );
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
      z-index: 1;
    }
    .category-card:hover::before {
      opacity: 1;
    }
    .category-card > * {
      position: relative;
      z-index: 2;
    }
    .category-card:hover {
      border-color: var(--border-brand);
      transform: translateY(-4px);
      box-shadow: var(--shadow-lg), 0 0 35px var(--brand-glow-strong);
    }
    .category-emoji {
      font-size: 34px;
      margin-bottom: 14px;
      display: block;
    }
    .category-name {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .category-desc {
      font-size: 13px;
      color: var(--text-muted);
      line-height: 1.7;
      margin-bottom: 14px;
    }
    .category-tools {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .tool-tag {
      padding: 3px 10px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      font-size: 11px;
      color: var(--text-secondary);
      font-weight: 500;
    }

    /* ─── VIP IRANIAN HUBS CARD & BANNER ─── */
    .category-card-vip {
      grid-column: 1 / -1;
      background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(20, 20, 26, 0.95) 100%) !important;
      border: 1px solid rgba(220, 38, 38, 0.4) !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(220, 38, 38, 0.15) !important;
      position: relative;
    }
    .category-card-vip:hover {
      border-color: var(--brand-light) !important;
      box-shadow: var(--shadow-lg), 0 0 45px rgba(220, 38, 38, 0.32) !important;
    }
    .vip-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: linear-gradient(135deg, #dc2626, #b91c1c);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: var(--radius-xl);
      margin-bottom: 12px;
      box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35);
      width: fit-content;
    }
    .tool-tag-vip {
      background: rgba(220, 38, 38, 0.18) !important;
      border-color: rgba(220, 38, 38, 0.4) !important;
      color: #fca5a5 !important;
      font-weight: 600 !important;
    }
    .iranian-notice-banner {
      width: 100%;
      background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(20, 20, 26, 0.6));
      border: 1px solid rgba(220, 38, 38, 0.3);
      border-radius: var(--radius-md);
      padding: 14px 18px;
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.8;
      margin-bottom: 16px;
    }
    .iranian-notice-banner strong {
      color: #fca5a5;
    }

    /* ─── TOOLS OVERLAY ─── */
    .tools-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 200;
      background: rgba(0,0,0,0.72);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .tools-overlay.show { display: flex; }
    .tools-panel {
      width: 100%;
      max-width: 880px;
      max-height: 85vh;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .tools-panel-header {
      flex-shrink: 0;
      background: var(--bg-panel);
      border-bottom: 1px solid var(--border);
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .tools-panel-title {
      font-size: 18px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .tools-panel-close {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
    }
    .tools-panel-close:hover {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }
    .tools-panel-body {
      padding: 20px 24px;
      overflow-y: auto;
      flex: 1;
    }
    .filter-bar {
      display: flex;
      gap: 8px;
      margin-bottom: 18px;
      flex-wrap: wrap;
    }
    .filter-btn {
      padding: 5px 14px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      font-size: 13px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all var(--transition);
      font-family: inherit;
      font-weight: 500;
    }
    .filter-btn:hover, .filter-btn.active {
      border-color: var(--brand);
      color: white;
      background: var(--brand);
    }
    .tool-card {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 14px;
      align-items: center;
      padding: 16px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      margin-bottom: 8px;
      transition: all var(--transition);
      position: relative;
      overflow: hidden;
    }
    .tool-card::before {
      content: '';
      position: absolute;
      inset: -1px;
      border-radius: inherit;
      background: radial-gradient(
        320px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
        rgba(220, 38, 38, 0.28),
        rgba(220, 38, 38, 0.04) 40%,
        transparent 70%
      );
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
      z-index: 1;
    }
    .tool-card:hover::before {
      opacity: 1;
    }
    .tool-card > * {
      position: relative;
      z-index: 2;
    }
    .tool-card:hover {
      border-color: var(--border-brand);
      background: var(--glass-hover);
      transform: translateY(-2px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 25px var(--brand-glow);
    }
    .tool-icon {
      width: 44px;
      height: 44px;
      border-radius: var(--radius-md);
      background: var(--bg-surface);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      flex-shrink: 0;
    }
    .tool-info h4 {
      font-size: 15px;
      font-weight: 600;
      margin-bottom: 2px;
    }
    .tool-info p {
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.5;
    }
    .tool-meta {
      display: flex;
      gap: 6px;
      align-items: center;
      flex-wrap: wrap;
    }
    .tool-badge {
      padding: 3px 8px;
      border-radius: var(--radius-sm);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.3px;
    }
    .badge-free { background: rgba(34,197,94,0.15); color: #4ade80; }
    .badge-paid { background: rgba(220,38,38,0.15); color: #f87171; }
    .badge-freemium { background: rgba(234,179,8,0.15); color: #facc15; }
    .badge-beginner { background: rgba(59,130,246,0.15); color: #60a5fa; }
    .badge-pro { background: rgba(168,85,247,0.15); color: #c084fc; }
    .tool-visit {
      padding: 5px 14px;
      background: var(--brand);
      color: white;
      border: none;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      transition: all var(--transition);
      white-space: nowrap;
      font-family: inherit;
      min-height: auto;
      max-width: fit-content;
    }
    .tool-visit:hover {
      background: var(--brand-light);
      transform: translateY(-1px);
    }

    /* Hide mobile icon on desktop */
    .tool-icon-mobile { display: none !important; }

    /* ─── COMPARE ─── */
    .compare-section {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 24px 40px;
    }
    .compare-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    .compare-slot {
      background: var(--glass);
      border: 2px dashed var(--border-light);
      border-radius: var(--radius-lg);
      padding: 28px;
      min-height: 200px;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      color: var(--text-muted);
      transition: all var(--transition);
    }
    .compare-slot.filled {
      border-style: solid;
      border-color: var(--brand);
      align-items: flex-start;
      text-align: right;
      flex-direction: column;
    }
    .compare-placeholder {
      font-size: 14px;
      line-height: 1.7;
    }
    .compare-placeholder span {
      display: block;
      font-size: 32px;
      margin-bottom: 8px;
    }
    .compare-content h4 {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .compare-content p {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 12px;
      line-height: 1.7;
    }
    .compare-list {
      list-style: none;
    }
    .compare-list li {
      padding: 4px 0;
      font-size: 13px;
      color: var(--text-secondary);
    }
    .compare-list li::before {
      content: '✓ ';
      color: var(--brand-light);
      font-weight: 700;
    }
    .vs-divider {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 48px;
      height: 48px;
      background: var(--brand);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 700;
      color: white;
      z-index: 10;
    }
    .compare-wrapper {
      position: relative;
    }

    /* ─── STATS ─── */
    .stats-bar {
      max-width: 1280px;
      margin: 0 auto;
      padding: 32px 24px;
    }
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
    }
    .stat-card {
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 20px;
      text-align: center;
      position: relative;
      overflow: hidden;
      transition: all var(--transition);
    }
    .stat-card::before {
      content: '';
      position: absolute;
      inset: -1px;
      border-radius: inherit;
      background: radial-gradient(
        260px circle at var(--mouse-x, -999px) var(--mouse-y, -999px),
        rgba(220, 38, 38, 0.28),
        transparent 65%
      );
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
      z-index: 1;
    }
    .stat-card:hover::before {
      opacity: 1;
    }
    .stat-card > * {
      position: relative;
      z-index: 2;
    }
    .stat-card:hover {
      border-color: var(--border-brand);
      transform: translateY(-2px);
      box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 20px var(--brand-glow);
    }
    .stat-number {
      font-size: 30px;
      font-weight: 700;
      color: var(--brand-light);
      margin-bottom: 2px;
    }
    .stat-label {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* ─── FOOTER ─── */
    .footer {
      border-top: 1px solid var(--border);
      padding: 28px 24px;
      text-align: center;
    }
    .footer-text {
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.8;
    }
    .footer-brand {
      color: var(--brand-light);
      font-weight: 700;
      text-decoration: none;
    }
    .footer-brand:hover { text-decoration: underline; }
    .footer-heart { color: var(--brand); }
    .footer-links {
      display: flex;
      justify-content: center;
      gap: 16px;
      margin-top: 10px;
    }
    .footer-links a {
      color: var(--text-muted);
      text-decoration: none;
      font-size: 13px;
      transition: color var(--transition);
    }
    .footer-links a:hover { color: var(--brand-light); }

    /* ─── ANIMATIONS ─── */
    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .animate-in {
      animation: fadeInUp 0.45s ease-out forwards;
      opacity: 0;
    }
    .animate-in:nth-child(1) { animation-delay: 0.04s; }
    .animate-in:nth-child(2) { animation-delay: 0.08s; }
    .animate-in:nth-child(3) { animation-delay: 0.12s; }
    .animate-in:nth-child(4) { animation-delay: 0.16s; }
    .animate-in:nth-child(5) { animation-delay: 0.20s; }
    .animate-in:nth-child(6) { animation-delay: 0.24s; }
    .animate-in:nth-child(7) { animation-delay: 0.28s; }
    .animate-in:nth-child(8) { animation-delay: 0.32s; }

    /* ─── SCROLLBAR ─── */
    ::-webkit-scrollbar { width: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

    /* ─── COMPARE TRAY (Bottom Sticky) ─── */
    .compare-tray {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 150;
      background: rgba(17,17,19,0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-top: 1px solid var(--border-light);
      padding: 12px 24px;
      animation: slideUp 0.3s ease-out;
    }
    .compare-tray.show { display: block; }
    .compare-tray-inner {
      max-width: 1280px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
    .compare-tray-items {
      display: flex;
      gap: 10px;
      align-items: center;
      flex: 1;
    }
    .tray-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 14px;
      background: var(--glass);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-md);
      animation: popIn 0.25s ease-out;
    }
    .tray-item-icon { font-size: 18px; }
    .tray-item-name {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      white-space: nowrap;
    }
    .tray-item-remove {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
      border: none;
      color: var(--text-muted);
      font-size: 11px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .tray-item-remove:hover {
      background: var(--brand);
      color: white;
    }
    .tray-slot-empty {
      width: 140px;
      height: 42px;
      border: 2px dashed var(--border-light);
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: var(--text-dim);
    }
    .compare-tray-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }
    .btn-compare-go {
      padding: 10px 24px;
      background: var(--brand);
      color: white;
      border: none;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      transition: all var(--transition);
      font-family: inherit;
      white-space: nowrap;
    }
    .btn-compare-go:hover {
      background: var(--brand-light);
      transform: translateY(-1px);
      box-shadow: 0 4px 20px var(--brand-glow-strong);
    }
    .btn-compare-go:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }
    .btn-compare-clear {
      padding: 10px 16px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-muted);
      font-size: 13px;
      cursor: pointer;
      transition: all var(--transition);
      font-family: inherit;
    }
    .btn-compare-clear:hover {
      border-color: var(--brand);
      color: var(--text-primary);
    }

    /* ─── COMPARE BUTTON ON TOOL CARDS ─── */
    .tool-compare-btn {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-muted);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .tool-compare-btn:hover {
      border-color: var(--brand);
      color: var(--brand-light);
      background: var(--brand-glow);
    }
    .tool-compare-btn.added {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }

    /* ─── COMPARE MODAL ─── */
    .compare-modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 300;
      background: rgba(0,0,0,0.8);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .compare-modal-overlay.show { display: flex; }
    .compare-modal {
      width: 100%;
      max-width: 960px;
      max-height: 90vh;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      overflow-y: auto;
      animation: modalIn 0.35s ease-out;
    }
    .compare-modal-header {
      position: sticky;
      top: 0;
      background: var(--bg-panel);
      border-bottom: 1px solid var(--border);
      padding: 20px 28px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 10;
    }
    .compare-modal-title {
      font-size: 20px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .compare-modal-close {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 16px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
    }
    .compare-modal-close:hover {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }
    .compare-modal-body {
      padding: 28px;
    }
    .compare-header-cards {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 16px;
      margin-bottom: 32px;
      align-items: center;
    }
    .compare-tool-card {
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      text-align: center;
      transition: all var(--transition);
    }
    .compare-tool-card.winner {
      border-color: var(--brand);
      box-shadow: 0 0 40px var(--brand-glow-strong);
    }
    .compare-tool-icon {
      font-size: 42px;
      margin-bottom: 10px;
      display: block;
    }
    .compare-tool-name {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .compare-tool-desc {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 14px;
      line-height: 1.6;
    }
    .compare-tool-badges {
      display: flex;
      gap: 6px;
      justify-content: center;
      flex-wrap: wrap;
      margin-bottom: 14px;
    }
    .compare-tool-link {
      display: inline-block;
      padding: 6px 16px;
      background: var(--brand);
      color: white;
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      transition: all var(--transition);
    }
    .compare-tool-link:hover { background: var(--brand-light); }
    .compare-vs {
      width: 52px;
      height: 52px;
      background: var(--brand);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 800;
      color: white;
      flex-shrink: 0;
      box-shadow: 0 0 30px var(--brand-glow-strong);
    }

    /* ─── SCORE CIRCLES ─── */
    .score-section {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      gap: 16px;
      margin-bottom: 32px;
      align-items: center;
    }
    .score-circle-wrapper {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
    .score-circle {
      width: 100px;
      height: 100px;
      position: relative;
    }
    .score-circle svg {
      width: 100%;
      height: 100%;
      transform: rotate(-90deg);
    }
    .score-circle-bg {
      fill: none;
      stroke: var(--border-light);
      stroke-width: 6;
    }
    .score-circle-fill {
      fill: none;
      stroke: var(--brand);
      stroke-width: 6;
      stroke-linecap: round;
      stroke-dasharray: 283;
      stroke-dashoffset: 283;
      transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .score-circle-fill.winner {
      stroke: var(--brand-light);
      filter: drop-shadow(0 0 8px var(--brand-glow-strong));
    }
    .score-number {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      font-weight: 800;
      color: var(--text-primary);
    }
    .score-label {
      font-size: 13px;
      color: var(--text-muted);
      font-weight: 500;
    }
    .score-vs-label {
      font-size: 14px;
      color: var(--text-dim);
      font-weight: 600;
    }

    /* ─── RATING BARS ─── */
    .rating-bars {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    .bar-group {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .bar-label {
      width: 110px;
      font-size: 13px;
      color: var(--text-secondary);
      font-weight: 500;
      text-align: left;
      flex-shrink: 0;
    }
    .bar-tracks {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .bar-track {
      height: 8px;
      background: var(--glass);
      border-radius: 4px;
      overflow: hidden;
      position: relative;
    }
    .bar-fill {
      height: 100%;
      border-radius: 4px;
      width: 0;
      transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .bar-fill.tool-a { background: var(--brand); }
    .bar-fill.tool-b { background: #3b82f6; }
    .bar-values {
      display: flex;
      gap: 16px;
      margin-top: 2px;
    }
    .bar-value {
      font-size: 11px;
      font-weight: 700;
      min-width: 28px;
    }
    .bar-value.tool-a { color: var(--brand-light); }
    .bar-value.tool-b { color: #60a5fa; }

    /* ─── FEATURES COMPARISON ─── */
    .features-comparison {
      margin-top: 28px;
      border-top: 1px solid var(--border);
      padding-top: 24px;
    }
    .features-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 16px;
      text-align: center;
    }
    .features-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .features-col {
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 16px;
    }
    .features-col-title {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .features-list {
      list-style: none;
    }
    .features-list li {
      padding: 5px 0;
      font-size: 13px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .features-list li::before {
      content: '✓';
      color: #4ade80;
      font-weight: 700;
      font-size: 12px;
    }

    /* ─── WINNER BANNER ─── */
    .winner-banner {
      margin-top: 24px;
      padding: 16px 24px;
      background: linear-gradient(135deg, var(--brand-glow-strong), transparent);
      border: 1px solid var(--brand);
      border-radius: var(--radius-md);
      text-align: center;
      animation: glowPulse 2s ease-in-out infinite;
    }
    .winner-banner-text {
      font-size: 16px;
      font-weight: 700;
      color: var(--brand-light);
    }
    .winner-banner-sub {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 4px;
    }

    /* ─── TOAST NOTIFICATION ─── */
    .toast {
      position: fixed;
      bottom: 80px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--bg-elevated);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-md);
      padding: 12px 20px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
      z-index: 250;
      opacity: 0;
      transition: all 0.3s ease;
      pointer-events: none;
      display: flex;
      align-items: center;
      gap: 8px;
      box-shadow: var(--shadow-lg);
      white-space: nowrap;
    }
    .toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }
    .toast-icon { font-size: 16px; }

    /* ─── TOOLTIP ─── */
    .tooltip-wrapper {
      position: relative;
    }
    .tooltip-wrapper::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: calc(100% + 8px);
      left: 50%;
      transform: translateX(-50%) translateY(4px);
      background: var(--bg-elevated);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-sm);
      padding: 6px 10px;
      font-size: 11px;
      font-weight: 500;
      color: var(--text-secondary);
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: all 0.2s ease;
      z-index: 50;
    }
    .tooltip-wrapper:hover::after {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* ─── FAVORITES ─── */
    .fav-btn {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .fav-btn:hover {
      border-color: #f59e0b;
      background: rgba(245,158,11,0.1);
    }
    .fav-btn.active {
      background: #f59e0b;
      border-color: #f59e0b;
      color: #000;
    }
    .favorites-section {
      max-width: 1280px;
      margin: 0 auto;
      padding: 0 24px 30px;
      display: none;
    }
    .favorites-section.show { display: block; }
    .favorites-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
      gap: 12px;
    }
    .fav-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all var(--transition);
    }
    .fav-card:hover {
      border-color: #f59e0b;
      transform: translateY(-2px);
    }
    .fav-card-icon { font-size: 24px; }
    .fav-card-info { flex: 1; }
    .fav-card-name { font-size: 14px; font-weight: 600; }
    .fav-card-cat { font-size: 12px; color: var(--text-muted); }
    .fav-card-remove {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: rgba(255,255,255,0.05);
      border: none;
      color: var(--text-dim);
      font-size: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
    }
    .fav-card-remove:hover {
      background: var(--brand);
      color: white;
    }
    .fav-hint {
      text-align: center;
      padding: 20px;
      color: var(--text-dim);
      font-size: 13px;
      line-height: 1.8;
    }

    /* ─── KEYBOARD SHORTCUTS MODAL ─── */
    .shortcuts-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 400;
      background: rgba(0,0,0,0.75);
      backdrop-filter: blur(10px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .shortcuts-overlay.show { display: flex; }
    .shortcuts-panel {
      width: 100%;
      max-width: 440px;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      overflow: hidden;
      animation: modalIn 0.3s ease-out;
    }
    .shortcuts-header {
      padding: 18px 24px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .shortcuts-title { font-size: 18px; font-weight: 700; }
    .shortcuts-body { padding: 20px 24px; }
    .shortcut-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }
    .shortcut-row:last-child { border-bottom: none; }
    .shortcut-key {
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .shortcut-key kbd {
      display: inline-block;
      padding: 3px 8px;
      background: var(--bg-surface);
      border: 1px solid var(--border-light);
      border-radius: 4px;
      font-family: inherit;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      min-width: 28px;
      text-align: center;
    }
    .shortcut-desc {
      font-size: 13px;
      color: var(--text-secondary);
    }

    /* ─── INSTALL GUIDE MODAL ─── */
    .install-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 500;
      background: rgba(0,0,0,0.8);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .install-overlay.show { display: flex; }
    .install-panel {
      width: 100%;
      max-width: 600px;
      max-height: 85vh;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      overflow-y: auto;
      animation: modalIn 0.3s ease-out;
    }
    .install-header {
      position: sticky;
      top: 0;
      background: var(--bg-panel);
      border-bottom: 1px solid var(--border);
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .install-title {
      font-size: 18px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .install-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
    }
    .install-close:hover {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }
    .install-body {
      padding: 24px;
    }
    .install-step {
      display: flex;
      gap: 14px;
      margin-bottom: 16px;
      align-items: flex-start;
    }
    .install-step-num {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--brand);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .install-step-content {
      flex: 1;
    }
    .install-step-desc {
      font-size: 13px;
      color: var(--text-muted);
      margin-bottom: 6px;
    }
    .install-cmd {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 18px;
      background: #161b22;
      border: 1px solid #30363d;
      border-radius: 6px;
      font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
      font-size: 14px;
      font-weight: 400;
      color: #e6edf3;
      direction: ltr;
      text-align: left;
      line-height: 1.6;
    }
    .install-cmd-copy {
      margin-right: auto;
      margin-left: 0;
      padding: 3px 8px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text-muted);
      font-size: 11px;
      cursor: pointer;
      font-family: inherit;
      transition: all var(--transition);
      flex-shrink: 0;
    }
    .install-cmd-copy:hover {
      border-color: var(--brand);
      color: var(--brand-light);
    }
    .install-tips {
      margin-top: 20px;
      padding: 14px;
      background: var(--brand-glow);
      border: 1px solid rgba(220,38,38,0.2);
      border-radius: var(--radius-md);
    }
    .install-tips-title {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 8px;
      color: var(--brand-light);
    }
    .install-tips li {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.8;
      list-style: none;
      padding-right: 16px;
      position: relative;
    }
    .install-tips li::before {
      content: '•';
      position: absolute;
      right: 0;
      color: var(--brand-light);
      font-weight: 700;
    }
    .install-connect {
      margin-top: 16px;
      padding: 12px 14px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.7;
    }
    .install-connect strong {
      color: var(--text-primary);
    }

    /* ─── ROADMAP ─── */
    .roadmap-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 450;
      background: rgba(0,0,0,0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .roadmap-overlay.show { display: flex; }
    .roadmap-panel {
      width: 100%;
      max-width: 700px;
      max-height: 85vh;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      overflow: hidden;
      display: flex;
      flex-direction: column;
      animation: modalIn 0.3s ease-out;
    }
    .roadmap-header {
      position: sticky;
      top: 0;
      background: var(--bg-panel);
      border-bottom: 1px solid var(--border);
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      z-index: 1;
    }
    .roadmap-title {
      font-size: 18px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .roadmap-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
    }
    .roadmap-close:hover {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }
    .roadmap-body {
      padding: 24px;
      overflow-y: auto;
      flex: 1;
    }
    .roadmap-subtitle {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 24px;
      line-height: 1.7;
    }
    .roadmap-result { display: none; }
    .roadmap-result.show { display: block; }
    .roadmap-result-header {
      text-align: center;
      margin-bottom: 28px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--border);
    }
    .roadmap-result-title {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .roadmap-result-sub {
      font-size: 14px;
      color: var(--text-muted);
    }
    .roadmap-timeline {
      position: relative;
    }
    .roadmap-step {
      display: flex;
      gap: 16px;
      margin-bottom: 8px;
      opacity: 0;
      transform: translateY(10px);
      transition: all 0.3s ease;
    }
    .roadmap-step.visible {
      opacity: 1;
      transform: translateY(0);
    }
    .roadmap-step-connector {
      display: flex;
      flex-direction: column;
      align-items: center;
      flex-shrink: 0;
    }
    .roadmap-step-number {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--brand);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .roadmap-step-line {
      width: 2px;
      flex: 1;
      min-height: 20px;
      background: var(--border-light);
      margin-top: 4px;
    }
    .roadmap-step-content {
      flex: 1;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      padding: 16px;
      margin-bottom: 8px;
    }
    .roadmap-step-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }
    .roadmap-step-icon {
      font-size: 22px;
    }
    .roadmap-step-title {
      font-size: 15px;
      font-weight: 700;
    }
    .roadmap-step-desc {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.7;
      margin-bottom: 10px;
    }
    .roadmap-step-tool {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }
    .roadmap-tool-name {
      padding: 4px 10px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 12px;
      font-weight: 600;
      color: var(--brand-light);
    }
    .roadmap-install-btn {
      padding: 4px 10px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 11px;
      color: var(--text-secondary);
      cursor: pointer;
      font-family: inherit;
      transition: all var(--transition);
    }
    .roadmap-install-btn:hover {
      border-color: var(--brand);
      color: var(--brand-light);
    }
    .roadmap-link-btn {
      padding: 4px 10px;
      background: var(--brand);
      color: white;
      border-radius: var(--radius-sm);
      font-size: 11px;
      font-weight: 600;
      text-decoration: none;
      transition: all var(--transition);
    }
    .roadmap-link-btn:hover {
      background: var(--brand-light);
    }
    .roadmap-step-tip {
      font-size: 12px;
      color: var(--text-muted);
      padding: 8px 12px;
      background: var(--brand-glow);
      border-radius: var(--radius-sm);
      line-height: 1.6;
    }
    .roadmap-actions {
      display: flex;
      gap: 10px;
      justify-content: center;
      margin-top: 24px;
      padding-top: 20px;
      border-top: 1px solid var(--border);
    }
    .roadmap-action-btn {
      padding: 10px 24px;
      border-radius: var(--radius-md);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      font-family: inherit;
      transition: all var(--transition);
      border: none;
    }
    .roadmap-action-primary {
      background: var(--brand);
      color: white;
    }
    .roadmap-action-primary:hover {
      background: var(--brand-light);
    }
    .roadmap-action-secondary {
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
    }
    .roadmap-action-secondary:hover {
      border-color: var(--brand);
      color: var(--text-primary);
    }

    /* ─── KEYFRAMES ─── */
    @keyframes slideUp {
      from { transform: translateY(100%); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    @keyframes popIn {
      from { transform: scale(0.8); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }
    @keyframes modalIn {
      from { transform: scale(0.92) translateY(20px); opacity: 0; }
      to { transform: scale(1) translateY(0); opacity: 1; }
    }
    @keyframes glowPulse {
      0%, 100% { box-shadow: 0 0 20px var(--brand-glow); }
      50% { box-shadow: 0 0 40px var(--brand-glow-strong); }
    }
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes bounceIn {
      0% { transform: scale(0.3); opacity: 0; }
      50% { transform: scale(1.05); }
      70% { transform: scale(0.9); }
      100% { transform: scale(1); opacity: 1; }
    }

    /* ─── ONBOARDING / WELCOME MODAL ─── */
    .onboarding-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 500;
      background: rgba(0,0,0,0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .onboarding-overlay.show { display: flex; }
    .onboarding-card {
      width: 100%;
      max-width: 480px;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      padding: 40px 32px;
      text-align: center;
      animation: bounceIn 0.5s ease-out;
      position: relative;
      overflow: hidden;
    }
    .onboarding-card::before {
      content: '';
      position: absolute;
      top: -60px;
      right: -60px;
      width: 200px;
      height: 200px;
      background: radial-gradient(circle, var(--brand-glow-strong), transparent 70%);
      pointer-events: none;
    }
    .onboarding-emoji {
      font-size: 56px;
      margin-bottom: 16px;
      display: block;
      position: relative;
    }
    .onboarding-title {
      font-size: 24px;
      font-weight: 800;
      margin-bottom: 8px;
      position: relative;
    }
    .onboarding-desc {
      font-size: 15px;
      color: var(--text-secondary);
      line-height: 1.8;
      margin-bottom: 28px;
      position: relative;
    }
    .onboarding-features {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-bottom: 28px;
      text-align: right;
      position: relative;
    }
    .onboarding-feature {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      background: var(--glass);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
    }
    .onboarding-feature-icon {
      font-size: 22px;
      flex-shrink: 0;
    }
    .onboarding-feature-text {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.6;
    }
    .onboarding-feature-text strong {
      color: var(--text-primary);
      display: block;
      font-size: 14px;
      margin-bottom: 2px;
    }
    .onboarding-btn {
      padding: 14px 40px;
      background: var(--brand);
      color: white;
      border: none;
      border-radius: var(--radius-md);
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: all var(--transition);
      font-family: inherit;
      position: relative;
    }
    .onboarding-btn:hover {
      background: var(--brand-light);
      transform: translateY(-2px);
      box-shadow: 0 4px 20px var(--brand-glow-strong);
    }
    .onboarding-skip {
      display: block;
      margin-top: 12px;
      font-size: 13px;
      color: var(--text-dim);
      cursor: pointer;
      background: none;
      border: none;
      font-family: inherit;
      transition: color var(--transition);
    }
    .onboarding-skip:hover { color: var(--text-muted); }

    /* ─── HELP MODAL ─── */
    .help-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
      font-family: inherit;
    }
    .help-btn:hover {
      border-color: var(--brand);
      color: var(--brand-light);
      background: var(--brand-glow);
    }
    .help-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 400;
      background: rgba(0,0,0,0.75);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      align-items: center;
      justify-content: center;
      padding: 24px;
    }
    .help-overlay.show { display: flex; }
    .help-panel {
      width: 100%;
      max-width: 560px;
      max-height: 80vh;
      background: var(--bg-panel);
      border: 1px solid var(--border-light);
      border-radius: var(--radius-lg);
      overflow-y: auto;
      animation: modalIn 0.3s ease-out;
    }
    .help-header {
      position: sticky;
      top: 0;
      background: var(--bg-panel);
      border-bottom: 1px solid var(--border);
      padding: 18px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .help-title {
      font-size: 18px;
      font-weight: 700;
    }
    .help-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--glass);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all var(--transition);
    }
    .help-close:hover {
      background: var(--brand);
      border-color: var(--brand);
      color: white;
    }
    .help-body {
      padding: 24px;
    }
    .help-section {
      margin-bottom: 20px;
    }
    .help-section:last-child { margin-bottom: 0; }
    .help-section-title {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .help-section-text {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.8;
    }
    .help-tip {
      padding: 10px 14px;
      background: var(--brand-glow);
      border: 1px solid rgba(220,38,38,0.2);
      border-radius: var(--radius-md);
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.7;
      margin-top: 8px;
    }

    /* ─── MOBILE BOTTOM NAVBAR ─── */
    .mobile-nav {
      display: none;
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 160;
      background: rgba(17,17,19,0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-top: 1px solid var(--border);
      padding: 6px 0 env(safe-area-inset-bottom, 6px);
    }
    .mobile-nav-inner {
      display: flex;
      justify-content: space-around;
      align-items: center;
    }
    .mobile-nav-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      padding: 6px 12px;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 10px;
      font-weight: 500;
      transition: all var(--transition);
      cursor: pointer;
      background: none;
      border: none;
      font-family: inherit;
    }
    .mobile-nav-item.active {
      color: var(--brand-light);
    }
    .mobile-nav-icon {
      font-size: 20px;
    }

    /* ─── UX IMPROVEMENTS ─── */
    /* Better touch targets for mobile */
    .filter-btn, .fav-btn, .tool-compare-btn, .wizard-option, .category-card {
      min-height: 44px;
      min-width: 44px;
    }
    .tool-visit {
      min-height: auto;
      min-width: auto;
    }

    /* Smoother transitions */
    .tool-card, .category-card, .wizard-option, .filter-btn {
      transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    /* Better focus states for accessibility */
    .filter-btn:focus-visible, .tool-visit:focus-visible, .fav-btn:focus-visible, .tool-compare-btn:focus-visible, .wizard-option:focus-visible {
      outline: 2px solid var(--brand);
      outline-offset: 2px;
    }

    /* Smooth scroll for all scrollable elements */
    .tools-panel-body, .install-body, .help-body {
      scroll-behavior: smooth;
      -webkit-overflow-scrolling: touch;
    }

    /* Better scrollbar styling */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: var(--bg-surface);
    }
    ::-webkit-scrollbar-thumb {
      background: var(--text-dim);
      border-radius: 3px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: var(--text-muted);
    }

    /* Reduced motion for accessibility */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }

    /* ─── MOBILE RESPONSIVE ─── */
    @media (max-width: 768px) {
      .header-inner { height: 56px; }
      .logo-text { font-size: 16px; }
      .nav-links { display: none !important; }
      .hamburger { display: none !important; }
      .help-btn { display: none; }
      .mobile-nav { display: block; }
      body { padding-bottom: 70px; }

      .search-section { padding: 12px 16px 0; }
      .search-bar input { padding: 12px 44px 12px 16px; font-size: 14px; }

      .wizard-section { padding: 20px 16px; }
      .wizard-container { padding: 20px; }
      .wizard-title { font-size: 18px; }
      .wizard-steps { gap: 12px; flex-wrap: wrap; }
      .wizard-options { gap: 8px; }
      .wizard-option { padding: 8px 14px; font-size: 13px; }

      .categories-section { padding: 0 16px 24px; }
      .section-title { font-size: 17px; }
      .category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
      }
      .category-card { padding: 18px; }
      .category-emoji { font-size: 28px; margin-bottom: 10px; }
      .category-name { font-size: 15px; }
      .category-desc { font-size: 12px; margin-bottom: 10px; }

      .tools-overlay { padding: 0; align-items: flex-end; }
      .tools-panel {
        max-height: 90vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
      }
      .tools-panel-header { padding: 14px 18px; }
      .tools-panel-body { padding: 14px 16px; }

      /* ─── TOOL CARD MOBILE RTL FIX ─── */
      .tool-card {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        direction: rtl;
        text-align: right;
      }
      .tool-card > .tool-icon {
        display: none;
      }
      /* Tool icon inline — show next to name */
      .tool-card > .tool-info {
        width: 100%;
        text-align: right;
        display: flex;
        align-items: center;
        gap: 10px;
      }
      .tool-card > .tool-info .tool-icon-mobile {
        display: flex !important;
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: var(--radius-md);
        background: var(--bg-surface);
        border: 1px solid var(--border);
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
      }
      .tool-card > .tool-info > div { flex: 1; }
      .tool-card > .tool-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 2px; text-align: right; direction: rtl; }
      .tool-card > .tool-info p { font-size: 12px; color: var(--text-muted); line-height: 1.5; text-align: right; direction: rtl; }
      .tool-meta {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
      }
      .tool-card > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: stretch;
      }
      .tool-card > div:last-child > div:last-child {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;
      }
      /* Smaller "مشاهده" button on mobile */
      .tool-card .tool-visit {
        padding: 5px 14px;
        font-size: 12px;
        min-height: auto;
      }
      /* Smaller fav & compare buttons */
      .tool-card .fav-btn,
      .tool-card .tool-compare-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 14px;
      }

      /* Filter bar mobile */
      .filter-bar {
        gap: 6px;
        margin-bottom: 14px;
        justify-content: flex-end;
      }
      .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-height: 32px;
      }

      .compare-tray { padding: 10px 12px; }
      .compare-tray-inner { flex-wrap: wrap; gap: 8px; }
      .tray-item { padding: 6px 10px; }
      .tray-item-name { font-size: 12px; }
      .btn-compare-go { padding: 8px 16px; font-size: 13px; }
      .btn-compare-clear { padding: 8px 12px; font-size: 12px; }

      .compare-modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 95vh; }
      .compare-modal-body { padding: 16px; }
      .compare-header-cards { grid-template-columns: 1fr; gap: 10px; }
      .compare-vs { width: 40px; height: 40px; font-size: 13px; margin: 0 auto; }
      .score-section { grid-template-columns: 1fr; gap: 12px; }
      .score-circle { width: 80px; height: 80px; }
      .score-number { font-size: 22px; }
      .bar-group { flex-direction: column; align-items: flex-start; gap: 6px; }
      .bar-label { width: auto; }
      .features-grid { grid-template-columns: 1fr; }

      .toast { bottom: 90px; font-size: 13px; padding: 10px 16px; }

      .onboarding-card { padding: 28px 20px; }
      .onboarding-emoji { font-size: 44px; }
      .onboarding-title { font-size: 20px; }
      .onboarding-desc { font-size: 14px; }
      .onboarding-feature { padding: 10px 12px; }
      .onboarding-feature-icon { font-size: 18px; }
      .onboarding-feature-text { font-size: 13px; }

      .favorites-section { padding: 0 16px 20px; }
      .favorites-grid { grid-template-columns: 1fr; }
      .fav-card { padding: 12px; }

      .install-overlay { padding: 0; align-items: flex-end; }
      .install-panel { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 90vh; }
      .install-body { padding: 16px; }
      .install-cmd { font-size: 13px; padding: 12px 14px; }

      /* Roadmap mobile */
      .roadmap-overlay { padding: 0; align-items: flex-end; }
      .roadmap-panel { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 90vh; }
      .roadmap-body { padding: 16px; }
      .roadmap-step-content { padding: 12px; }
      .roadmap-step-header { gap: 8px; }
      .roadmap-step-icon { font-size: 18px; }
      .roadmap-step-title { font-size: 14px; }
      .roadmap-step-tool { gap: 6px; }

      .shortcuts-panel { max-width: 100%; margin: 0 16px; }

      .help-panel { max-width: 100%; margin: 0 16px; }

      .compare-tray label, .compare-tray span { font-size: 12px; }
    }
