/* ToolStack - Premium Dark Design System */
/* Inspired by Linear.app, Vercel, Raycast */

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

:root {
  /* Core Palette */
  --bg:            #0a0a0b;
  --bg-2:          #0f0f11;
  --bg-3:          #141416;
  --bg-4:          #1a1a1e;
  --bg-5:          #222228;

  /* Borders */
  --border:        rgba(255,255,255,0.06);
  --border-hover:  rgba(255,255,255,0.12);
  --border-active: rgba(99,102,241,0.5);

  /* Accent — Indigo → Violet gradient */
  --indigo:        #6366f1;
  --violet:        #8b5cf6;
  --cyan:          #22d3ee;
  --indigo-dim:    rgba(99,102,241,0.15);
  --indigo-glow:   rgba(99,102,241,0.25);

  /* Gradient helpers */
  --grad-primary:  linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #22d3ee 100%);
  --grad-subtle:   linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(139,92,246,0.05) 100%);
  --grad-card:     linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);

  /* Text */
  --text:          #f4f4f5;
  --text-2:        #a1a1aa;
  --text-3:        #71717a;
  --text-4:        #52525b;

  /* Semantic */
  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --success-dim:   rgba(34,197,94,0.15);
  --warning-dim:   rgba(245,158,11,0.15);
  --danger-dim:    rgba(239,68,68,0.15);

  /* Typography */
  --font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', 'Courier New', monospace;

  /* Radii */
  --r-sm:   6px;
  --r:      10px;
  --r-md:   14px;
  --r-lg:   18px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow:     0 4px 12px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.6), 0 4px 8px rgba(0,0,0,0.4);
  --shadow-lg:  0 20px 40px rgba(0,0,0,0.7), 0 8px 16px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.2), 0 0 40px rgba(99,102,241,0.1);

  /* Transitions */
  --t:     0.2s ease;
  --t-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LIGHT MODE ===== */
[data-theme="light"] {
  --bg:            #ffffff;
  --bg-2:          #f8f8fa;
  --bg-3:          #f1f1f5;
  --bg-4:          #e8e8ef;
  --bg-5:          #dddde8;

  --border:        rgba(0,0,0,0.08);
  --border-hover:  rgba(0,0,0,0.15);
  --border-active: rgba(99,102,241,0.5);

  --text:          #111113;
  --text-2:        #3f3f46;
  --text-3:        #71717a;
  --text-4:        #a1a1aa;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --shadow:     0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.07);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --shadow-lg:  0 20px 40px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(99,102,241,0.15), 0 0 40px rgba(99,102,241,0.07);
  --indigo-dim:    rgba(99,102,241,0.1);
}

[data-theme="light"] body {
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.04) 1px, transparent 0);
  background-size: 40px 40px;
}

[data-theme="light"] .site-header {
  background: rgba(255,255,255,0.9);
}

[data-theme="light"] .home-hero {
  background: var(--bg);
}

[data-theme="light"] .home-hero::before {
  background: radial-gradient(ellipse at center,
    rgba(99,102,241,0.08) 0%,
    rgba(139,92,246,0.04) 40%,
    transparent 70%);
}

[data-theme="light"] .grad-card {
  background: linear-gradient(145deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 100%);
}

/* ===== BACKWARDS-COMPATIBLE VARIABLE ALIASES =====
   Tool HTML files reference these old names — map them to new dark values. */
:root {
  /* Old name → new dark equivalent */
  --primary:        var(--indigo);
  --primary-dark:   var(--violet);
  --primary-light:  rgba(99,102,241,0.25);
  --primary-xlight: rgba(99,102,241,0.1);
  --accent:         var(--cyan);
  --surface:        var(--bg-3);
  --surface-2:      var(--bg-4);
  --border-dark:    rgba(255,255,255,0.1);
  --text-secondary: var(--text-2);
  --text-muted:     var(--text-3);
  --white:          var(--bg-3);
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow:         0 4px 12px rgba(0,0,0,0.5);
  --shadow-md:      0 8px 24px rgba(0,0,0,0.6);
  --radius-sm:      var(--r-sm);
  --radius:         var(--r);
  --radius-lg:      var(--r-lg);
  --radius-xl:      var(--r-xl);
  --transition:     var(--t);
}

/* ===== GLOBAL MICRO-INTERACTION TRANSITIONS ===== */
* { transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s; }
/* Exclude transforms from the global rule — they need per-element control */
button, a, input, textarea, select, .tool-card, .btn, .tab-btn, .toggle-btn {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.4,0,0.2,1), opacity 0.2s ease;
}

/* ===== FOCUS RING ===== */
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ===== BUTTON PRESS ===== */
button:active, .btn:active { transform: scale(0.97) !important; }
a.tool-card:active { transform: scale(0.99) translateY(-1px) !important; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--bg-5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Subtle dot grid */
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
  background-size: 40px 40px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { color: var(--text-2); line-height: 1.7; }

a {
  color: var(--indigo);
  text-decoration: none;
}
a:hover { color: var(--violet); }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-4);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  color: var(--cyan);
  border: 1px solid var(--border);
}

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

.container-sm {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main { flex: 1; }

/* ===== HEADER ===== */
.site-header {
  background: rgba(10,10,11,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-logo:hover { opacity: 0.8; color: var(--text); }

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--grad-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 5px 12px;
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 0.875rem;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--bg-4);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-4);
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-5);
}
.theme-toggle:active { transform: scale(0.92) !important; }

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  pointer-events: none;
  line-height: 1;
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }
:not([data-theme="light"]) .icon-sun  { display: none; }
:not([data-theme="light"]) .icon-moon { display: block; }

/* ===== HEADER SEARCH ===== */
.header-search {
  position: relative;
  flex: 1;
  max-width: 300px;
}

.header-search input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  background: var(--bg-3);
  color: var(--text);
  outline: none;
  font-family: var(--font);
}
.header-search input::placeholder { color: var(--text-4); }
.header-search input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-dim);
}

.header-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-4);
  font-size: 13px;
  pointer-events: none;
}

/* Keyboard shortcut hint in header search */
.header-search .kbd-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-4);
  background: var(--bg-4);
  font-family: var(--font);
  letter-spacing: 0;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  margin-top: auto;
}

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

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.footer-brand p {
  color: var(--text-3);
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 260px;
}

.footer-col h4 {
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  color: var(--text-3);
  font-size: 0.875rem;
}
.footer-col ul a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-4);
}

.footer-bottom a { color: var(--text-4); }
.footer-bottom a:hover { color: var(--text-3); }

/* ===== AD PLACEHOLDERS ===== */
.ad-slot {
  background: var(--bg-3);
  border: 1px dashed rgba(255,255,255,0.06);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ad-banner { width: 100%; min-height: 90px; margin: 28px 0; }
.ad-rectangle { width: 300px; min-height: 250px; }
.ad-leaderboard { width: 100%; min-height: 90px; }

/* ===== KO-FI BUTTON ===== */
.kofi-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #13C3FF;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(19,195,255,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.kofi-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(19,195,255,0.5);
  color: #fff;
}
@media (max-width: 480px) {
  .kofi-btn { bottom: 16px; right: 16px; font-size: 0.8rem; padding: 9px 14px; }
}

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0.5;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-4);
  margin-bottom: 14px;
}

.page-hero .breadcrumb a {
  color: var(--text-3);
}
.page-hero .breadcrumb a:hover { color: var(--indigo); }

.page-hero .breadcrumb span { color: var(--text-4); }

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 10px;
  font-weight: 800;
}

.page-hero p {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 580px;
}

/* ===== TOOL LAYOUT ===== */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding: 32px 0 40px;
  align-items: start;
}

.tool-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== CARD ===== */
.card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
}

/* ===== TOOL CARD (Homepage) ===== */
.tool-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 48px; /* mobile touch target */
}

.tool-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  opacity: 0;
}

.tool-card:hover {
  border-color: rgba(99,102,241,0.35);
  box-shadow: 0 0 0 1px rgba(99,102,241,0.15), var(--shadow);
  transform: translateY(-3px);
  color: inherit;
}

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

/* Favorite star button */
.tool-card .fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--text-4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  opacity: 0;
  padding: 0;
  z-index: 2;
  /* override global transition for fav btn specifically */
  transition: opacity 0.2s ease, color 0.2s ease, transform 0.15s cubic-bezier(0.34,1.56,0.64,1) !important;
}

.tool-card:hover .fav-btn,
.tool-card .fav-btn.is-fav {
  opacity: 1;
}

.tool-card .fav-btn.is-fav {
  color: #f59e0b;
}

.tool-card .fav-btn:hover {
  color: #fbbf24;
  transform: scale(1.2) !important;
  background: rgba(245,158,11,0.12);
}

/* Animate the star when favoriting */
@keyframes starPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5) rotate(-10deg); }
  70%  { transform: scale(0.9) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.tool-card .fav-btn.pop {
  animation: starPop 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards !important;
}

.tool-card-icon {
  width: 44px;
  height: 44px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tool-card:hover .tool-card-icon {
  background: rgba(99,102,241,0.18);
  border-color: rgba(99,102,241,0.35);
}

.tool-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tool-card p {
  font-size: 0.825rem;
  color: var(--text-3);
  line-height: 1.55;
  flex: 1;
}

.tool-card-arrow {
  align-self: flex-end;
  color: var(--text-4);
  font-size: 1rem;
}

.tool-card:hover .tool-card-arrow {
  color: var(--indigo);
  transform: translateX(4px);
}

/* ===== FAVORITES SECTION ===== */
.favorites-section {
  padding: 40px 0 0;
  display: none;
}

.favorites-section.visible {
  display: block;
}

.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.favorites-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  color: var(--text);
}

.favorites-header h2 .fav-star-icon {
  color: #f59e0b;
  font-size: 1.1rem;
}

.clear-favorites-btn {
  font-size: 0.8rem;
  color: var(--text-4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  font-family: var(--font);
}
.clear-favorites-btn:hover {
  color: var(--danger);
  background: var(--danger-dim);
}

/* ===== TOOL AREA ===== */
.tool-area {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.tool-area-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-area-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tool-area-body { padding: 20px; }

/* ===== FORM ELEMENTS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-2);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-4);
  outline: none;
}

input[type="color"] {
  width: 100%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-4);
  outline: none;
  cursor: pointer;
  height: 42px;
}

input::placeholder, textarea::placeholder { color: var(--text-4); }

input:focus,
select:focus,
textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-dim);
}

/* Glow animation on input focus */
@keyframes inputGlow {
  0%   { box-shadow: 0 0 0 0 var(--indigo-dim); }
  50%  { box-shadow: 0 0 0 4px var(--indigo-dim); }
  100% { box-shadow: 0 0 0 3px var(--indigo-dim); }
}

input:focus,
select:focus,
textarea:focus {
  animation: inputGlow 0.3s ease forwards;
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font);
  line-height: 1.65;
}
textarea.mono {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2371717a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.01em;
  position: relative;
  overflow: hidden;
  min-height: 36px; /* accessible touch target */
}

.btn:active { transform: scale(0.97) !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(99,102,241,0.45), 0 0 0 1px rgba(99,102,241,0.3);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: var(--bg-4);
  color: var(--text-2);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg-5);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--indigo);
  border-color: rgba(99,102,241,0.35);
}
.btn-outline:hover {
  background: var(--indigo-dim);
  border-color: rgba(99,102,241,0.5);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}
.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

.btn-sm {
  padding: 5px 13px;
  font-size: 0.8rem;
  min-height: 30px;
}
.btn-lg { padding: 12px 26px; font-size: 0.95rem; min-height: 44px; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
}

.btn-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn.loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== COPY BUTTON (Clipboard + Checkmark pattern) ===== */
.copy-wrapper { position: relative; }

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--bg-5);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  z-index: 2;
  font-family: var(--font);
  letter-spacing: 0.02em;
  min-height: 26px;
}

.copy-btn .copy-icon,
.copy-btn .check-icon { pointer-events: none; line-height: 1; }
.copy-btn .check-icon { display: none; color: var(--success); }

.copy-btn:hover {
  background: var(--indigo);
  color: white;
  border-color: var(--indigo);
}

.copy-btn.copied {
  background: var(--success-dim);
  color: var(--success);
  border-color: rgba(34,197,94,0.3);
}

.copy-btn.copied .copy-icon { display: none; }
.copy-btn.copied .check-icon { display: inline; }

/* ===== OUTPUT BOX ===== */
.output-box {
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text);
  min-height: 80px;
  word-break: break-all;
  white-space: pre-wrap;
}
.output-box.large { min-height: 160px; }
.output-box.xl    { min-height: 240px; }

/* ===== RESULT ANIMATE-IN ===== */
@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-animate {
  animation: resultSlideIn 0.25s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* ===== LOADING SPINNER (inline) ===== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-hover);
  border-top-color: var(--indigo);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 3px;
  background: var(--bg-5);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

@keyframes progressIndeterminate {
  0%   { transform: translateX(-100%); width: 40%; }
  50%  { transform: translateX(100%); width: 60%; }
  100% { transform: translateX(300%); width: 40%; }
}

.progress-fill.indeterminate {
  animation: progressIndeterminate 1.2s ease-in-out infinite;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat-item {
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 15px;
  text-align: center;
}
.stat-item:hover { border-color: var(--border-hover); }

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px;
  margin-bottom: 20px;
  width: fit-content;
}

.tab-btn {
  padding: 6px 16px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  border-radius: 5px;
}
.tab-btn:hover { color: var(--text); background: var(--bg-5); }
.tab-btn.active {
  background: var(--bg-3);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ===== RELATED TOOLS ===== */
.related-tools {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.related-tool-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-4);
  text-decoration: none;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 44px; /* mobile touch target */
}
.related-tool-link:hover {
  border-color: rgba(99,102,241,0.35);
  background: rgba(99,102,241,0.08);
  color: var(--text);
}

.related-tool-link .tool-icon {
  font-size: 16px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

/* ===== ALERTS ===== */
.alert {
  padding: 11px 15px;
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--success-dim); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.alert-warning { background: var(--warning-dim); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.alert-danger  { background: var(--danger-dim);  color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.alert-info    { background: var(--indigo-dim);  color: #818cf8; border: 1px solid rgba(99,102,241,0.25); }

/* ===== COLOR SWATCH ===== */
.color-swatch {
  width: 100%;
  height: 120px;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

/* ===== RANGE INPUT ===== */
input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-5);
  outline: none;
  cursor: pointer;
  padding: 0;
  border: none;
  box-shadow: none;
  -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--indigo);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(99,102,241,0.5);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ===== TOGGLE GROUP ===== */
.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.toggle-btn {
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-4);
  color: var(--text-3);
  min-height: 32px;
}
.toggle-btn:hover { border-color: var(--border-hover); color: var(--text); }
.toggle-btn.active {
  background: var(--indigo-dim);
  color: #a5b4fc;
  border-color: rgba(99,102,241,0.35);
}

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ===== UTILITY ===== */
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.text-mono     { font-family: var(--font-mono); }
.text-muted    { color: var(--text-3); }
.text-small    { font-size: 0.85rem; }
.text-primary  { color: var(--indigo); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.w-full       { width: 100%; }
.hidden       { display: none !important; }

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(3deg); }
  66%       { transform: translateY(-6px) rotate(-2deg); }
}

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== HOME HERO ===== */
.home-hero {
  position: relative;
  padding: 100px 0 90px;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}

/* Radial glow backdrop */
.home-hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(99,102,241,0.12) 0%,
    rgba(139,92,246,0.06) 40%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Bottom gradient fade */
.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
  z-index: 0;
}

/* Floating shapes */
.hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero-shape-1 {
  width: 300px; height: 300px;
  background: rgba(99,102,241,0.07);
  top: -50px; left: -80px;
  animation: float 8s ease-in-out infinite;
}
.hero-shape-2 {
  width: 200px; height: 200px;
  background: rgba(139,92,246,0.08);
  bottom: -30px; right: -40px;
  animation: float 10s ease-in-out infinite reverse;
}
.hero-shape-3 {
  width: 150px; height: 150px;
  background: rgba(34,211,238,0.05);
  top: 30%; right: 10%;
  animation: float 12s ease-in-out infinite 2s;
}

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

.home-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: var(--r-full);
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
  animation: fadeInUp 0.6s ease forwards;
}

.home-hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  line-height: 1.1;
  animation: fadeInUp 0.6s ease 0.1s both;
}

/* Gradient text effect */
.grad-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-3);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

/* Hero search */
.hero-search-wrap {
  max-width: 520px;
  margin: 0 auto 52px;
  position: relative;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-search-wrap input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-hover);
  font-size: 1rem;
  background: rgba(20,20,22,0.9);
  color: var(--text);
  outline: none;
  font-family: var(--font);
  backdrop-filter: blur(10px);
}
.hero-search-wrap input::placeholder { color: var(--text-4); }
.hero-search-wrap input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-dim), var(--shadow-glow);
  animation: none; /* override global inputGlow */
}

[data-theme="light"] .hero-search-wrap input {
  background: rgba(255,255,255,0.95);
}

.hero-search-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-4);
  pointer-events: none;
}

/* Kbd hint inside hero search */
.hero-search-kbd {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  gap: 2px;
  align-items: center;
}

.hero-search-kbd .kbd {
  font-size: 0.7rem;
  padding: 2px 6px;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}

[data-theme="light"] .hero-search-kbd .kbd {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.1);
  color: var(--text-3);
}

/* Dropdown */
#search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-3);
  border: 1px solid var(--border-hover);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  overflow: hidden;
  display: none;
}

/* No results message */
.search-no-results {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-4);
  font-size: 0.875rem;
}

.search-no-results span {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 6px;
}

/* Home stats */
.home-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  animation: fadeInUp 0.6s ease 0.4s both;
  flex-wrap: wrap;
}

.home-stat { text-align: center; }

.home-stat .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
}

.home-stat .label {
  font-size: 0.78rem;
  color: var(--text-4);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ===== SEARCH FILTER (Live card filtering) ===== */
.tool-card.search-hidden {
  display: none;
}

.category-section.search-empty {
  display: none;
}

.search-no-match {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-4);
  display: none;
}

.search-no-match.visible {
  display: block;
}

.search-no-match .no-match-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.search-no-match h3 {
  color: var(--text-3);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.search-no-match p {
  font-size: 0.875rem;
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 6px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  min-height: 36px;
}
.category-tab:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-4);
}
.category-tab.active {
  background: var(--indigo-dim);
  border-color: rgba(99,102,241,0.35);
  color: #a5b4fc;
}

/* ===== CATEGORY SECTION ===== */
.category-section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
.category-section:last-of-type { border-bottom: none; }

.category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.category-icon {
  width: 40px;
  height: 40px;
  background: var(--indigo-dim);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.category-header h2 {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.category-header p {
  font-size: 0.82rem;
  color: var(--text-4);
  margin: 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

/* Stagger animation for cards */
.tools-grid .tool-card:nth-child(1) { animation: staggerIn 0.4s ease 0.05s both; }
.tools-grid .tool-card:nth-child(2) { animation: staggerIn 0.4s ease 0.10s both; }
.tools-grid .tool-card:nth-child(3) { animation: staggerIn 0.4s ease 0.15s both; }
.tools-grid .tool-card:nth-child(4) { animation: staggerIn 0.4s ease 0.20s both; }
.tools-grid .tool-card:nth-child(5) { animation: staggerIn 0.4s ease 0.25s both; }

/* ===== DIFF TOOL ===== */
.diff-line {
  display: block;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  border-left: 3px solid transparent;
}
.diff-added   { background: rgba(34,197,94,0.08); color: #4ade80; border-left-color: var(--success); }
.diff-removed { background: rgba(239,68,68,0.08); color: #f87171; border-left-color: var(--danger); }
.diff-equal   { color: var(--text-3); }

/* ===== QR CODE ===== */
#qr-output {
  display: flex;
  justify-content: center;
  padding: 24px;
  background: white;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

/* ===== PASSWORD STRENGTH ===== */
.strength-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--bg-5);
  overflow: hidden;
  margin-top: 8px;
}
.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s ease, background 0.35s ease;
}

/* ===== TIMER ===== */
.timer-display {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 28px 0;
}
.timer-display.warning {
  background: linear-gradient(135deg, var(--warning), #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
}
.timer-display.danger {
  background: linear-gradient(135deg, var(--danger), #f87171);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ===== KEYBOARD SHORTCUT TOOLTIP ===== */
.shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

/* ===== PAGE FADE-IN ===== */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body { animation: pageFadeIn 0.3s ease; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .tool-sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .container, .container-sm { padding: 0 16px; }
  .header-search { display: none; }
  .site-nav { display: none; }
  .tools-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .home-stats { gap: 28px; }
  .home-hero { padding: 72px 0 64px; }
  /* Larger touch targets on mobile */
  .btn { min-height: 44px; padding: 11px 18px; }
  .btn-sm { min-height: 38px; }
  .tool-card .fav-btn { opacity: 1; width: 36px; height: 36px; font-size: 18px; }
}

@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-area-body { padding: 14px; }
  .home-hero h1 { font-size: 2rem; }
}

/* ===== AFFILIATE SECTION ===== */
.affiliate-section {
  padding: 28px 32px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-top: 8px;
}
.affiliate-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 16px;
}
.affiliate-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.affiliate-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.affiliate-card:hover {
  border-color: var(--border-active);
  background: var(--bg-5);
  transform: translateY(-2px);
}
.affiliate-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.affiliate-card-desc {
  font-size: 0.8rem;
  color: var(--text-2);
  line-height: 1.4;
  flex: 1;
}
.affiliate-card-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--indigo);
  margin-top: 4px;
}
/* ===== /AFFILIATE SECTION ===== */
