/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", system-ui, sans-serif;
  line-height: 1.75; color: #1A1A2E; background: #fff;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; display: block; }

/* ===== Announcement ===== */
.announcement {
  background: linear-gradient(135deg, #4F46E5, #7C3AED, #EC4899);
  color: #fff; font-size: 13px; padding: 8px 16px; position: relative; z-index: 100;
}
.announcement.hidden { display: none; }
.announcement-inner {
  max-width: 1200px; margin: 0 auto; display: flex;
  align-items: center; justify-content: center; gap: 6px; position: relative;
}
.announcement-close {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  width: 22px; height: 22px; border-radius: 50%; font-size: 16px;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
.announcement-close:hover { background: rgba(255,255,255,0.3); }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid transparent;
  transition: all 0.3s;
}
.navbar.scrolled { border-bottom-color: #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.logo {
  font-size: 20px; font-weight: 700;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 16px; font-size: 14px; font-weight: 500; color: #6B7280;
  border-radius: 8px; transition: all 0.2s;
}
.nav-links a:hover { color: #7C3AED; background: rgba(124,58,237,0.06); }
.mobile-menu-btn { display: none; background: none; border: none; color: #6B7280; padding: 6px; }
.mobile-menu {
  display: none; padding: 8px 24px 16px; border-top: 1px solid #f3f4f6;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 10px 16px; font-size: 14px; color: #6B7280;
  border-radius: 8px; margin: 2px 0;
}
.mobile-menu a:hover { color: #7C3AED; background: rgba(124,58,237,0.06); }

/* ===== Main ===== */
#main { min-height: 60vh; }

/* ===== Hero ===== */
.hero {
  position: relative; background: #fff; overflow: hidden; padding: 60px 0 80px;
}
.hero-bg-decorator {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero-bg-decorator .blob1 {
  position: absolute; top: -100px; right: -100px; width: 500px; height: 500px;
  background: rgba(124,58,237,0.08); border-radius: 50%; filter: blur(80px);
}
.hero-bg-decorator .blob2 {
  position: absolute; bottom: -150px; left: -150px; width: 400px; height: 400px;
  background: rgba(79,70,229,0.06); border-radius: 50%; filter: blur(60px);
}
.hero-bg-decorator .blob3 {
  position: absolute; top: 50%; left: 50%; width: 300px; height: 300px;
  background: rgba(236,72,153,0.04); border-radius: 50%; filter: blur(60px);
  transform: translate(-50%,-50%);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 60px; position: relative; z-index: 2;
}
.hero-left { flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 999px; background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.12); font-size: 13px;
  color: #7C3AED; font-weight: 500; margin-bottom: 24px;
}
.hero h1 {
  font-size: 52px; font-weight: 700; line-height: 1.15; color: #1A1A2E; margin-bottom: 12px;
}
.hero h1 .gradient {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subtitle { font-size: 18px; color: #6B7280; margin-bottom: 6px; font-weight: 300; }
.hero-desc { font-size: 16px; color: #6B7280; margin-bottom: 28px; max-width: 480px; line-height: 1.7; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; background: #7C3AED; color: #fff;
  border-radius: 12px; font-size: 14px; font-weight: 500; border: none;
  box-shadow: 0 4px 14px rgba(124,58,237,0.25); transition: all 0.2s;
}
.btn-primary:hover { background: #6D28D9; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; background: #fff; color: #374151;
  border-radius: 12px; font-size: 14px; font-weight: 500; border: 1px solid #e5e7eb;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: #7C3AED; color: #7C3AED; background: rgba(124,58,237,0.02); }
.hero-stats { display: flex; gap: 32px; }
.hero-stats .stat-num {
  font-size: 30px; font-weight: 700;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stats .stat-label { font-size: 13px; color: #6B7280; margin-top: 2px; }
.hero-stats .divider { width: 1px; height: 40px; background: #e5e7eb; }

.hero-right { flex: 1; display: flex; justify-content: flex-end; }
.hero-image-wrap { position: relative; width: 100%; max-width: 480px; }
.hero-image-frame {
  position: absolute; inset: -12px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(79,70,229,0.1), rgba(236,72,153,0.1));
}
.hero-image-wrap img {
  width: 100%; border-radius: 16px; position: relative; z-index: 2;
  box-shadow: 0 8px 30px rgba(124,58,237,0.1);
}
.hero-float-badge {
  position: absolute; bottom: -16px; left: -16px;
  background: #fff; border-radius: 12px; padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08); border: 1px solid #f3f4f6;
  display: flex; align-items: center; gap: 10px; z-index: 3; font-size: 12px;
}
.hero-float-badge .icon-box {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.hero-float-badge2 {
  position: absolute; top: -12px; right: -12px;
  background: #fff; border-radius: 12px; padding: 8px 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08); border: 1px solid #f3f4f6;
  display: flex; align-items: center; gap: 8px; z-index: 3; font-size: 11px;
}

/* ===== Section Common ===== */
.section { padding: 80px 24px; }
.section-alt { background: #F8F9FC; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 700; color: #1A1A2E; margin-bottom: 8px; }
.section-header h2 .gradient {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-header .subtitle { font-size: 16px; color: #6B7280; }
.section-header .desc { font-size: 14px; color: #9CA3AF; margin-top: 6px; }

/* ===== Tools ===== */
.tool-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 36px; }
.tool-tab {
  padding: 8px 20px; border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid #e5e7eb; background: #fff; color: #6B7280; cursor: pointer;
  transition: all 0.2s;
}
.tool-tab:hover { color: #7C3AED; background: rgba(124,58,237,0.04); border-color: #ddd6fe; }
.tool-tab.active { background: #7C3AED; color: #fff; border-color: #7C3AED; box-shadow: 0 4px 12px rgba(124,58,237,0.25); }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tool-card {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 16px; padding: 20px;
  transition: all 0.3s; cursor: pointer; text-decoration: none; color: inherit;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px -12px rgba(124,58,237,0.12); border-color: #ede9fe; }
.tool-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.tool-logo {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 16px; flex-shrink: 0;
  overflow: hidden; background: #fff; border: 1px solid #e5e7eb;
}
.tool-logo img { width: 36px; height: 36px; object-fit: contain; }
.tool-logo.letter { border: none; }
.tool-company { font-size: 11px; color: #9CA3AF; background: #f3f4f6; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tool-card h3 { font-size: 16px; font-weight: 600; color: #1A1A2E; margin-bottom: 4px; transition: color 0.2s; }
.tool-card:hover h3 { color: #7C3AED; }
.tool-card p { font-size: 13px; color: #6B7280; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tool-tag { font-size: 11px; color: #7C3AED; background: rgba(124,58,237,0.06); padding: 3px 10px; border-radius: 999px; font-weight: 500; }

/* ===== News ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 16px; overflow: hidden;
  transition: all 0.3s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px -12px rgba(124,58,237,0.1); border-color: #ede9fe; }
.news-image { height: 180px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-image img { transform: scale(1.05); }
.news-body { padding: 16px 18px; }
.news-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9CA3AF; margin-bottom: 8px; }
.news-card h3 { font-size: 15px; font-weight: 600; color: #1A1A2E; line-height: 1.45; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.news-card:hover h3 { color: #7C3AED; }
.news-card .summary { font-size: 13px; color: #6B7280; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.news-readmore { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: #7C3AED; background: none; border: none; padding: 0; }
.news-readmore:hover { gap: 8px; }

/* ===== Tutorials ===== */
.tutorial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tutorial-card {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 16px; padding: 28px;
  cursor: pointer; transition: all 0.3s; text-align: left;
}
.tutorial-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px -12px rgba(124,58,237,0.1); border-color: #ede9fe; }
.tutorial-icon {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid; display: flex;
  align-items: center; justify-content: center; margin-bottom: 16px;
}
.tutorial-card h3 { font-size: 20px; font-weight: 700; color: #1A1A2E; margin-bottom: 6px; }
.tutorial-card h3:hover { color: #7C3AED; }
.tutorial-card .subtitle { font-size: 14px; color: #6B7280; margin-bottom: 12px; }
.tutorial-card .desc { font-size: 13px; color: #9CA3AF; line-height: 1.6; margin-bottom: 16px; }
.tutorial-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid #f3f4f6; }
.tutorial-count { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #6B7280; }
.tutorial-link { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: #7C3AED; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { font-size: 16px; color: #374151; line-height: 1.8; margin-bottom: 20px; }
.about-box {
  background: rgba(124,58,237,0.04); border: 1px solid rgba(124,58,237,0.1);
  border-radius: 16px; padding: 20px; margin-bottom: 20px;
}
.about-box h4 { font-size: 15px; font-weight: 600; color: #1A1A2E; margin-bottom: 6px; }
.about-box p { font-size: 13px; color: #6B7280; margin-bottom: 0; line-height: 1.6; }
.about-qr { display: flex; justify-content: center; }
.about-qr-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 24px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.04); max-width: 260px;
}
.about-qr-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: #fff;
}
.about-qr-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.about-qr-card p { font-size: 12px; color: #6B7280; margin-bottom: 12px; }
.about-qr-card img { width: 180px; height: 180px; border-radius: 12px; margin: 0 auto; border: 1px solid #f3f4f6; }

/* ===== Footer ===== */
.footer { background: #0F0F23; color: #9CA3AF; padding: 60px 24px 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-logo {
  font-size: 22px; font-weight: 700;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: inline-block; margin-bottom: 10px;
}
.footer-brand p { font-size: 13px; color: #6B7280; line-height: 1.6; }
.footer-col h4 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: #6B7280; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 0; text-align: center; font-size: 12px; color: #4B5563; }

/* ===== Page: Article List ===== */
.page-articles { background: #F8F9FC; min-height: 60vh; padding: 24px 24px 60px; }
.page-inner { max-width: 900px; margin: 0 auto; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9CA3AF; margin-bottom: 24px; }
.breadcrumb a:hover { color: #7C3AED; }
.page-title .tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 500; margin-bottom: 12px;
}
.page-title h1 { font-size: 26px; font-weight: 700; color: #1A1A2E; margin-bottom: 6px; }
.page-title p { font-size: 14px; color: #6B7280; margin-bottom: 24px; }
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-row {
  background: #fff; border: 1px solid #f3f4f6; border-radius: 12px; padding: 18px 22px;
  cursor: pointer; transition: all 0.2s; text-align: left; width: 100%;
}
.article-row:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -8px rgba(124,58,237,0.1); border-color: #ede9fe; }
.article-row h3 { font-size: 16px; font-weight: 600; color: #1A1A2E; margin-bottom: 6px; transition: color 0.2s; }
.article-row:hover h3 { color: #7C3AED; }
.article-row p { font-size: 13px; color: #6B7280; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-row-meta { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.article-row-meta span { font-size: 12px; color: #9CA3AF; display: flex; align-items: center; gap: 4px; }

/* ===== Page: Article Detail ===== */
.page-detail { background: #fff; min-height: 60vh; padding: 24px 24px 60px; }
.page-detail-inner { max-width: 720px; margin: 0 auto; }
.article-detail .tag { display: inline-flex; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; margin-bottom: 12px; }
.article-detail h1 { font-size: 26px; font-weight: 700; color: #1A1A2E; line-height: 1.35; margin-bottom: 12px; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: #9CA3AF; margin-bottom: 20px; }
.article-body { color: #374151; line-height: 1.85; font-size: 15px; }
.article-body h2 { font-size: 20px; font-weight: 700; color: #1A1A2E; margin: 28px 0 12px; }
.article-body h3 { font-size: 17px; font-weight: 600; color: #1A1A2E; margin: 22px 0 10px; }
.article-body p { margin-bottom: 12px; }
.article-body strong { color: #1A1A2E; }
.article-body ul, .article-body ol { margin: 10px 0 16px 20px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote { border-left: 3px solid #ddd6fe; background: rgba(124,58,237,0.03); padding: 10px 16px; margin: 14px 0; border-radius: 0 8px 8px 0; font-style: italic; color: #4B5563; }
.article-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
.article-body th { background: #f9fafb; font-weight: 600; color: #1A1A2E; }
.detail-actions { margin-top: 36px; padding-top: 20px; border-top: 1px solid #f3f4f6; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #6B7280; background: none; border: none; padding: 0; }
.back-btn:hover { color: #7C3AED; }

/* ===== News Detail Modal ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.modal-content { position: relative; background: #fff; border-radius: 20px; max-width: 680px; width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.2); z-index: 1; }
.modal-header { position: relative; height: 240px; overflow: hidden; border-radius: 20px 20px 0 0; }
.modal-header img { width: 100%; height: 100%; object-fit: cover; }
.modal-header .overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.4), transparent); }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px); border: none;
  border-radius: 50%; color: #fff; font-size: 20px; display: flex;
  align-items: center; justify-content: center; cursor: pointer; z-index: 2;
}
.modal-body { padding: 28px 32px; }
.modal-body .date { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9CA3AF; margin-bottom: 10px; }
.modal-body h2 { font-size: 22px; font-weight: 700; color: #1A1A2E; line-height: 1.35; margin-bottom: 16px; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #7C3AED; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 42px; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .hero-inner { flex-direction: column; text-align: center; gap: 40px; }
  .hero h1 { font-size: 36px; }
  .hero-stats { justify-content: center; }
  .hero-right { order: -1; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-image-wrap { max-width: 360px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .section { padding: 60px 16px; }
  .page-articles, .page-detail { padding: 16px 16px 40px; }
}
