:root {
  --red-50: #FFF1F2;
  --red-100: #FFE4E6;
  --red-200: #FECDD3;
  --red-300: #FDA4AF;
  --red-400: #FB7185;
  --red-500: #F43F5E;
  --red-600: #E11D48;
  --red-700: #BE123C;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #D4D4D4;
  --gray-400: #A3A3A3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;
  --white: #FFFFFF;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --shadow-pink: 0 8px 30px rgba(244,63,94,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--white);
  color: var(--gray-700);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

/* ========== Header ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--red-400), var(--red-500));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.logo-text span {
  font-size: 10px;
  color: var(--gray-500);
}

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

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s;
}

.nav a:hover { color: var(--red-500); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-outline {
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  background: var(--white);
}

.btn-outline:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: var(--white);
  box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(244,63,94,0.30);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-menu.open {
  display: block;
  opacity: 1;
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--white);
  padding: 80px 24px 24px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  transform: translateX(100%);
  transition: transform 0.3s;
  overflow-y: auto;
}

.mobile-menu.open .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-content a {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.mobile-menu-content a:hover { color: var(--red-500); }

.mobile-menu-btn.active {
  background: var(--red-50);
  border-color: var(--red-200);
  color: var(--red-500);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  padding: 100px 0 24px;
  background: var(--gray-50);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.breadcrumb-list a { color: var(--gray-500); }
.breadcrumb-list a:hover { color: var(--red-500); }
.breadcrumb-list span { color: var(--gray-900); }

/* ========== Article ========== */
.article-section {
  padding: 24px 0 80px;
  background: var(--white);
}

.article-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.article-main { 
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.article-header { margin-bottom: 32px; }

.article-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--red-50);
  color: var(--red-500);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 16px;
}

.article-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-100);
  flex-wrap: wrap;
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: var(--gray-200);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 15px;
}

.author-role {
  font-size: 13px;
  color: var(--gray-500);
}

.article-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.article-cover {
  width: 100%;
  aspect-ratio: 21/9;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  font-size: 16px;
  line-height: 1.9;
  color: var(--gray-700);
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 40px 0 20px;
}

.article-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 32px 0 16px;
}

.article-content p { margin-bottom: 20px; }

.article-content ul, .article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-content li { margin-bottom: 8px; }

.article-content code {
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 14px;
}

.article-content pre {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 20px;
}

.article-content pre code {
  background: transparent;
  padding: 0;
}

.article-content blockquote {
  border-left: 4px solid var(--red-500);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--gray-600);
  font-style: italic;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 20px 0;
}

.article-content .download-pay-wrapper {
  margin: 28px 0;
  padding: 28px 20px;
  background: var(--white);
  border: 1px dashed rgba(59, 130, 246, 0.55);
  border-radius: var(--radius-md);
  box-shadow: none;
  text-align: center;
}

.article-content .download-pay-wrapper .pla-dow,
.article-content .download-pay-wrapper .download-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.article-content .download-pay-wrapper .tlt-jin {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.5;
}

.article-content .download-pay-wrapper .tlt-jin a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  background: #ff6a2b;
  border: 1px solid #ff6a2b;
  border-radius: 6px;
  color: var(--white) !important;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 106, 43, 0.25);
}

.article-content .download-pay-wrapper .tlt-jin a:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.article-content .download-pay-wrapper .tlt-chi {
  font-size: 13px;
  color: var(--gray-500);
}

.article-content .download-pay-wrapper .tlt-chi span {
  font-weight: 700;
  color: var(--red-600);
}

.article-content .download-pay-wrapper .or-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  font-size: 12px;
  color: var(--gray-400);
}

.article-content .download-pay-wrapper .or-separator::before,
.article-content .download-pay-wrapper .or-separator::after {
  content: '';
  height: 1px;
  background: var(--gray-200);
  flex: 1 1 auto;
}

.article-content .download-pay-wrapper .pla-dow > a.btn {
  min-width: 160px;
  height: 44px;
  padding: 0 18px;
  background: #ff6a2b;
  border: 1px solid #ff6a2b;
  border-radius: 6px;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(255, 106, 43, 0.25);
}

.article-content .download-pay-wrapper .pla-dow > a.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.article-content .download-pay-wrapper .download-content > a.btn {
  min-width: 180px;
  height: 44px;
  padding: 0 18px;
  background: #ff6a2b;
  border: 1px solid #ff6a2b;
  border-radius: 6px;
  color: var(--white);
  box-shadow: 0 10px 24px rgba(255, 106, 43, 0.25);
}

.article-content .download-pay-wrapper .download-content > a.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.article-content .download-pay-wrapper .btn i {
  margin-right: 8px;
}

.article-content .download-pay-wrapper .text-center {
  text-align: center;
}

.article-content .download-pay-wrapper .text-gray {
  color: var(--gray-500);
}

.article-content .download-pay-wrapper .margin-small-top {
  margin-top: 8px;
}

/* ========== Sidebar ========== */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-card {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.toc-list { list-style: none; }

.toc-list li { margin-bottom: 10px; }

.toc-list a {
  color: var(--gray-600);
  font-size: 14px;
  display: block;
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s;
}

.toc-list a:hover {
  color: var(--red-500);
  border-left-color: var(--red-500);
}

.related-list { list-style: none; }

.related-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.related-item:last-child { border-bottom: none; }

.related-item-image {
  width: 80px;
  height: 60px;
  background: var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.related-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item a:hover .related-item-title { color: var(--red-500); }

/* ========== Article Footer ========== */
.article-footer {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-100);
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.article-tags a {
  padding: 6px 14px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 13px;
  border-radius: 999px;
  transition: all 0.2s;
}

.article-tags a:hover {
  background: var(--red-50);
  color: var(--red-500);
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.nav-item {
  padding: 20px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.nav-item:hover { background: var(--red-50); }

.nav-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

/* ========== Footer ========== */
.footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin-top: 16px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-links { list-style: none; }

.footer-links li { margin-bottom: 12px; }

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-contact p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ========== Back to Top ========== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-pink);
  z-index: 99;
}

.back-to-top.show { display: flex; }
.back-to-top:hover { transform: translateY(-4px); }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .article-container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .header-actions .btn-primary { display: none; }
  
  .container { padding: 0 16px; }
  
  .article-container { 
    display: block; 
    width: 100%;
    padding: 0 16px;
  }
  
  .article-main { width: 100%; }
  
  .article-content img,
  .article-content pre,
  .article-content table { 
    max-width: 100%; 
  }
  
  .article-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  .article-content .download-pay-wrapper {
    padding: 14px 14px;
  }

  .article-content .download-pay-wrapper .pla-dow > a.btn,
  .article-content .download-pay-wrapper .download-content > a.btn,
  .article-content .download-pay-wrapper .tlt-jin a {
    width: 100%;
  }

  .article-title { font-size: 24px; }
  .article-meta { gap: 16px; }
  .article-stats { gap: 12px; }
  .article-nav { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
  .footer-brand { grid-column: 1 / -1; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .footer-title { text-align: left; margin-bottom: 12px; }
  .footer-links { text-align: left; }
  .footer-contact { text-align: left; display: block; }
  .footer-contact p { justify-content: flex-start; }
  .footer-contact img { max-width: 100%; height: auto !important; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .back-to-top {
    width: 44px;
    height: 44px;
    bottom: 20px;
    right: 20px;
  }
}
