/* Aivsly.com Modern Theme v3.0 */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --bg: #f0f4ff;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --shadow-hover: 0 20px 50px rgba(99,102,241,.15);
  --radius: 14px;
  --radius-sm: 10px;
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--primary); transition: all .2s ease; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(226,232,240,.6);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}
.site-logo:hover { color: var(--primary); }
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}
.logo-text strong {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Header search */
.header-search .search-form-mini {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  width: 260px;
  transition: all .3s ease;
}
.header-search .search-form-mini:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
  width: 320px;
}
.header-search input {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  width: 100%;
  color: var(--text);
}
.header-search button {
  background: none;
  border: none;
  padding: 10px 16px;
  color: var(--primary);
  cursor: pointer;
  font-size: 18px;
}

/* Nav */
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  color: var(--text-light);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .25s ease;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--primary); background: rgba(99,102,241,.06); }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--text); cursor: pointer; }

/* Hero */
.hero-section {
  text-align: center;
  padding: 56px 20px 40px;
  background: linear-gradient(180deg, rgba(99,102,241,.05) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.08), transparent 70%);
  pointer-events: none;
}
.hero-title {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.2;
  margin-bottom: 16px;
  position: relative;
}
.hero-title em {
  font-style: normal;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 17px;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* Hero search */
.hero-search { max-width: 640px; margin: 0 auto; }
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 56px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all .3s ease;
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1), var(--shadow-lg);
}
.engine-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 20px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.engine-icon { width: 26px; height: 26px; border-radius: 6px; }
.engine-arrow { font-size: 12px; color: var(--text-muted); }
.engine-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}
.engine-switch:hover .engine-dropdown { display: block; }
.engine-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-light);
  transition: all .15s;
}
.engine-dropdown a:hover,
.engine-dropdown a.active { background: rgba(99,102,241,.06); color: var(--primary); }

#heroSearchForm { display: flex; flex: 1; align-items: center; }
#heroSearchForm input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 16px 12px;
  font-size: 16px;
  outline: none;
  color: var(--text);
}
#heroSearchForm input::placeholder { color: var(--text-muted); }
.search-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 12px 24px;
  margin: 6px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
}
.search-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(99,102,241,.35);
}

/* Hot keywords */
.hot-keywords {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  justify-content: center;
}
.hot-label { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.hot-keywords a {
  font-size: 13px;
  color: var(--text-light);
  padding: 4px 12px;
  background: rgba(99,102,241,.05);
  border-radius: 50px;
  transition: all .2s ease;
}
.hot-keywords a:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* Category Nav */
.cat-nav-section { padding: 0 0 32px; }
.cat-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  transition: all .25s ease;
  white-space: nowrap;
}
.cat-tab:hover {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
  transform: translateY(-2px);
}
.cat-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99,102,241,.3);
}

/* Tools Section */
.tools-section { padding: 0 0 48px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-header h2 { font-size: 22px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-header h2 i { color: #f59e0b; font-size: 22px; }
.view-all { font-size: 14px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.view-all:hover { color: var(--primary-dark); gap: 8px; }

/* Tools Grid */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.tools-grid-lg { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }

/* Tool Card */
.tool-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99,102,241,.2);
  color: var(--text);
}
.tool-icon { flex-shrink: 0; }
.tool-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.tool-info { flex: 1; min-width: 0; }
.tool-name-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tool-name { font-size: 17px; font-weight: 700; color: var(--text); }
.tool-card:hover .tool-name { color: var(--primary); }
.tool-badges { display: flex; gap: 4px; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; font-size: 11px; font-weight: 700; border-radius: 50px; }
.badge-free { background: linear-gradient(135deg,#00b894,#00cec9); color: #fff; }
.badge-hot { background: linear-gradient(135deg,#ff6b6b,#ee5a24); color: #fff; }
.badge-new { background: linear-gradient(135deg,#0984e3,#74b9ff); color: #fff; }
.badge-cn { background: linear-gradient(135deg,#e74c3c,#c0392b); color: #fff; }
.badge-paid { background: linear-gradient(135deg,#a29bfe,#6c5ce7); color: #fff; }
.tool-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}
.tool-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-muted); }
.tool-cat { padding: 3px 10px; background: rgba(99,102,241,.06); color: var(--primary); border-radius: 50px; font-weight: 600; }
.star { font-style: normal; font-size: 12px; }
.star.full, .star.half { color: #f59e0b; }
.star.empty { color: #e2e8f0; }

/* Section Category Block */
.cat-section { padding: 32px 0; }
.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.cat-section-header h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cat-section-header h2 i { color: var(--primary); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 36px 0 20px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 14px;
  font-size: 14px; font-weight: 600; color: var(--text-light);
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); transition: all .2s ease;
}
.pagination a:hover { color: var(--primary); border-color: var(--primary); }
.pagination .active, .pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }


/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.tool-card { animation: fadeInUp .5s ease forwards; opacity: 0; }
.tool-card:nth-child(1) { animation-delay: .03s; }
.tool-card:nth-child(2) { animation-delay: .06s; }
.tool-card:nth-child(3) { animation-delay: .09s; }
.tool-card:nth-child(4) { animation-delay: .12s; }
.tool-card:nth-child(5) { animation-delay: .15s; }
.tool-card:nth-child(6) { animation-delay: .18s; }
.tool-card:nth-child(n+7) { animation-delay: .21s; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::selection { background: rgba(99,102,241,.15); color: var(--text); }

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .header-inner { height: 60px; }
  .header-search { display: none; }
  .header-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    padding: 16px; flex-direction: column; box-shadow: var(--shadow-lg);
  }
  .header-nav.active { display: flex; }
  .header-nav a { padding: 12px 16px; width: 100%; }
  .nav-toggle { display: block; }
  .hero-section { padding: 36px 16px 28px; }
  .hero-title { font-size: 28px; }
  .tools-grid, .tools-grid-lg { grid-template-columns: 1fr; gap: 14px; }
  .tool-card { padding: 16px; }
  .cat-tabs { gap: 6px; }
  .cat-tab { padding: 7px 14px; font-size: 13px; }
}
@media (max-width: 480px) {
  .hero-search { margin: 0 8px; }
  .search-box { border-radius: 16px; }
  .search-btn { border-radius: 12px; padding: 10px 16px; }
  .hot-keywords { gap: 6px; }
  .hot-keywords a { font-size: 12px; padding: 3px 10px; }
}

/* ===== FOOTER v2.0 ===== */
.site-footer {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: rgba(255,255,255,.55);
  padding: 60px 24px 24px;
  margin-top: 60px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #0ea5e9);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Brand column */
.footer-brand .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  margin-bottom: 16px;
}
.footer-brand .logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 10px;
  color: #fff;
  font-size: 18px;
}
.footer-brand .logo-text strong {
  color: #60a5fa;
  font-weight: 700;
}
.footer-desc {
  color: rgba(255,255,255,.45);
  line-height: 1.8;
  margin: 0 0 20px 0;
  font-size: 13px;
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.55);
  font-size: 18px;
  transition: all .3s ease;
  text-decoration: none;
}
.footer-social a:hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  transform: translateY(-3px);
}

/* Column titles */
.footer-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  position: relative;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 32px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

/* Link list */
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-list li {
  margin-bottom: 10px;
}
.footer-list a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .25s ease;
  font-size: 14px;
}
.footer-list a i {
  font-size: 14px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all .25s ease;
  color: #7c3aed;
}
.footer-list a:hover {
  color: #fff;
  padding-left: 4px;
}
.footer-list a:hover i {
  opacity: 1;
  transform: translateX(0);
}

/* Divider */
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
  margin: 40px 0 24px;
}

/* Bottom */
.footer-bottom {
  text-align: center;
  color: rgba(255,255,255,.3);
  font-size: 13px;
}
.footer-copy {
  margin: 0 0 6px 0;
}
.footer-icp {
  margin: 0;
}
.footer-icp a {
  color: rgba(255,255,255,.3);
  text-decoration: none;
  transition: color .2s;
}
.footer-icp a:hover {
  color: rgba(255,255,255,.6);
}


/* ===== Article Page Styles ===== */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 13px;
  color: #999;
}
.breadcrumb a {
  color: #6366f1;
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: #4f46e5; }
.breadcrumb span { color: #ccc; }

/* Category Tabs */
.search-tab {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: #666;
  background: #f3f4f6;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.search-tab:hover {
  background: #eef2ff;
  color: #4f46e5;
  border-color: #c7d2fe;
}
.search-tab.active {
  background: #4f46e5;
  color: #fff;
  border-color: #4f46e5;
}

/* Article Card (List) */
.article-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ebebeb;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  align-items: flex-start;
}
.article-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
  transform: translateY(-2px);
}

.article-cover {
  width: 200px;
  height: 140px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.article-card:hover .article-cover img {
  transform: scale(1.05);
}

.article-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}
.article-title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.5;
  margin: 0;
  transition: color 0.2s;
}
.article-card:hover .article-title {
  color: #4f46e5;
}
.article-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-date {
  font-size: 12px;
  color: #aaa;
}
.article-date i {
  margin-right: 3px;
}

/* Tool category tag */
.tool-cat {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #4f46e5;
  background: #eef2ff;
  text-decoration: none;
  font-weight: 500;
}

/* Sidebar Card */
.sidebar-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #ebebeb;
  margin-bottom: 16px;
}
.sidebar-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* Article Content Prose */
.prose {
  font-size: 15px;
  line-height: 1.85;
  color: #333;
}
.prose h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eef2ff;
}
.prose h3 {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin: 22px 0 10px;
}
.prose p {
  margin: 12px 0;
}
.prose strong {
  color: #1a1a2e;
}
.prose a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose a:hover {
  color: #6366f1;
}
.prose ul, .prose ol {
  padding-left: 24px;
  margin: 12px 0;
}
.prose li {
  margin: 6px 0;
  line-height: 1.7;
}
.prose blockquote {
  border-left: 4px solid #4f46e5;
  padding: 12px 16px;
  margin: 16px 0;
  background: #f8f9ff;
  border-radius: 0 8px 8px 0;
  color: #555;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #aaa;
}
.empty-state i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

/* Responsive */
@media (max-width: 900px) {
  .article-card {
    flex-direction: column;
  }
  .article-cover {
    width: 100%;
    height: 180px;
  }
  .article-body {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .article-card {
    padding: 12px;
  }
  .article-cover {
    height: 150px;
  }
  .article-title {
    font-size: 15px;
  }
  .prose h2 {
    font-size: 18px;
  }
  .prose h3 {
    font-size: 16px;
  }
  .prose {
    font-size: 14px;
  }
}
