/* AI8899 综合版样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; line-height: 1.6; }
a { color: inherit; text-decoration: none; }

/* ====== 顶部导航 ====== */
.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.logo-icon { 
  font-size: 28px; 
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.logo-text { 
  font-size: 22px; 
  font-weight: 800; 
  letter-spacing: 1px;
}

.search-box {
  display: flex;
  margin-left: auto;
  background: rgba(255,255,255,0.2);
  border-radius: 25px;
  padding: 4px;
}

.search-box input {
  width: 280px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  border-radius: 20px;
}
.search-box input::placeholder { color: rgba(255,255,255,0.7); }
.search-box input:focus { outline: none; background: rgba(255,255,255,0.15); }

.search-box button {
  padding: 10px 18px;
  background: #fff;
  color: #ff4757;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.search-box button:hover { background: #ffeaa7; }

/* 分类导航 */
.nav-menu {
  background: #fff;
  display: flex;
  padding: 0 24px;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #eee;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-divider {
  width: 1px;
  background: #eee;
  margin: 12px 12px;
}

.nav-btn {
  background: none;
  border: none;
  padding: 14px 18px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-btn:hover { color: #ff4757; background: #fff5f5; }
.nav-btn.active { 
  color: #ff4757; 
  font-weight: 600; 
  position: relative;
}
.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: #ff4757;
  border-radius: 2px;
}
.nav-btn i { font-size: 13px; }

/* ====== 快捷入口 ====== */
.quick-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  margin: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  transition: all 0.3s;
}
.quick-link:hover { transform: translateY(-4px); }
.quick-link i {
  font-size: 28px;
  width: 56px;
  height: 56px;
  line-height: 56px;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff;
}
.quick-link span { font-size: 13px; color: #666; font-weight: 500; }
.quick-link:nth-child(2) i { background: linear-gradient(135deg, #3498db, #5dade2); }
.quick-link:nth-child(3) i { background: linear-gradient(135deg, #2ecc71, #58d68d); }
.quick-link:nth-child(4) i { background: linear-gradient(135deg, #9b59b6, #bb8fce); }

/* ====== 轮播 ====== */
.hero-slider {
  margin: 0 16px;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.slider-item {
  position: absolute;
  inset: 0;
  padding: 40px;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.5s;
}
.slider-item.active { opacity: 1; }

.slider-content {
  max-width: 600px;
}

.slider-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #ff4757;
  color: #fff;
  font-size: 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.slider-content h3 {
  font-size: 26px;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.slider-content p {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
}

.slider-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
}

/* ====== 标签切换 ====== */
.tab-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px;
}

.tab-btn {
  padding: 10px 28px;
  border: 2px solid #eee;
  background: #fff;
  border-radius: 25px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn:hover { border-color: #ff4757; color: #ff4757; }
.tab-btn.active {
  background: #ff4757;
  border-color: #ff4757;
  color: #fff;
}

/* ====== 内容区 ====== */
.container { max-width: 1100px; margin: 0 auto; padding-bottom: 40px; }

.content-section { display: none; }
.content-section.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
}
.section-header h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}
.section-header h2 i { color: #ff4757; }

.section-header .more {
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-header .more:hover { color: #ff4757; }

/* ====== 工具卡片 ====== */
.tools-list {
  background: #fff;
  margin: 0 16px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tool-item {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #f5f5f5;
  transition: all 0.2s;
}
.tool-item:hover { background: #fffbfb; }

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

.tool-title {
  font-size: 17px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
}

.tool-desc {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #95a5a6;
}
.tool-meta .tag { 
  color: #ff4757; 
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-meta .stats {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tool-img {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #ffeaa7, #fff);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-img i {
  font-size: 36px;
  color: #ff4757;
}

/* ====== 资讯卡片 ====== */
.news-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0 16px;
}

.news-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s;
}
.news-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.news-img {
  height: 140px;
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-img i { font-size: 48px; color: #fff; }

.news-content { padding: 16px; }

.news-content h3 {
  font-size: 15px;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-content p {
  font-size: 12px;
  color: #95a5a6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #b2bec3;
}
.news-meta span { display: flex; align-items: center; gap: 4px; }

/* ====== 教程卡片 ====== */
.tutorials-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0 16px;
}

.tutorial-item {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.3s;
}
.tutorial-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.tutorial-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00b894, #00cec9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tutorial-icon i { font-size: 28px; color: #fff; }

.tutorial-content { flex: 1; min-width: 0; }

.tutorial-content h3 {
  font-size: 15px;
  color: #2c3e50;
  margin-bottom: 6px;
}

.tutorial-content p {
  font-size: 12px;
  color: #95a5a6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tutorial-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #b2bec3;
}
.tutorial-meta span { display: flex; align-items: center; gap: 4px; }

/* ====== 底部 ====== */
.footer {
  background: #2c3e50;
  color: #bdc3c7;
  padding: 40px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}
.footer-links a {
  color: #bdc3c7;
  font-size: 14px;
}
.footer-links a:hover { color: #fff; }

.footer p { font-size: 13px; margin-bottom: 10px; }
.footer a { color: #7f8c8d; font-size: 12px; }
.footer a:hover { color: #fff; }

/* ====== 加载/空状态 ====== */
.loading, .empty {
  text-align: center;
  padding: 60px 20px;
  color: #95a5a6;
  font-size: 14px;
  background: #fff;
  margin: 0 16px;
  border-radius: 12px;
}

/* ====== 响应式 ====== */
@media (max-width: 768px) {
  .header-top { padding: 10px 16px; flex-wrap: wrap; }
  .logo-text { font-size: 18px; }
  .search-box { 
    order: 3; 
    width: 100%; 
    margin: 10px 0 0;
    background: rgba(255,255,255,0.25);
  }
  .search-box input { width: 100%; }
  
  .nav-menu { padding: 0 12px; }
  .nav-btn { padding: 12px 14px; font-size: 13px; }
  
  .quick-links { 
    flex-wrap: wrap; 
    gap: 10px; 
    padding: 16px;
  }
  .quick-link { padding: 10px 16px; }
  .quick-link i { 
    width: 48px; 
    height: 48px; 
    line-height: 48px; 
    font-size: 22px; 
  }
  
  .hero-slider { 
    height: 200px; 
    margin: 0 12px; 
  }
  .slider-content h3 { font-size: 20px; }
  .slider-content { padding: 24px; }
  
  .tab-bar { padding: 16px; }
  .tab-btn { padding: 8px 20px; font-size: 13px; }
  
  .news-list, .tutorials-list { 
    grid-template-columns: 1fr; 
    padding: 0 12px; 
  }
  
  .tool-item { padding: 14px 16px; }
  .tool-img { width: 70px; height: 70px; }
  .tool-img i { font-size: 28px; }
}