/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #4f6df5;
  --primary-dark: #3b5de7;
  --primary-light: #eef2ff;
  --secondary: #1a1d2e;
  --accent: #ff6b6b;
  --success: #2ecc71;
  --warning: #f39c12;
  --text: #2d3436;
  --text-light: #636e72;
  --text-muted: #b2bec3;
  --bg: #ffffff;
  --bg-alt: #f8f9fd;
  --bg-dark: #1a1d2e;
  --border: #e9ecf0;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 10px 40px rgba(0,0,0,0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 68px;
  --max-w: 1240px;
}
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79,109,245,0.35); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16px; }
.btn-block { display: flex; justify-content: center; width: 100%; }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h); background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--secondary); }
.logo:hover { color: var(--primary); }
.logo-icon { color: var(--primary); font-size: 26px; }
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  color: var(--text-light); font-weight: 500; font-size: 15px;
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-light); color: var(--primary); }
.main-nav a i { font-size: 14px; }
.header-tools { display: flex; align-items: center; gap: 12px; }
.lang-switch {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px;
  font-size: 13px; font-weight: 600; color: var(--text-light);
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.admin-link { color: var(--text-muted); font-size: 18px; }
.admin-link:hover { color: var(--primary); }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.mobile-toggle span { display: block; width: 24px; height: 3px; background: var(--text); border-radius: 3px; transition: var(--transition); }

/* ===== Main ===== */
.site-main { padding-top: var(--header-h); }

/* ===== Hero ===== */
.hero-section {
  position: relative; min-height: 520px; display: flex; align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 60px 0; }
.hero-title { font-size: 48px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.hero-subtitle { font-size: 18px; opacity: 0.9; margin-bottom: 32px; max-width: 640px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { border-color: rgba(255,255,255,0.5); color: #fff; }
.hero-actions .btn-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== Stats Bar ===== */
.stats-bar { background: var(--bg-alt); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-item { display: flex; align-items: center; gap: 16px; background: #fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); border-radius: var(--radius-sm); color: var(--primary); font-size: 24px; }
.stat-num { font-size: 28px; font-weight: 800; color: var(--secondary); }
.stat-label { font-size: 14px; color: var(--text-light); }

/* ===== Section ===== */
.section-block { padding: 60px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 700; color: var(--secondary); }
.title-accent { width: 4px; height: 28px; background: var(--primary); border-radius: 2px; }
.section-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--primary); }
.section-more:hover { gap: 10px; }

/* ===== Article Card ===== */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.article-thumb { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.article-card:hover .article-thumb img { transform: scale(1.08); }
.article-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e8ecf4, #dde3ed); color: var(--text-muted); font-size: 40px; }
.badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; }
.badge-top { background: var(--accent); }
.badge-rec { left: auto; right: 10px; background: var(--warning); }
.article-body { padding: 20px; }
.article-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.article-title a { color: var(--secondary); }
.article-title a:hover { color: var(--primary); }
.article-summary { font-size: 14px; color: var(--text-light); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); }
.article-meta i { margin-right: 4px; }

/* ===== Product Card ===== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-grid-full { grid-template-columns: repeat(3, 1fr); }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-thumb { aspect-ratio: 1; overflow: hidden; background: var(--bg-alt); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-thumb img { transform: scale(1.08); }
.product-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e8ecf4, #dde3ed); color: var(--text-muted); font-size: 40px; }
.product-body { padding: 16px; }
.product-name { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--secondary); }
.product-specs { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
.product-price { font-size: 18px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.product-desc { font-size: 13px; color: var(--text-light); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Page Banner ===== */
.page-banner { background: linear-gradient(135deg, var(--secondary) 0%, #2d3148 100%); color: #fff; padding: 48px 0; }
.page-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; opacity: 0.8; }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb i { font-size: 10px; }

/* ===== Content Section ===== */
.content-section { padding: 40px 0; min-height: 400px; }

/* ===== Filter Bar ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-tag { padding: 8px 20px; border-radius: 20px; background: var(--bg-alt); color: var(--text-light); font-size: 14px; font-weight: 500; }
.filter-tag:hover, .filter-tag.active { background: var(--primary); color: #fff; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); background: var(--bg-alt); color: var(--text-light); font-weight: 600; font-size: 14px; }
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state i { font-size: 60px; margin-bottom: 16px; }
.empty-state p { font-size: 18px; }

/* ===== Article Detail ===== */
.article-detail-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
.article-detail { background: #fff; border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.article-detail-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-detail-title { font-size: 30px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; color: var(--secondary); }
.article-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--text-muted); }
.article-tag { padding: 3px 10px; background: var(--primary-light); color: var(--primary); border-radius: 6px; font-size: 12px; }
.article-detail-cover { margin-bottom: 24px; border-radius: var(--radius); overflow: hidden; }
.article-detail-cover img { width: 100%; border-radius: var(--radius); }
.article-content { font-size: 16px; line-height: 1.8; color: var(--text); }
.article-content h2 { font-size: 24px; font-weight: 700; margin: 28px 0 14px; color: var(--secondary); }
.article-content h3 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; color: var(--secondary); }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--secondary); }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-keywords { margin-top: 30px; padding: 16px; background: var(--bg-alt); border-radius: var(--radius-sm); font-size: 14px; }
.related-articles { margin-top: 30px; }
.related-articles h3 { font-size: 20px; margin-bottom: 16px; color: var(--secondary); }
.related-list { list-style: none; }
.related-list li { margin-bottom: 10px; }
.related-list a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); transition: var(--transition); }
.related-list a:hover { background: var(--bg-alt); }
.related-list img { width: 60px; height: 40px; object-fit: cover; border-radius: 6px; }
.article-sidebar { }
.sidebar-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.sidebar-card h4 { font-size: 18px; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); color: var(--secondary); }
.sidebar-cat-list { list-style: none; }
.sidebar-cat-list li { margin-bottom: 8px; }
.sidebar-cat-list a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-light); }
.sidebar-cat-list a:hover { background: var(--primary-light); color: var(--primary); }

/* ===== Contact ===== */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h2, .contact-form-wrap h2 { font-size: 26px; font-weight: 700; margin-bottom: 16px; color: var(--secondary); }
.contact-intro { color: var(--text-light); margin-bottom: 30px; font-size: 16px; }
.contact-list { }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-icon { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); color: var(--primary); border-radius: 50%; font-size: 20px; flex-shrink: 0; }
.contact-text h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--secondary); }
.contact-text p { color: var(--text-light); font-size: 15px; }
.contact-form-wrap { background: #fff; border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--secondary); }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }

/* ===== Dynamics ===== */
.dynamics-list { max-width: 800px; margin: 0 auto; }
.dynamic-item { display: flex; gap: 20px; padding: 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; transition: var(--transition); }
.dynamic-item:hover { transform: translateX(6px); }
.dynamic-thumb { width: 200px; aspect-ratio: 16/9; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-alt); }
.dynamic-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dynamic-body { flex: 1; }
.dynamic-body h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.dynamic-body h3 a { color: var(--secondary); }
.dynamic-body h3 a:hover { color: var(--primary); }
.dynamic-body p { font-size: 14px; color: var(--text-light); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dynamic-meta { font-size: 13px; color: var(--text-muted); }
.loading-indicator { text-align: center; padding: 30px; color: var(--text-muted); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-end { text-align: center; padding: 20px; color: var(--text-muted); }

/* ===== Nav Sites ===== */
.nav-category-block { margin-bottom: 40px; }
.nav-cat-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--secondary); display: flex; align-items: center; gap: 10px; }
.nav-cat-title i { color: var(--primary); }
.nav-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.nav-site-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.nav-site-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.nav-site-screenshot { width: 100%; height: 120px; overflow: hidden; background: var(--bg-alt); }
.nav-site-screenshot img { width: 100%; height: 100%; object-fit: cover; }
.nav-site-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 30px; }
.nav-site-info { padding: 14px; }
.nav-site-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--secondary); }
.nav-site-info p { font-size: 13px; color: var(--text-light); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Error Section ===== */
.error-section { padding: 80px 0; text-align: center; }
.error-code { font-size: 120px; font-weight: 800; color: var(--primary); opacity: 0.2; line-height: 1; }

/* ===== Footer ===== */
.site-footer { background: var(--bg-dark); color: #a0a4b8; padding: 50px 0 20px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-logo { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-logo i { color: var(--primary); }
.footer-about p { font-size: 14px; line-height: 1.6; }
.footer-col h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #a0a4b8; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 14px; }
.icp { margin-left: 16px; }

/* ===== Mobile Bottom Nav ===== */
.mobile-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; background: rgba(255,255,255,0.98); backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 8px 0; padding-bottom: env(safe-area-inset-bottom); justify-content: space-around; }
.mb-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 16px; color: var(--text-muted); font-size: 12px; font-weight: 500; border-radius: var(--radius-sm); }
.mb-nav-item i { font-size: 20px; }
.mb-nav-item.active, .mb-nav-item:active { color: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid-full { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .article-detail-wrap { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .main-nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: #fff; padding: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .mobile-toggle { display: flex; }
  .mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
  .mobile-toggle.active span:nth-child(2) { opacity: 0; }
  .mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
  
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }
  .hero-actions .btn { padding: 12px 24px; font-size: 14px; }
  
  .article-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 22px; }
  .page-title { font-size: 24px; }
  
  .article-detail { padding: 20px; }
  .article-detail-title { font-size: 22px; }
  
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px; }
  
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  
  .mobile-bottom-nav { display: flex; }
  .site-main { padding-bottom: 70px; }
  
  .dynamic-thumb { width: 120px; }
  .nav-site-grid { grid-template-columns: 1fr 1fr; }
  
  .stat-item { padding: 16px; }
  .stat-num { font-size: 22px; }
  
  .section-block { padding: 40px 0; }
  .container { padding: 0 16px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .nav-site-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 14px; }
  .hero-section { min-height: 380px; }
  .dynamic-thumb { width: 100px; height: 66px; }
  .dynamic-body h3 { font-size: 16px; }
}
