html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/*  */
body {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/*  */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0 40px;
    text-align: center;
    margin-bottom: 0;
}

    .blog-header .blog-logo {
        font-size: 3rem;
        margin-bottom: 10px;
    }

        .blog-header .blog-logo img {
            border-radius: 50%;
        }

    .blog-header .subtitle {
        color: rgba(255,255,255,0.8);
        font-size: 1.1rem;
    }

/*  */
.blog-nav {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

    .blog-nav .layui-container {
        padding: 0;
    }

.blog-nav-menu {
    display: flex;
    align-items: center;
    height: 60px;
}

    .blog-nav-menu a {
        padding: 0 25px;
        height: 60px;
        line-height: 60px;
        color: #555;
        font-size: 16px;
        transition: all 0.3s;
    }

        .blog-nav-menu a:hover,
        .blog-nav-menu a.active {
            color: #667eea;
            background: rgba(102, 126, 234, 0.1);
        }

/*  */
.blog-content {
    padding: 30px 0;
}

/* ¿Ƭ */
.article-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

    .article-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    .article-card .title {
        font-size: 1.4rem;
        font-weight: 600;
        margin-bottom: 10px;
    }

        .article-card .title a {
            color: #333;
            text-decoration: none;
            transition: color 0.3s;
        }

            .article-card .title a:hover {
                color: #667eea;
            }

    .article-card .meta {
        color: #999;
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

        .article-card .meta span {
            margin-right: 15px;
        }

    .article-card .excerpt {
        color: #666;
        line-height: 1.8;
        margin-bottom: 15px;
    }

    .article-card .tags {
        margin-top: 15px;
    }

        .article-card .tags .layui-badge {
            margin-right: 8px;
        }

/*  */
.sidebar-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .sidebar-card h3 {
        font-size: 1.1rem;
        font-weight: 600;
        padding-bottom: 10px;
        margin-bottom: 15px;
        border-bottom: 2px solid #667eea;
    }

.category-list a {
    display: block;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

    .category-list a:hover {
        color: #667eea;
        padding-left: 10px;
    }

.category-list .count {
    float: right;
    color: #999;
    font-size: 0.85rem;
}

/* ǩ */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .tag-cloud .layui-badge {
        cursor: pointer;
        transition: all 0.3s;
    }

        .tag-cloud .layui-badge:hover {
            transform: scale(1.1);
        }

/*  */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .article-detail .title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 15px;
        color: #333;
    }

    .article-detail .meta {
        color: #999;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }

    .article-detail .content {
        line-height: 2;
        font-size: 1.05rem;
        color: #444;
    }

        .article-detail .content img {
            max-width: 100%;
            border-radius: 8px;
            margin: 15px 0;
        }

        .article-detail .content pre {
            background: #f6f8fa;
            padding: 15px;
            border-radius: 6px;
            overflow-x: auto;
        }

        .article-detail .content code {
            background: #f6f8fa;
            padding: 2px 6px;
            border-radius: 3px;
            font-family: 'Courier New', monospace;
        }

/* ҳ */
.blog-footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

    .blog-footer a {
        color: rgba(255,255,255,0.8);
        text-decoration: none;
    }

        .blog-footer a:hover {
            color: #667eea;
        }

/* ״̬ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
}

    .empty-state .layui-icon {
        font-size: 60px;
        color: #ddd;
    }

    .empty-state h3 {
        margin: 20px 0 10px;
        color: #666;
    }

    .empty-state p {
        color: #999;
    }

/* ҳ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

    .pagination .layui-laypage {
        display: flex;
        align-items: center;
        gap: 5px;
    }

/* ҳͨñʽ */
.page-header {
    margin-bottom: 25px;
    padding: 20px 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .page-header h1 {
        font-size: 1.6rem;
        font-weight: 600;
        color: #333;
        margin: 0 0 8px 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .page-header h1 i {
            color: #667eea;
        }

.page-desc {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

.page-meta {
    color: #999;
    font-size: 0.85rem;
    margin: 5px 0 0 0;
}

/* ࿨Ƭʽ */
.category-card {
    transition: all 0.3s;
}

    .category-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    .category-card h3 {
        color: #333;
        margin: 0 0 10px 0;
    }

.category-desc {
    color: #666;
    font-size: 0.9rem;
    margin: 10px 0 0 0;
    line-height: 1.5;
}

/* ǩƴʽ */
.tag-cloud-large {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0;
}

    .tag-cloud-large .tag-item {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 8px 16px;
        background: #f0f0f0;
        border-radius: 20px;
        text-decoration: none;
        color: #666;
        transition: all 0.3s;
        font-size: 14px;
    }

        .tag-cloud-large .tag-item:hover {
            background: #667eea;
            color: #fff;
            transform: scale(1.05);
        }

        .tag-cloud-large .tag-item .tag-count {
            background: rgba(0,0,0,0.1);
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 12px;
        }

        .tag-cloud-large .tag-item:hover .tag-count {
            background: rgba(255,255,255,0.2);
        }

    .tag-cloud-large .tag-large {
        font-size: 18px;
        padding: 12px 20px;
    }

    .tag-cloud-large .tag-medium {
        font-size: 15px;
    }

/* ͼʽ */
.article-thumbnail {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 180px;
}

    .article-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ҳʽ */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.article-cover {
    margin: -30px -30px 25px -30px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    max-height: 400px;
}

    .article-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.article-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.article-meta {
    color: #999;
    font-size: 0.9rem;
}

    .article-meta span {
        margin-right: 15px;
    }

.article-body {
    line-height: 2;
    font-size: 1.05rem;
    color: #444;
}

    .article-body img {
        max-width: 100%;
        border-radius: 8px;
        margin: 15px 0;
    }

    .article-body pre {
        background: #f6f8fa;
        padding: 15px;
        border-radius: 6px;
        overflow-x: auto;
    }

    .article-body code {
        background: #f6f8fa;
        padding: 2px 6px;
        border-radius: 3px;
        font-family: 'Courier New', monospace;
    }

.article-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
}

    .article-tags .tag-item {
        display: inline-block;
        background: #f0f0f0;
        padding: 4px 12px;
        border-radius: 15px;
        margin-right: 8px;
        font-size: 0.9rem;
    }

        .article-tags .tag-item a {
            color: #666;
            text-decoration: none;
        }

        .article-tags .tag-item:hover {
            background: #667eea;
        }

            .article-tags .tag-item:hover a {
                color: #fff;
            }

.article-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

    .article-nav .nav-btn {
        flex: 1;
        padding: 12px 15px;
        background: #f9f9f9;
        border-radius: 8px;
        text-decoration: none;
        color: #666;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s;
    }

        .article-nav .nav-btn:hover {
            background: #667eea;
            color: #fff;
        }

        .article-nav .nav-btn span {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .article-nav .nav-next {
        justify-content: flex-end;
        text-align: right;
    }

/* Ӧʽ */
@media (max-width: 768px) {
    .blog-header .blog-logo {
        font-size: 2.5rem;
    }

    .article-detail {
        padding: 15px;
    }

    .article-cover {
        margin: -15px -15px 20px -15px;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-nav {
        flex-direction: column;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 80px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 999;
}

    .back-to-top:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
    }

    .back-to-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top .layui-icon {
        color: #fff;
        font-size: 20px;
        font-weight: bold;
    }

@media (max-width: 768px) {
    .back-to-top {
        right: 20px;
        bottom: 60px;
        width: 40px;
        height: 40px;
    }

        .back-to-top .layui-icon {
            font-size: 18px;
        }
}