﻿:root { --user-theme: rgb(250,250,250); --primary: #64748B; --secondary: #06B6D4; --bg-light: #F8FAFC; --bg-dark: #020617; --metal: #E5E7EB; --accent: #0EA5E9; --text-main: #0F172A; --text-muted: #475569; --border-light: rgba(100, 116, 139, 0.15); --font-base: system-ui, -apple-system, sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-base); background-color: var(--bg-light); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }


.site-header { position: sticky; top: 0; z-index: 900; width: 100%; background: rgba(248, 250, 252, 0.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.header-inner { width: min(1200px, calc(100% - 32px)); margin: 0 auto; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; flex-shrink: 0; }
.logo img { display: block; height: 40px; max-width: 160px; object-fit: contain; }
.logo span { font-size: 18px; font-weight: 800; color: #111827; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.desktop-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.desktop-nav::-webkit-scrollbar { display: none; }
.desktop-nav a { padding: 0 14px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 14px; font-weight: 600; color: #334155; }
.mobile-menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(15, 23, 42, 0.08); align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer; flex-shrink: 0; }
.mobile-menu-btn span { display: block; width: 20px; height: 2px; border-radius: 99px; background: #111827; }
.mobile-nav-mask { position: fixed; inset: 0; z-index: 998; background: rgba(15, 23, 42, 0.54); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; }
.mobile-drawer { position: fixed; top: 0; left: 0; z-index: 999; width: min(86vw, 360px); height: 100vh; background: #ffffff; color: #111827; transform: translateX(-105%); transition: transform .28s ease; display: flex; flex-direction: column; }
.drawer-head { min-height: 76px; padding: 18px 18px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.drawer-logo img { height: 36px; max-width: 130px; }
.drawer-logo span { max-width: 150px; font-size: 17px; }
.drawer-close { width: 40px; height: 40px; border: 0; border-radius: 14px; background: rgba(15, 23, 42, 0.08); font-size: 26px; cursor: pointer; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; }
.drawer-nav { display: flex; flex-direction: column; gap: 8px; }
.drawer-nav a { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 13px 14px; border-radius: 14px; background: rgba(15, 23, 42, 0.04); color: #111827; font-size: 15px; font-weight: 700; }
body.drawer-open { overflow: hidden; touch-action: none; }
body.drawer-open .mobile-nav-mask { opacity: 1; visibility: visible; pointer-events: auto; }
body.drawer-open .mobile-drawer { transform: translateX(0); }

.site-footer { width: 100%; background: #0f172a; color: #e5e7eb; overflow: hidden; margin-top: 60px;}
.footer-inner { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 34px; display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(150px, .8fr)); gap: 28px; }
.footer-logo span { color: #ffffff; }
.footer-brand p { margin: 18px 0 0; color: rgba(226, 232, 240, 0.78); font-size: 14px; max-width: 420px; }
.footer-column h3 { margin: 0 0 14px; color: #ffffff; font-size: 15px; font-weight: 800; }
.footer-column ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-column a { color: rgba(226, 232, 240, 0.78); font-size: 14px; }
.footer-bottom { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 24px; border-top: 1px solid rgba(226, 232, 240, 0.12); display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(226, 232, 240, 0.68); }

@media (max-width: 900px) {
  .header-inner { width: min(100% - 24px, 1200px); min-height: 64px; }
  .desktop-nav { display: none !important; }
  .mobile-menu-btn { display: inline-flex !important; }
  .footer-inner { width: min(100% - 24px, 1200px); grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { width: min(100% - 24px, 1200px); flex-direction: column; align-items: flex-start; }
}


.article-page { width: 100%; max-width: 100%; overflow-x: hidden; padding-top: 40px; }
.article-shell { width: min(1200px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 28px; align-items: start; }
.article-main, .article-sidebar { min-width: 0; max-width: 100%; }
.article-head { margin-bottom: 24px; }
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--primary); }
.article-h1 { font-size: 2.2rem; font-weight: 800; color: var(--text-main); line-height: 1.3; margin-bottom: 16px; word-break: break-word; }
.article-meta-bar { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.9rem; color: var(--text-muted); border-bottom: 1px solid var(--border-light); padding-bottom: 16px; }
.article-tags-links { color: var(--secondary); font-weight: 600; }

.article-cover { width: 100%; max-width: 100%; overflow: hidden; border-radius: 16px; margin-bottom: 30px; }
.article-cover img { width: 100%; max-width: 100%; height: auto; display: block; object-fit: cover; }

.article-content { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; word-break: break-word; overflow-wrap: anywhere; line-height: 1.8; font-size: 1.1rem; color: #334155; margin-bottom: 40px; }
.article-content *, .article-content *::before, .article-content *::after { box-sizing: border-box; max-width: 100%; }
.article-content p, .article-content div, .article-content section, .article-content article, .article-content blockquote, .article-content li, .article-content span { max-width: 100%; word-break: break-word; overflow-wrap: anywhere; margin-bottom: 1em; }
.article-content img, .article-content video, .article-content canvas, .article-content svg { max-width: 100% !important; height: auto !important; display: block; border-radius: 8px; margin: 1em 0; }
.article-content iframe, .article-content embed, .article-content object { max-width: 100% !important; width: 100% !important; display: block; border: 0; }
.article-content table { display: block; width: 100% !important; max-width: 100% !important; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; border-collapse: collapse; }
.article-content thead, .article-content tbody, .article-content tr { width: 100%; }
.article-content th, .article-content td { word-break: break-word; overflow-wrap: anywhere; white-space: normal; border: 1px solid var(--border-light); padding: 8px; }
.article-content pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; -webkit-overflow-scrolling: touch; background: #f1f5f9; padding: 16px; border-radius: 8px; }
.article-content code { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.article-content a { word-break: break-word; overflow-wrap: anywhere; text-decoration: underline; }
.article-content [style*="width"], .article-content [width] { max-width: 100% !important; }
.article-content [style*="min-width"] { min-width: 0 !important; }
.article-content [style*="margin-left"] { margin-left: 0 !important; }
.article-content [style*="left"] { max-width: 100% !important; }
.article-content h2 { margin-top: 2em; margin-bottom: 0.8em; font-size: 1.6rem; color: var(--text-main); }
.article-content h3 { margin-top: 1.5em; margin-bottom: 0.8em; font-size: 1.3rem; }

.article-nav { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--border-light); padding-top: 24px; margin-top: 40px; }
.article-nav a { display: flex; align-items: center; padding: 16px; background: #fff; border: 1px solid var(--border-light); border-radius: 8px; font-weight: 600; color: var(--text-main); transition: background 0.3s; }
.article-nav a:hover { background: var(--bg-light); border-color: var(--primary); }
.article-nav span { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }

.sidebar-widget { background: #fff; border: 1px solid var(--border-light); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.sidebar-widget h3 { font-size: 1.1rem; border-bottom: 2px solid var(--bg-light); padding-bottom: 12px; margin-bottom: 16px; }
.like-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.like-list a { display: flex; gap: 12px; color: var(--text-main); font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.like-list a:hover { color: var(--primary); }
.like-list img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }

@media (max-width: 900px) {
  .article-shell { width: min(100% - 24px, 1200px); grid-template-columns: 1fr; gap: 22px; }
  .article-main, .article-sidebar, .article-content { width: 100%; max-width: 100%; min-width: 0; }
  .article-sidebar { order: 2; }
  .article-content { font-size: 16px; line-height: 1.75; overflow-x: hidden; }
}
@media (max-width: 420px) {
  .article-shell { width: min(100% - 20px, 1200px); }
  .article-content { font-size: 15px; }
}