/* ===== 酷越AI导航 - 主样式 ===== */
/* 主色: #00B368 | 辅色: #008854 | 强调: #FF6B35 */

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

:root {
  --primary: #00B368;
  --primary-dark: #008854;
  --primary-light: #E8F8F0;
  --accent: #FF6B35;
  --bg: #F5F8FA;
  --card: #FFFFFF;
  --text: #222222;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E8ECF0;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-hover: 0 6px 24px rgba(0,179,104,0.15);
  --transition: all 0.25s ease;
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ---------- Header ---------- */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 40px; }
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.logo-text span { color: var(--primary); }

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

.nav a {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-light);
  border-radius: 8px;
  transition: var(--transition);
}
.nav a:hover,
.nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- Hero (首页横幅) ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
  padding: 56px 20px 44px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  position: relative;
}

.hero-highlight {
  background: linear-gradient(90deg, #fff, #a0f0c8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.hero-search {
  display: flex;
  max-width: 520px;
  margin: 0 auto 24px;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.hero-search input {
  flex: 1;
  border: none;
  padding: 14px 22px;
  font-size: 15px;
  outline: none;
}
.hero-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.hero-search button:hover { background: #E55A2B; }

/* Hero 快速分类入口 */
.hero-cats {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-quick-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.btn-free {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  background: rgba(0,179,104,0.15);
  border: 1px solid rgba(0,179,104,0.35);
  border-radius: 50px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-free:hover {
  background: rgba(0,179,104,0.3);
  border-color: rgba(0,179,104,0.6);
  transform: translateY(-1px);
}

.hero-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.hero-cat-link:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
  color: white;
}

/* ---------- Stats (统计条) ---------- */
.stats-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  text-align: center;
}

.stats-bar .container {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- 分类导航 ---------- */
.cat-nav {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.cat-nav .container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-btn {
  padding: 10px 22px;
  font-size: 14px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: white;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.cat-btn:hover,
.cat-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ---------- Section ---------- */
.section {
  padding: 40px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  position: relative;
  padding-left: 16px;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.section-more {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}
.section-more:hover { color: var(--primary-dark); }

.section-alt {
  background: var(--card);
  margin-top: -20px;
  padding-top: 40px !important;
  border-radius: 20px 20px 0 0;
}

/* 最新收录卡片网格 */
.new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.new-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.new-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.new-card .icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: 700;
}

.new-card .info { flex: 1; min-width: 0; }
.new-card .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.new-card .desc {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.new-card .tag-small {
  font-size: 10px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 1px 8px;
  border-radius: 8px;
  margin-left: auto;
  white-space: nowrap;
}

/* 外框按钮 */
.btn-outline {
  display: inline-block;
  padding: 10px 28px;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* ---------- Tool Card Grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.tool-card .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: white;
  background: var(--primary);
}

.tool-card .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-card .desc {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.tool-card .tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* ---------- 精选推荐（大卡片） ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.featured-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.featured-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: white;
  background: var(--primary);
  margin-bottom: 14px;
}

.featured-card .name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.featured-card .desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  flex: 1;
}

.featured-card .go-link {
  margin-top: 14px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
}

.featured-card .go-link:hover { color: var(--primary-dark); }

/* ---------- 分类页面 ---------- */
.cat-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.cat-hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 8px; }
.cat-hero p { font-size: 15px; opacity: 0.9; }

/* ---------- 关于页 ---------- */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 50px 20px;
}
.about-content h2 {
  font-size: 24px;
  margin: 32px 0 12px;
  color: var(--primary-dark);
}
.about-content h2:first-child { margin-top: 0; }
.about-content p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}
.about-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}
.about-content li {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 8px;
  list-style: disc;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-brand {
  max-width: 240px;
}
.footer-brand img {
  margin-bottom: 8px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  transition: var(--transition);
}
.footer-col a:hover {
  color: var(--primary);
}

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

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

.footer-bottom a {
  color: var(--primary);
}
.footer-bottom a:hover { color: var(--primary-dark); }

/* ---------- 移动端菜单按钮 ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- Skeleton / 骨架屏（JS动态加载用） ---------- */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .hero-badge { font-size: 12px; }
  .hero-cats { gap: 8px; }
  .hero-cat-link { padding: 6px 14px; font-size: 12px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .featured-grid { grid-template-columns: 1fr; }
  .new-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .stats-bar .container { gap: 24px; }
  .cat-nav .container { gap: 8px; }
  .cat-btn { padding: 8px 16px; font-size: 13px; }
  .footer-content { flex-direction: column; gap: 24px; }
  .footer-links { gap: 24px; }

  /* 移动端菜单 */
  .menu-toggle { display: flex; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--card); flex-direction: column; padding: 12px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 16px; width: 100%; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-card { padding: 14px 10px; }
  .new-grid { grid-template-columns: 1fr; }
  .featured-card { padding: 18px; }
  .hero-search { flex-direction: column; border-radius: 12px; }
  .hero-search button { border-radius: 0; }
  .section-title { font-size: 18px; }
  .stat-num { font-size: 22px; }
}

/* ===== 价格标签 ===== */
.price-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.6;
  letter-spacing: 0.3px;
}
.featured-card .price-tag { font-size: 9px; padding: 0 5px; }
.new-card .price-tag { font-size: 9px; padding: 0 5px; }
.tool-card .price-tag { font-size: 9px; padding: 0 5px; }

/* ===== 搜索结果 ===== */
.search-results {
  max-width: 600px;
  margin: 12px auto 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}
.search-count {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}
.search-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.search-item:hover {
  background: #f5f8fa;
}
.search-name {
  font-weight: 600;
  color: #222;
  font-size: 14px;
}
.search-cat {
  font-size: 12px;
  color: #999;
}
.search-empty {
  text-align: center;
  color: #999;
  padding: 20px;
  font-size: 14px;
}

/* ===== 使用分享 ===== */
.share-cat {
  margin-bottom: 28px;
}
.share-cat-title {
  font-size: 16px;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.share-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow 0.2s;
}
.share-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.share-tool {
  font-weight: 600;
  color: var(--primary);
}
.share-source {
  color: #999;
}
.share-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
  line-height: 1.4;
}
.share-content {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}
.share-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .share-grid {
    grid-template-columns: 1fr;
  }
}
