/* Hexo 风格个人博客系统样式文件 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    font-size: 14px;
}

/* 代码字体 */
code,
pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 - Hexo 风格 */
.header {
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #3498db;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    color: #7f8c8d;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #2c3e50;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* 主要内容区域 - Hexo 布局 */
.main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 文章列表 - Hexo 卡片风格 */
.post-list {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.post-item {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.post-item:hover {
    background-color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-item:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: #95a5a6;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-meta .meta-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.post-excerpt {
    color: #7f8c8d;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 15px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
}

.tag:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    transform: translateY(-1px);
}

.post-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 5px;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #ecf0f1;
    color: #7f8c8d;
    border: 1px solid #e1e8ed;
}

.btn-secondary:hover {
    background: #d5dbdb;
    color: #2c3e50;
}

/* 侧边栏 - Hexo 风格 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    border: 1px solid #e1e8ed;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #3498db;
}

/* 搜索框 */
.search-form {
    display: flex;
    gap: 10px;
}

.search-form .form-control {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-form .form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-form .btn {
    padding: 10px 20px;
    white-space: nowrap;
}

/* 分类和标签列表 */
.category-list,
.tag-list {
    list-style: none;
}

.category-list li,
.tag-list li {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child,
.tag-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.category-list a,
.tag-list a {
    color: #7f8c8d;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.category-list a:hover,
.tag-list a:hover {
    color: #3498db;
}

.category-count,
.tag-count {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud .tag {
    font-size: 12px;
    padding: 6px 12px;
    margin: 2px;
}

/* 热门文章 */
.popular-posts {
    list-style: none;
}

.popular-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.popular-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popular-posts a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 5px;
}

.popular-posts a:hover {
    color: #3498db;
}

.view-count {
    color: #95a5a6;
    font-size: 12px;
}

/* 分页 - Hexo 风格 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    padding: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    color: #7f8c8d;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    transform: translateY(-1px);
}

.pagination .current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination .disabled {
    color: #bdc3c7;
    background: #f8f9fa;
    border-color: #e9ecef;
    cursor: not-allowed;
}

/* 文章详情页 */
.post-detail {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.post-detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.3;
}

.post-detail-meta {
    color: #95a5a6;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.post-content {
    line-height: 1.8;
    color: #2c3e50;
    font-size: 16px;
}

.post-content a {
    color: #3498db;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: #2980b9;
    text-decoration: none;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 30px 0 15px 0;
    color: #2c3e50;
    font-weight: 600;
}

.post-content h1 {
    font-size: 28px;
}

.post-content h2 {
    font-size: 24px;
}

.post-content h3 {
    font-size: 20px;
}

.post-content h4 {
    font-size: 18px;
}

.post-content h5 {
    font-size: 16px;
}

.post-content h6 {
    font-size: 14px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content blockquote {
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    color: #7f8c8d;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.post-content code {
    background: #f1f2f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    color: #b42318;
}

.post-content pre {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    overflow-x: auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.code-block {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(180deg, #2a3240 0%, #232a36 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.code-block-dots {
    display: flex;
    gap: 8px;
}

.code-block-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.code-block-dot.red {
    background: #ff5f56;
}

.code-block-dot.yellow {
    background: #ffbd2e;
}

.code-block-dot.green {
    background: #27c93f;
}

.code-copy-btn {
    border: 1px solid #3b475a;
    background: #2b3442;
    color: #f1f5f9;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.code-copy-btn:hover {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

.code-copy-btn.copied {
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
}

.code-block-body {
    padding: 16px 18px 20px;
    overflow-x: auto;
    background: #0f172a;
}

.code-block pre code,
.code-block .hljs {
    color: #e6edf3;
    background: transparent;
}

.code-block .hljs-comment,
.code-block .hljs-quote {
    color: #94a3b8;
}

.code-block .hljs-keyword,
.code-block .hljs-selector-tag,
.code-block .hljs-literal,
.code-block .hljs-name,
.code-block .hljs-strong {
    color: #7dd3fc;
}

.code-block .hljs-string,
.code-block .hljs-title,
.code-block .hljs-section,
.code-block .hljs-attribute {
    color: #fca5a5;
}

.code-block .hljs-number,
.code-block .hljs-symbol,
.code-block .hljs-bullet,
.code-block .hljs-link {
    color: #f9a8d4;
}

.code-block .hljs-params,
.code-block .hljs-variable,
.code-block .hljs-template-variable {
    color: #fde68a;
}

.post-content>ul {
    list-style-type: disc;
}

.post-content ul ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content ul,
.post-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 8px;
}

/* 多级列表（可选但推荐） */
.post-content ul ul {
    list-style-type: circle;
}

.post-content ul ul ul {
    list-style-type: square;
}


.post-content li {
    margin-bottom: 8px;
}

.post-content img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.post-content th,
.post-content td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f2f5;
    border-right: 1px solid #f0f2f5;
    font-size: 14px;
}

.post-content th:last-child,
.post-content td:last-child {
    border-right: none;
}

.post-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}

.post-content tr:last-child td {
    border-bottom: none;
}

.post-content tr:nth-child(even) {
    background-color: #fafbfc;
}

.post-content tr:hover {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease;
}

/* 评论区域 */
.comments {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 30px;
    border: 1px solid #e1e8ed;
}

.comments h3 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.comment {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-meta {
    color: #95a5a6;
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-content {
    color: #2c3e50;
    line-height: 1.6;
    font-size: 14px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* 评论区域特殊样式 */
.comments textarea:focus,
.comments input:focus {
    outline: none !important;
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
}

/* 移除所有元素的默认outline */
*:focus {
    outline: none;
}

/* 为可访问性保留键盘导航的视觉指示 */
*:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
}

.footer-content a:hover {
    color: #5dade2;
}

/* 回到顶部按钮 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* 移动端菜单样式 */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    color: #2c3e50;
    background: #f8f9fa;
}

.mobile-menu {
    display: none;
    background: #fff;
    border-top: 1px solid #e1e8ed;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    display: block;
    max-height: 300px;
}

.mobile-menu .nav-menu {
    flex-direction: column;
    padding: 20px;
    gap: 15px;
}

.mobile-menu .nav-menu a {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu .nav-menu a:last-child {
    border-bottom: none;
}

/* 代码高亮样式 */
.code-wrapper {
    display: flex;
    background: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
}

.line-numbers {
    background: #34495e;
    color: #95a5a6;
    padding: 20px 15px;
    font-size: 12px;
    line-height: 1.5;
    user-select: none;
    border-right: 1px solid #4a5f7a;
}

.code-content {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
}

/* 图片懒加载样式 */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-in {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .navbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .post-detail-title {
        font-size: 24px;
    }

    .post-detail {
        padding: 20px;
    }

    .post-item {
        padding: 20px;
    }

    .widget {
        padding: 20px;
    }

    .container {
        padding: 0 15px;
    }

    .search-form {
        flex-direction: column;
    }

    .post-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .post-detail-title {
        font-size: 20px;
    }

    .post-title {
        font-size: 20px;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-item {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #95a5a6;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== 左侧悬浮 TOC ===== */
.floating-toc {
    position: fixed;
    top: 100px;
    /* 避开 header */
    left: 36px;
    width: 280px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px 16px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    z-index: 999;
    font-size: 14px;
}

.floating-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.floating-toc-title {
    font-weight: 600;
    color: #2c3e50;
}

.floating-toc-toggle {
    border: 1px solid #e1e8ed;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floating-toc-toggle:hover {
    background: #eef2f7;
    color: #1e293b;
}

.floating-toc ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.floating-toc li {
    position: relative;
    padding-left: 20px;
    margin: 10px 0;
}

.floating-toc li::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #c7d2fe;
    box-shadow: 0 0 0 2px #eef2ff;
}

.floating-toc li::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 18px;
    width: 1px;
    height: calc(100% - 10px);
    background: linear-gradient(180deg, #dbe4ff 0%, #e2e8f0 100%);
}

.floating-toc li:last-child::after {
    display: none;
}

.floating-toc ul ul {
    margin-top: 6px;
    padding-left: 14px;
    border-left: 1px solid #e2e8f0;
}

.floating-toc a {
    color: #3498db;
    text-decoration: none;
    line-height: 1.4;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.floating-toc a:hover {
    background: #eef2ff;
    color: #1d4ed8;
    text-decoration: none;
}

.floating-toc a.active {
    color: #1d4ed8;
    font-weight: 600;
    background: #e0e7ff;
}

.floating-toc li:has(a.active)::before {
    background: #4f46e5;
    box-shadow: 0 0 0 3px #e0e7ff;
}

.floating-toc li:has(a.active)::after {
    background: linear-gradient(180deg, #a5b4fc 0%, #c7d2fe 100%);
}



.floating-toc.is-collapsed ul {
    display: none;
}

.floating-toc.is-collapsed {
    max-height: none;
    overflow: hidden;
}

/* 小屏隐藏 */
@media (max-width: 1024px) {
    .floating-toc {
        display: none;
    }
}

/* ===== 标题锚点（¶）默认隐藏，hover 时显示 ===== */
.headerlink,
a[title="Permanent link"] {
    opacity: 0;
    margin-left: 6px;
    font-size: 0.9em;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

h1:hover .headerlink,
h2:hover .headerlink,
h3:hover .headerlink,
h4:hover .headerlink,
h5:hover .headerlink,
h6:hover .headerlink,
h1:hover a[title="Permanent link"],
h2:hover a[title="Permanent link"],
h3:hover a[title="Permanent link"],
h4:hover a[title="Permanent link"],
h5:hover a[title="Permanent link"],
h6:hover a[title="Permanent link"] {
    opacity: 1;
}

/* ===== Tailwind 预编译遗漏的工具类补充 ===== */
/* 以下类名在 Tailwind CSS 预编译（tree-shaking）时被移除，需手动补充 */

/* 渐变文字效果 */
.bg-clip-text {
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.text-transparent {
    color: transparent !important;
}

/* 等宽字体 */
.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

/* 防止 flex 子元素被缩小 */
.flex-shrink-0 {
    flex-shrink: 0 !important;
}

/* ===== 科技感主题样式 ===== */

/* 科技感背景 */
.tech-body {
    --tech-depth-0: #0d1117;
    --tech-depth-1: rgba(22, 27, 34, 0.96);
    --tech-depth-2: rgba(19, 26, 37, 0.92);
    --tech-depth-3: rgba(30, 41, 59, 0.68);
    --tech-depth-4: rgba(51, 65, 85, 0.56);
    --tech-sheen: rgba(255, 255, 255, 0.05);
    --tech-accent-soft: rgba(59, 130, 246, 0.12);
    --tech-accent-soft-strong: rgba(59, 130, 246, 0.22);
    background:
        radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.16) 0%, transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.08) 0%, transparent 24%),
        linear-gradient(180deg, #0d1117 0%, #0d1420 44%, #09111b 100%);
    background-attachment: fixed;
    position: relative;
}

.tech-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 顶部扫描线动画 */
.tech-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: scan 3s linear infinite;
    z-index: 9999;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 科技感头部 */
.tech-header {
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.tech-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.3s ease;
    text-decoration: none;
    min-width: 0;
}

.tech-logo:hover {
    transform: scale(1.05);
}

.tech-brand-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.875rem;
    flex-shrink: 0;
}

.tech-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
}

.tech-brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60a5fa 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-brand-subtitle {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .tech-brand-title {
        font-size: 1rem;
        max-width: 9rem;
    }

    .tech-brand-subtitle {
        max-width: 9rem;
    }
}

/* 科技感搜索框 */
.tech-search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.tech-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tech-search-input::placeholder {
    color: #64748b;
}

.tech-search-btn {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.tech-search-btn:hover {
    color: #3b82f6;
}

/* 科技感导航链接 */
.tech-nav-link {
    padding: 0.5rem 1rem;
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

.tech-nav-link:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

.tech-nav-link:hover::before {
    left: 100%;
}

/* 下拉菜单 */
.tech-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 12rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 50;
}

.group:hover .tech-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tech-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.tech-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.tech-dropdown-danger {
    color: #f87171;
}

.tech-dropdown-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* 登录按钮 */
.tech-btn-login {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tech-btn-login:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

/* 移动端链接 */
.tech-mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tech-mobile-link:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* 主内容区 */
.tech-main {
    background: transparent;
    position: relative;
    z-index: 1;
}

.tech-surface-card {
    position: relative;
    background: linear-gradient(180deg, var(--tech-depth-1) 0%, var(--tech-depth-2) 100%);
    border: none;
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 18px 40px rgba(1, 4, 9, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(14px);
}

.tech-surface-card:hover {
    background: linear-gradient(180deg, rgba(27, 36, 49, 0.98) 0%, rgba(22, 29, 40, 0.94) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 24px 52px rgba(1, 4, 9, 0.38),
        0 0 0 1px rgba(96, 165, 250, 0.04);
}

.tech-post-card {
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.tech-post-card:hover {
    transform: translateY(-4px);
}

.tech-post-card > .p-6 {
    padding: 1.85rem;
}

.tech-post-cover {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-bottom: none;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.tech-card-title {
    color: #f8fafc;
}

.tech-card-title-link {
    color: #f8fafc;
    transition: color 0.2s ease;
}

.tech-card-title-link:hover {
    color: #93c5fd;
}

.tech-card-meta {
    color: #94a3b8;
}

.tech-card-meta i {
    color: rgba(96, 165, 250, 0.9);
}

.tech-card-excerpt {
    color: #94a3b8;
}

.tech-tag-pill {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

.tech-tag-pill:hover {
    background: rgba(59, 130, 246, 0.14);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2);
    color: #eff6ff;
}

.tech-card-button {
    background: rgba(59, 130, 246, 0.1);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
    color: #93c5fd;
    backdrop-filter: blur(8px);
}

.tech-card-button:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.28);
    color: #ffffff;
}

.tech-empty-card {
    text-align: center;
}

.tech-empty-icon {
    color: rgba(148, 163, 184, 0.38);
}

.tech-empty-text {
    color: #94a3b8;
}

.tech-pagination-card {
    padding: 1.75rem;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.tech-pagination-info {
    color: #94a3b8;
}

.tech-pagination-card nav a,
.tech-pagination-card nav span {
    border: none;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
}

.tech-pagination-card nav a:hover {
    background: rgba(59, 130, 246, 0.16);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
    color: #eff6ff;
}

.tech-pagination-card nav span.bg-blue-600 {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(59, 130, 246, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(37, 99, 235, 0.28);
    color: #ffffff;
}

.tech-pagination-card nav span.text-gray-300,
.tech-pagination-card nav span.text-gray-400 {
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.05);
    color: rgba(148, 163, 184, 0.5);
}

.tech-sidebar-card {
    padding: 1.75rem;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.tech-sidebar-card:hover {
    transform: translateY(-2px);
}

.tech-sidebar-title {
    color: #f8fafc;
}

.tech-sidebar-title i {
    color: #93c5fd;
}

.tech-sidebar-card .sidebar-status {
    color: #64748b;
}

/* 页面标题 */
.tech-page-header {
    background: linear-gradient(135deg, rgba(22, 27, 34, 0.94), rgba(19, 26, 37, 0.9));
    border: none;
    border-radius: 12px;
    padding: 2rem;
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 18px 36px rgba(1, 4, 9, 0.28);
}

.tech-page-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.tech-page-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.tech-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.tech-page-subtitle {
    color: #94a3b8;
    margin: 0.5rem 0 0;
}

/* 归档样式 */
.archive-year-block {
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.92), rgba(19, 26, 37, 0.88));
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 16px 32px rgba(1, 4, 9, 0.28);
}

.archive-year-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: none;
    position: relative;
}

.archive-year-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.22), rgba(59, 130, 246, 0.24), rgba(148, 163, 184, 0));
}

.archive-year-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.archive-year-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.archive-year-count {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.archive-months {
    display: grid;
    gap: 1.25rem;
}

.archive-month-block {
    padding-left: 1rem;
}

.archive-month-label {
    display: flex;
    align-items: center;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.archive-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.archive-post-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.archive-post-date {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 3rem;
}

.archive-post-dot {
    width: 6px;
    height: 6px;
    background: #475569;
    border-radius: 50%;
    flex-shrink: 0;
}

.archive-post-link {
    color: #cbd5e1;
    transition: color 0.2s ease;
    flex: 1;
}

.archive-post-link:hover {
    color: #60a5fa;
}

/* 作品集样式 */
.portfolio-page-grid {
    align-items: start;
}

.portfolio-card {
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.94), rgba(19, 26, 37, 0.9));
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 16px 32px rgba(1, 4, 9, 0.28);
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 22px 42px rgba(15, 23, 42, 0.34);
}

.portfolio-card-img {
    width: 100%;
    height: 12rem;
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.65);
}

.portfolio-card-media {
    height: auto;
    min-height: 17rem;
}

.portfolio-card-img img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.5s ease;
}

@media (max-width: 768px) {
    .portfolio-card-media {
        min-height: 14rem;
    }
}

.portfolio-card:hover .portfolio-card-img img {
    transform: scale(1.1);
}

.portfolio-card-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 14, 39, 0.8) 100%);
}

.portfolio-card-carousel {
    isolation: isolate;
}

.portfolio-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.portfolio-carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.portfolio-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.portfolio-carousel-control:hover {
    background: rgba(37, 99, 235, 0.9);
    transform: translateY(-50%) scale(1.04);
}

.portfolio-carousel-prev {
    left: 0.75rem;
}

.portfolio-carousel-next {
    right: 0.75rem;
}

.portfolio-carousel-counter {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.portfolio-carousel-indicators {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.portfolio-carousel-indicator {
    width: 0.55rem;
    height: 0.55rem;
    border: none;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.45);
    cursor: pointer;
    transition: all 0.2s ease;
}

.portfolio-carousel-indicator.is-active {
    width: 1.4rem;
    background: #60a5fa;
}

.portfolio-card-img-placeholder {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.portfolio-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

.portfolio-status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.portfolio-status-active {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.portfolio-status-beta {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.portfolio-card-desc {
    color: #94a3b8;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0.75rem 0;
}

.portfolio-tech-tag {
    padding: 0.25rem 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.portfolio-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.portfolio-btn-github {
    background: rgba(100, 116, 139, 0.2);
    color: #cbd5e1;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.portfolio-btn-github:hover {
    background: rgba(100, 116, 139, 0.3);
    border-color: rgba(100, 116, 139, 0.5);
}

.portfolio-btn-demo {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
}

.portfolio-btn-demo:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 资源库样式 */
.resources-page {
    display: grid;
    gap: 1.75rem;
}

.resource-overview {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.92), rgba(19, 26, 37, 0.88));
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 16px 32px rgba(1, 4, 9, 0.24);
}

.resource-overview-copy h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}

.resource-overview-copy p {
    margin: 0;
    max-width: 42rem;
    color: #94a3b8;
    line-height: 1.7;
}

.resource-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem;
    min-width: 20rem;
}

.resource-overview-stat {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
    text-align: center;
}

.resource-overview-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #60a5fa;
}

.resource-overview-label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #cbd5e1;
}

.resource-section {
    display: grid;
    gap: 1rem;
}

.resource-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.resource-section-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
}

.resource-section-header p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
}

.resource-group-count {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.resource-featured-grid,
.resource-grid {
    display: grid;
    gap: 1rem;
}

.resource-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.94), rgba(19, 26, 37, 0.9));
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 16px 32px rgba(1, 4, 9, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 22px 40px rgba(1, 4, 9, 0.3);
}

.resource-card-featured {
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(22, 27, 34, 0.96), rgba(19, 26, 37, 0.92));
    box-shadow:
        inset 0 0 0 1px rgba(250, 204, 21, 0.16),
        0 18px 34px rgba(1, 4, 9, 0.28);
}

.resource-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.resource-card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.resource-type-badge,
.resource-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.resource-type-blog {
    background: rgba(14, 165, 233, 0.14);
    color: #7dd3fc;
}

.resource-type-github {
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}

.resource-type-tool {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

.resource-type-docs {
    background: rgba(168, 85, 247, 0.14);
    color: #d8b4fe;
}

.resource-featured-badge {
    background: rgba(250, 204, 21, 0.14);
    color: #fde68a;
}

.resource-card-category {
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
}

.resource-card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.5;
}

.resource-card-source {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #93c5fd;
    font-size: 0.875rem;
}

.resource-card-description {
    margin: 0;
    color: #94a3b8;
    line-height: 1.75;
    font-size: 0.93rem;
    flex: 1;
}

.resource-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resource-card-tag {
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 500;
}

.resource-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-top: auto;
    padding: 0.75rem 0.95rem;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
    font-weight: 600;
    text-decoration: none;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.18);
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.resource-card-link:hover {
    background: rgba(59, 130, 246, 0.22);
    color: #eff6ff;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .resource-featured-grid,
    .resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resource-overview {
        flex-direction: column;
    }

    .resource-overview-stats {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .resource-featured-grid,
    .resource-grid,
    .resource-overview-stats {
        grid-template-columns: 1fr;
    }

    .resource-section-header,
    .resource-card-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-overview {
        padding: 1.25rem;
    }
}

/* 空状态 */
.tech-empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.82), rgba(19, 26, 37, 0.76));
    border: none;
    box-shadow:
        inset 0 1px 0 var(--tech-sheen),
        0 14px 28px rgba(1, 4, 9, 0.22);
    border-radius: 12px;
}

/* 页脚 */
.tech-footer {
    background: linear-gradient(180deg, rgba(7, 10, 18, 0) 0%, rgba(10, 14, 39, 0.76) 14%, rgba(10, 14, 39, 0.94) 100%);
    border-top: none;
    position: relative;
    z-index: 1;
}

.tech-footer::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 9rem;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0));
    pointer-events: none;
}

.tech-footer-divider {
    position: relative;
}

.tech-footer-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0), rgba(148, 163, 184, 0.18), rgba(59, 130, 246, 0.28), rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0));
}

.tech-footer-section {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 1.35rem;
}

.tech-footer-heading {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.tech-footer-copy {
    color: #94a3b8;
}

.tech-footer-links {
    display: grid;
    gap: 0.85rem;
}

.tech-footer-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tech-footer-social {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.14);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    transition: all 0.3s ease;
}

.tech-footer-social:hover {
    background: rgba(59, 130, 246, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tech-footer-link {
    display: block;
    color: #94a3b8;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.tech-footer-link:hover {
    color: #60a5fa;
}

.tech-stat-card {
    padding: 1rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 24px rgba(1, 4, 9, 0.2);
    border-radius: 8px;
    text-align: center;
}

.tech-stat-card:hover {
    background: rgba(59, 130, 246, 0.08);
}

.tech-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: ui-monospace, monospace;
}

.tech-stat-label {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.tech-runtime {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* 回到顶部 */
.tech-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.tech-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.tech-scroll-top:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

/* 响应式 */
@media (max-width: 768px) {
    .tech-page-header-inner {
        flex-direction: column;
        text-align: center;
    }

    .tech-page-title {
        font-size: 1.5rem;
    }

    .archive-year-header {
        flex-wrap: wrap;
    }
}
