:root {
    --primary: #000000;
    --primary-hover: #333333;
    --accent: #2563eb;
    --bg: #ffffff;
    --text: #0a0a0a;
    --text-secondary: #525252;
    --text-light: #a3a3a3;
    --border: #e5e5e5;
    --border-light: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f8f8;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.site-content {
    background: #fff;
    min-height: calc(100vh - 400px);
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    flex: 1;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--text);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.subscriber-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.subscriber-logout {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    margin-left: 8px;
}

.subscriber-logout:hover {
    color: var(--accent);
}

.nav-links a.nav-login {
    padding: 6px 16px;
    background: var(--text);
    color: #fff !important;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.nav-links a.nav-login:hover {
    background: var(--accent);
    color: #fff !important;
}

.nav-links a.nav-login::after {
    display: none;
}

.user-menu {
    position: relative;
}

.user-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--border-light);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.user-name:hover {
    background: var(--border);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 100;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.user-dropdown a:hover {
    background: var(--border-light);
    color: var(--text);
}

.search-form {
    margin-left: 24px;
}

.search-form input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    outline: none;
    width: 180px;
    background: transparent;
    transition: all 0.3s ease;
}

.search-form input:focus {
    border-color: var(--text);
    width: 240px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

main.container {
    padding-top: 140px;
    padding-bottom: 40px;
    background: #fff;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 80px;
    align-items: start;
}

.home-layout .sidebar {
    grid-column: 2;
    grid-row: 1;
}

.home-layout .main-content {
    grid-column: 1;
    grid-row: 1;
}

.article-list {
    display: flex;
    flex-direction: column;
}

.article-card {
    display: flex;
    gap: 32px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.article-card:first-child {
    padding-top: 0;
}

.article-card:last-child {
    border-bottom: none;
}

.article-card:hover {
    transform: translateX(8px);
}

.article-cover {
    flex-shrink: 0;
    width: 220px;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--border-light);
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-cover img {
    transform: scale(1.08);
}

.article-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.article-body h2 a {
    color: var(--text);
}

.article-body h2 a:hover {
    color: var(--accent);
}

.article-summary {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: wrap;
    white-space: nowrap;
}

.cat-tag {
    color: var(--accent);
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    align-self: flex-start;
    border-radius: 3px;
}

.badge-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.badge.top {
    background: var(--text);
    color: #fff;
}

.badge.paid {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
}

.widget {
    margin-bottom: 48px;
}

.widget-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.widget-list {
    list-style: none;
}

.widget-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.widget-list a:hover {
    color: var(--text);
    padding-left: 8px;
}

.widget-list .count {
    font-size: 12px;
    color: var(--text-light);
}

.author-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--border-light);
    border-radius: 16px;
    margin-bottom: 48px;
}

.author-avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.author-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 9px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.widget-comments li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.widget-comments li:last-child {
    border-bottom: none;
}

.widget-comments strong {
    font-weight: 600;
}

.widget-comments a {
    color: var(--text);
    font-weight: 500;
}

.widget-comments a:hover {
    color: var(--accent);
}

.widget-comments p {
    color: var(--text-light);
    margin-top: 6px;
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.pagination a {
    padding: 12px 28px;
    background: var(--text);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.pagination span.page-info {
    padding: 12px;
    color: var(--text-light);
}

.article-detail {
    max-width: 720px;
    margin: 0 auto 80px;
}

.article-header {
    margin-bottom: 48px;
}

.article-header h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.article-meta {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    gap: 16px;
}

.article-cover-full {
    margin-bottom: 48px;
    border-radius: 16px;
    overflow: hidden;
}

.article-cover-full img {
    width: 100%;
    display: block;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 48px 0 20px;
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 16px;
}

.article-content p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--border-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', monospace;
    font-size: 14px;
}

.article-content pre {
    background: var(--text);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 32px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 32px 0;
    color: var(--text-secondary);
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.article-nav a {
    display: block;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 48%;
    transition: all 0.3s ease;
}

.article-nav a:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.article-nav .next {
    text-align: right;
    margin-left: auto;
}

.article-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-label {
    font-size: 13px;
    color: var(--text-light);
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--border-light);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--text);
    color: #fff;
}

.comments-section {
    padding-top: 48px;
    border-top: 1px solid var(--border-light);
}

.comments-section h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-header strong {
    font-weight: 600;
}

.comment-header time {
    font-size: 13px;
    color: var(--text-light);
}

.comment-content {
    font-size: 15px;
    color: var(--text-secondary);
}

.empty {
    text-align: center;
    padding: 48px;
    color: var(--text-light);
}

.comment-form {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.comment-form h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.comment-form .form-row {
    display: flex;
    gap: 16px;
}

.comment-form .form-group {
    flex: 1;
    margin-bottom: 16px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: transparent;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--text);
}

.btn-submit {
    padding: 16px 40px;
    background: var(--text);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.site-footer {
    background: var(--text);
    color: #fff;
    padding: 80px 0 40px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 48px;
}

.footer-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-about {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.social-link:hover {
    background: #fff;
    border-color: #fff;
}

.social-link:hover .social-icon-img {
    filter: none;
}

.social-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.social-icon-text {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
}

.social-link:hover .social-icon-text {
    color: var(--text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 14px;
}

.contact-label {
    display: block;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-links-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links-section h4 {
    margin-bottom: 16px;
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    transition: all 0.3s ease;
}

.friend-link-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.friend-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
}

.friend-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.icp a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.icp a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--text);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.ad-container {
    margin: 24px 0;
    text-align: center;
}

.ad-label {
    font-size: 9px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.breadcrumb {
    margin-bottom: 32px;
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 10px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--text);
}

.category-header,
.search-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.category-header h1,
.search-header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.article-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 48px 0;
    padding: 32px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

.action-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

.donate-trigger {
    border-color: var(--accent);
    color: var(--accent);
}

.donate-trigger:hover {
    background: var(--accent);
    color: #fff;
}

.share-modal,
.donate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.share-content,
.donate-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.share-content {
    width: 400px;
    max-width: 90vw;
}

.share-content h4 {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.share-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.share-item {
    padding: 16px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    transition: transform 0.2s;
}

.share-item:hover {
    transform: translateY(-2px);
}

.share-item.weibo {
    background: #e6162d;
}

.share-item.qq {
    background: #12b7f5;
}

.share-item.wechat {
    background: #07c160;
}

.share-item.link {
    background: var(--text);
}

.share-close,
.donate-close {
    padding: 12px 32px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.share-close:hover,
.donate-close:hover {
    background: var(--text);
    color: #fff;
}

.donate-modal-content {
    width: 500px;
    max-width: 90vw;
    position: relative;
}

.donate-close {
    position: absolute;
    top: 16px;
    right: 20px;
}

.donate-modal-title {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.donate-modal-msg {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.donate-qr-list {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.donate-qr-item img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.donate-qr-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.donate-tip {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 24px;
}

.float-actions {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.float-actions.show {
    opacity: 1;
    visibility: visible;
}

.float-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.float-btn:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.float-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

.float-icon {
    font-size: 16px;
}

.float-count {
    font-size: 9px;
    color: var(--text-light);
}

.float-btn.active .float-count {
    color: #fff;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--text), var(--accent));
    z-index: 1001;
    width: 0%;
}

.article-toc {
    margin-bottom: 48px;
    padding: 24px;
    background: var(--border-light);
    border-radius: 16px;
}

.toc-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-bottom: 16px;
}

.article-toc.collapsed ul {
    display: none;
}

.article-toc ul {
    list-style: none;
}

.article-toc li {
    margin-bottom: 8px;
}

.article-toc a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.article-toc a:hover {
    color: var(--text);
}

.toc-level-3 {
    padding-left: 20px;
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

@media (max-width:600px) {
    .article-card {
        flex-direction: column;
        gap: 20px;
    }

    .article-cover {
        width: 100%;
        height: 180px;
    }
}

@media (max-width:900px) {
    .home-layout {
        display: flex;
        flex-direction: column;
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width:768px) {
    main.container {
        padding-top: 120px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        padding: 14px 0;
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .search-form {
        margin: 16px 0 0;
        width: 100%;
    }

    .search-form input {
        width: 100%;
    }

    .article-header h1 {
        font-size: 32px;
    }

    .article-content {
        font-size: 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .article-nav {
        flex-direction: column;
        gap: 12px;
    }

    .article-nav a {
        max-width: 100%;
    }

    .comment-form .form-row {
        flex-direction: column;
    }

    .float-actions {
        display: none;
    }

    .article-actions {
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

:root {
    --primary: #000000;
    --primary-hover: #333333;
    --accent: #2563eb;
    --bg: #ffffff;
    --text: #0a0a0a;
    --text-secondary: #525252;
    --text-light: #a3a3a3;
    --border: #e5e5e5;
    --border-light: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f8f8;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.site-content {
    background: #fff;
    min-height: calc(100vh - 400px);
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
    flex: 1;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--text);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.subscriber-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
}

.subscriber-logout {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    margin-left: 8px;
}

.subscriber-logout:hover {
    color: var(--accent);
}

.nav-links a.nav-login {
    padding: 6px 16px;
    background: var(--text);
    color: #fff !important;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.nav-links a.nav-login:hover {
    background: var(--accent);
    color: #fff !important;
}

.nav-links a.nav-login::after {
    display: none;
}

.user-menu {
    position: relative;
}

.user-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--border-light);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.user-name:hover {
    background: var(--border);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 100;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
}

.user-dropdown a:hover {
    background: var(--border-light);
    color: var(--text);
}

.search-form {
    margin-left: 24px;
}

.search-form input {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    outline: none;
    width: 180px;
    background: transparent;
    transition: all 0.3s ease;
}

.search-form input:focus {
    border-color: var(--text);
    width: 240px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
}

main.container {
    padding-top: 140px;
    padding-bottom: 40px;
    background: #fff;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 80px;
    align-items: start;
}

.article-list {
    display: flex;
    flex-direction: column;
}

.article-card {
    display: flex;
    gap: 32px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.article-card:first-child {
    padding-top: 0;
}

.article-card:last-child {
    border-bottom: none;
}

.article-card:hover {
    transform: translateX(8px);
}

.article-cover {
    flex-shrink: 0;
    width: 220px;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--border-light);
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-cover img {
    transform: scale(1.08);
}

.article-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.article-body h2 a {
    color: var(--text);
}

.article-body h2 a:hover {
    color: var(--accent);
}

.article-summary {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}

.cat-tag {
    color: var(--accent);
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 1px 5px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    align-self: flex-start;
    border-radius: 3px;
}

.badge-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.badge.top {
    background: var(--text);
    color: #fff;
}

.badge.paid {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
}

.widget {
    margin-bottom: 48px;
}

.widget-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.widget-list {
    list-style: none;
}

.widget-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.widget-list a:hover {
    color: var(--text);
    padding-left: 8px;
}

.widget-list .count {
    font-size: 12px;
    color: var(--text-light);
}

.author-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--border-light);
    border-radius: 16px;
    margin-bottom: 48px;
}

.author-avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.author-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.author-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.stat-label {
    font-size: 9px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.widget-comments li {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
}

.widget-comments li:last-child {
    border-bottom: none;
}

.widget-comments strong {
    font-weight: 600;
}

.widget-comments a {
    color: var(--text);
    font-weight: 500;
}

.widget-comments a:hover {
    color: var(--accent);
}

.widget-comments p {
    color: var(--text-light);
    margin-top: 6px;
    font-size: 13px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.pagination a {
    padding: 12px 28px;
    background: var(--text);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.pagination span.page-info {
    padding: 12px;
    color: var(--text-light);
}

.article-detail {
    max-width: 720px;
    margin: 0 auto 80px;
}

.article-header {
    margin-bottom: 48px;
}

.article-header h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.article-meta {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    gap: 16px;
}

.article-cover-full {
    margin-bottom: 48px;
    border-radius: 16px;
    overflow: hidden;
}

.article-cover-full img {
    width: 100%;
    display: block;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin: 48px 0 20px;
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 16px;
}

.article-content p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--border-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', monospace;
    font-size: 14px;
}

.article-content pre {
    background: var(--text);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 32px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 32px 0;
    color: var(--text-secondary);
}

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.article-nav a {
    display: block;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 48%;
    transition: all 0.3s ease;
}

.article-nav a:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.article-nav .next {
    text-align: right;
    margin-left: auto;
}

.article-tags {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tag-label {
    font-size: 13px;
    color: var(--text-light);
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--border-light);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--text);
    color: #fff;
}

.comments-section {
    padding-top: 48px;
    border-top: 1px solid var(--border-light);
}

.comments-section h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.comment-item {
    display: flex;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-header strong {
    font-weight: 600;
}

.comment-header time {
    font-size: 13px;
    color: var(--text-light);
}

.comment-content {
    font-size: 15px;
    color: var(--text-secondary);
}

.empty {
    text-align: center;
    padding: 48px;
    color: var(--text-light);
}

.comment-form {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.comment-form h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

.comment-form .form-row {
    display: flex;
    gap: 16px;
}

.comment-form .form-group {
    flex: 1;
    margin-bottom: 16px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: transparent;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--text);
}

.btn-submit {
    padding: 16px 40px;
    background: var(--text);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.site-footer {
    background: var(--text);
    color: #fff;
    padding: 80px 0 40px;
    margin-top: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 48px;
}

.footer-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.footer-about {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.social-link:hover {
    background: #fff;
    border-color: #fff;
}

.social-link:hover .social-icon-img {
    filter: none;
}

.social-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.social-icon-text {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
}

.social-link:hover .social-icon-text {
    color: var(--text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: 14px;
}

.contact-label {
    display: block;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-links-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links-section h4 {
    margin-bottom: 16px;
}

.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    transition: all 0.3s ease;
}

.friend-link-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.friend-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
}

.friend-icon {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.icp a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.icp a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: var(--text);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.ad-container {
    margin: 24px 0;
    text-align: center;
}

.ad-label {
    font-size: 9px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.breadcrumb {
    margin-bottom: 32px;
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 10px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--text);
}

.category-header,
.search-header {
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.category-header h1,
.search-header h1 {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.article-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 48px 0;
    padding: 32px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

.action-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

.donate-trigger {
    border-color: var(--accent);
    color: var(--accent);
}

.donate-trigger:hover {
    background: var(--accent);
    color: #fff;
}

.share-modal,
.donate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.share-content,
.donate-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.share-content {
    width: 400px;
    max-width: 90vw;
}

.share-content h4 {
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 600;
}

.share-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.share-item {
    padding: 16px;
    border-radius: 12px;
    color: #fff;
    font-weight: 500;
    transition: transform 0.2s;
}

.share-item:hover {
    transform: translateY(-2px);
}

.share-item.weibo {
    background: #e6162d;
}

.share-item.qq {
    background: #12b7f5;
}

.share-item.wechat {
    background: #07c160;
}

.share-item.link {
    background: var(--text);
}

.share-close,
.donate-close {
    padding: 12px 32px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.share-close:hover,
.donate-close:hover {
    background: var(--text);
    color: #fff;
}

.donate-modal-content {
    width: 500px;
    max-width: 90vw;
    position: relative;
}

.donate-close {
    position: absolute;
    top: 16px;
    right: 20px;
}

.donate-modal-title {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.donate-modal-msg {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.donate-qr-list {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.donate-qr-item img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.donate-qr-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.donate-tip {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 24px;
}

.float-actions {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.float-actions.show {
    opacity: 1;
    visibility: visible;
}

.float-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.float-btn:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.float-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}

.float-icon {
    font-size: 16px;
}

.float-count {
    font-size: 9px;
    color: var(--text-light);
}

.float-btn.active .float-count {
    color: #fff;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--text), var(--accent));
    z-index: 1001;
    width: 0%;
}

.article-toc {
    margin-bottom: 48px;
    padding: 24px;
    background: var(--border-light);
    border-radius: 16px;
}

.toc-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-bottom: 16px;
}

.article-toc.collapsed ul {
    display: none;
}

.article-toc ul {
    list-style: none;
}

.article-toc li {
    margin-bottom: 8px;
}

.article-toc a {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.article-toc a:hover {
    color: var(--text);
}

.toc-level-3 {
    padding-left: 20px;
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* ==============================
   响应式媒体查询（从大到小）
   ============================== */

@media (max-width: 900px) {
    .home-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    /* 侧边栏在移动端排到文章列表下方 */
    .home-layout .sidebar {
        grid-column: 1;
        grid-row: 2;
    }

    .home-layout .main-content {
        grid-column: 1;
        grid-row: 1;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 768px) {
    main.container {
        padding-top: 96px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .container {
        padding: 0 16px;
    }

    .home-layout {
        gap: 32px;
    }

    /* 导航菜单移动端展开 */
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .nav-links a {
        padding: 14px 0;
        width: 100%;
        border-bottom: 1px solid var(--border-light);
        font-size: 15px;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    /* 搜索框移动端样式 */
    .search-form {
        margin: 12px 0 0;
        width: 100%;
        order: 99;
    }

    .search-form input {
        width: 100%;
        border-radius: 10px;
    }

    /* 文章卡片移动端优化 */
    .article-card {
        flex-direction: column;
        gap: 16px;
        padding: 24px 0;
    }

    .article-card:hover {
        transform: none;
    }

    .article-cover {
        width: 100%;
        height: 200px;
        border-radius: 10px;
    }

    .article-body h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .article-summary {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .article-meta {
        gap: 10px;
        font-size: 12px;
    }

    /* 文章详情页 */
    .article-header h1 {
        font-size: 26px;
        line-height: 1.3;
    }

    .article-content {
        font-size: 16px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .article-nav {
        flex-direction: column;
        gap: 12px;
    }

    .article-nav a {
        max-width: 100%;
    }

    /* 侧边栏移动端 */
    .author-card {
        padding: 24px 16px;
        margin-bottom: 32px;
    }

    .author-stats {
        gap: 20px;
    }

    .stat-num {
        font-size: 20px;
    }

    /* 分页 */
    .pagination {
        margin-top: 40px;
        padding-top: 24px;
    }

    /* 类别/搜索标题 */
    .category-header h1,
    .search-header h1 {
        font-size: 26px;
    }

    /* 评论 */
    .comment-form .form-row {
        flex-direction: column;
    }

    /* 浮动按钮 */
    .float-actions {
        display: none;
    }

    /* 文章操作按钮 */
    .article-actions {
        flex-wrap: wrap;
        gap: 8px;
        margin: 32px 0;
        padding: 20px 0;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: calc(50% - 8px);
        padding: 10px 16px;
    }

    /* 页脚 */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .site-footer {
        padding: 48px 0 32px;
    }

    /* 回到顶部按钮 */
    .back-to-top {
        bottom: 20px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    main.container {
        padding-top: 88px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .container {
        padding: 0 12px;
    }

    .navbar {
        height: 60px;
    }

    .nav-inner {
        height: 60px;
        padding: 0 16px;
    }

    .nav-links {
        top: 60px;
    }

    .logo {
        font-size: 16px;
    }

    .article-cover {
        height: 180px;
    }

    .article-body h2 {
        font-size: 17px;
    }

    .author-card {
        padding: 20px 12px;
    }

    .author-stats {
        gap: 16px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .pagination a {
        padding: 10px 20px;
        font-size: 13px;
    }

    /* 分类/标签页标题 */
    .category-header h1,
    .search-header h1 {
        font-size: 22px;
    }

    .badge {
        font-size: 8px;
        padding: 2px 5px;
    }
}

/* ==========================================================================
   社交账号徽标（后台 → 社交账号，可增删排序）
   图标为纯 CSS 字母徽标，零外部请求；想用官方 logo 就在后台填「图标 URL」。
   ========================================================================== */
.nc-social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.nc-social-sidebar {
    justify-content: center;
    margin: 12px 0 14px;
}

.nc-social-footer {
    margin-top: 12px;
}

.nc-social-title {
    width: 100%;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 4px;
}

.nc-social-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--text-secondary);
    transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nc-social-item:hover {
    border-color: var(--text);
    background: var(--border-light);
    color: var(--text);
    transform: translateY(-1px);
}

.nc-social-item.is-static {
    cursor: default;
}

.nc-social-item.is-static:hover {
    border-color: var(--border);
    background: #fff;
    color: var(--text-secondary);
    transform: none;
}

.nc-social-badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.nc-social-item img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

/* 带名称时变成药丸形 */
.nc-social-withname .nc-social-item {
    width: auto;
    padding: 0 12px;
    border-radius: 100px;
}

.nc-social-name {
    font-size: 11px;
    letter-spacing: 0.02em;
}

@media (max-width: 600px) {
    .nc-social-item {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   社交图标 v2：内置品牌 SVG（不需要手动找图 / 不需要外网）
   - 图标是内联 SVG，颜色走 currentColor，品牌色由 --nc-brand 提供
   - hover：整颗变成品牌色实心圆，图标转白
   ========================================================================== */
.nc-social-item {
    color: var(--nc-brand, var(--text-secondary));
}

.nc-social-item:hover {
    border-color: var(--nc-brand, var(--text));
    background: var(--nc-brand, var(--border-light));
    color: #fff;
}

.nc-social-item.is-static:hover {
    border-color: var(--border);
    background: #fff;
    color: var(--nc-brand, var(--text-secondary));
    transform: none;
}

.nc-social-glyph {
    display: block;
    width: 17px;
    height: 17px;
}

.nc-social-glyph svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.nc-social-letter {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
}

.nc-social-item img {
    width: 17px;
    height: 17px;
}

.nc-social-name {
    color: var(--text-secondary);
}

.nc-social-withname .nc-social-item {
    padding: 0 12px 0 9px;
}

.nc-social-withname .nc-social-item:hover .nc-social-name {
    color: #fff;
}

@media (max-width: 600px) {
    .nc-social-glyph,
    .nc-social-item img {
        width: 16px;
        height: 16px;
    }
}

/* ---- 自定义图标 + 内置图标兜底：图片加载失败时自动露出下层内置 SVG ---- */
.nc-social-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
}

.nc-social-icon-wrap .nc-social-glyph {
    width: 17px;
    height: 17px;
}

.nc-social-item img.nc-social-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
}

@media (max-width: 600px) {
    .nc-social-icon-wrap,
    .nc-social-icon-wrap .nc-social-glyph {
        width: 16px;
        height: 16px;
    }
}

/* ===== 移动端适配：隐藏侧边栏广告 + 底部图标文字导航栏 (v1.6.0) ===== */
.mobile-tabbar {
    display: none;
}

/* 窄屏（与主栅格塌陷断点一致）隐藏侧边栏广告，只保留顶部 / 底部广告 */
@media (max-width: 900px) {
    .ad-sidebar {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        align-items: stretch;
        background: rgba(255, 255, 255, 0.97);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.06);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-tabbar .tab-item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 5px 2px;
        border-radius: 10px;
        color: var(--text-light);
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.18s ease, background 0.18s ease;
    }

    .mobile-tabbar .tab-item:active {
        background: var(--border-light);
    }

    .mobile-tabbar .tab-icon {
        width: 22px;
        height: 22px;
        display: block;
    }

    .mobile-tabbar .tab-label {
        font-size: 11px;
        line-height: 1;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-tabbar .tab-item.active {
        color: var(--text);
        font-weight: 600;
    }

    /* 让页脚与回到顶部按钮避开固定导航栏 */
    .site-footer {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .back-to-top {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 480px) {
    .mobile-tabbar .tab-icon {
        width: 21px;
        height: 21px;
    }

    .mobile-tabbar .tab-label {
        font-size: 10.5px;
    }
}

/* ===== 移动端顶部搜索图标 + 悬浮搜索窗 (v1.6.1) ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-search-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.nav-search-toggle svg {
    width: 21px;
    height: 21px;
    display: block;
}

.nav-search-toggle:active {
    background: var(--border-light);
}

.mobile-search-panel {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 1100;
    padding: 12px;
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-search-panel.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 6px 4px 14px;
}

.mobile-search-form-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--text-light);
}

.mobile-search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    padding: 10px 0;
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
}

.mobile-search-form input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.mobile-search-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: none;
    background: #fff;
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* ===== 移动端分类快捷条 (v1.6.1) ===== */
.mobile-cats {
    display: none;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 12px;
    margin: 0 0 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.mobile-cats::-webkit-scrollbar {
    display: none;
}

.mobile-cats .cat-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1;
    color: var(--text-secondary);
    background: var(--border-light);
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.mobile-cats .cat-chip.active {
    color: #fff;
    background: var(--text);
}

@media (max-width: 768px) {
    .nav-actions {
        margin-left: auto;
        gap: 4px;
    }

    .nav-search-toggle {
        display: flex;
    }

    /* 顶部已有搜索图标，收起菜单里的搜索框（避免重复） */
    .nav-links .search-form {
        display: none;
    }

    .mobile-cats {
        display: flex;
    }
}

/* ===== 分类选择弹窗（底部弹出，v1.6.1） ===== */
body.sheet-open {
    overflow: hidden;
}

.sheet-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none; /* 关闭时绝不吃点击 */
    transition: opacity 0.22s ease;
}

/* hidden 属性必须真正隐藏：作者样式的 display:flex 会盖掉浏览器默认的 [hidden]{display:none} */
.sheet-mask[hidden] {
    display: none !important;
}

.sheet-mask.open {
    opacity: 1;
    pointer-events: auto;
}

/* 同理兜底：搜索面板隐藏时也不许拦截点击 */
.mobile-search-panel[hidden] {
    display: none !important;
    pointer-events: none;
}

.sheet {
    width: 100%;
    max-width: 560px;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    transform: translateY(100%);
    transition: transform 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.sheet-mask.open .sheet {
    transform: translateY(0);
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.sheet-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.sheet-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--border-light);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 14px;
}

.sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.sheet-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    background: #fafafa;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
    -webkit-tap-highlight-color: transparent;
}

.sheet-item-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-item-count {
    font-size: 12px;
    color: var(--text-light);
}

.sheet-item.active {
    border-color: var(--text);
    background: var(--text);
    color: #fff;
}

.sheet-item.active .sheet-item-count {
    color: rgba(255, 255, 255, 0.75);
}

.tab-item.js-tab-sheet {
    border: none;
    background: transparent;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

@media (min-width: 769px) {
    .sheet-mask {
        display: none !important;
    }

    .mobile-search-panel {
        display: none !important;
    }
}