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 {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/*  */
.blog-header {
    background: url(/Content/img/header-bg.jpg) center center / cover no-repeat #6c83eb;
    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);
        }

.mobile-nav-header {
    display: none;
}

.mobile-dropdown {
    display: none;
}

/*  */
.blog-content {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* ¿Ƭ */
.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;
        }

.youlinks {
    border-top: 1px solid gainsboro;
}

    .youlinks, .youlinks a {
        color: gray;
    }
/* ҳ */
.blog-footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
}

    .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 h2 {
        font-size: 1.6rem;
        font-weight: 600;
        color: #333;
        margin: 0 0 8px 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .page-header h2 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;
    }

    /* 隐藏原有导航菜单 */
    .blog-nav-menu {
        display: none !important;
    }
    /* 显示移动端头部容器（发现按钮区域） */
    .mobile-nav-header {
        display: block;
        margin-right: auto;
    }

    /* 发现按钮样式 */
    .discover-btn {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #000;
        font-size: 16px;
        padding: 6px 14px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

        .discover-btn i {
            font-size: 18px;
        }

        .discover-btn:active {
            background-color: rgba(255,255,255,0.2);
            transform: scale(0.96);
        }
    /* 搜索框在移动端适当缩小宽度，保持右侧 */
    .blog-search {
        flex-shrink: 0;
        margin-left: 12px;
    }

    .search-input-wrapper {
        width: 160px;
    }

    .search-input {
        width: 100%;
        padding: 6px 30px 6px 12px;
        font-size: 14px;
    }
    /* 下拉菜单容器 - 绝对定位浮层 */
    .mobile-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 12px 28px rgba(0,0,0,0.15);
        border-radius: 12px;
        margin-top: 10px;
        z-index: 1000;
        overflow: hidden;
        animation: fadeInDown 0.2s ease;
        border: 1px solid #eef2f6;
    }

        .mobile-dropdown ul {
            list-style: none;
            margin: 0;
            padding: 8px 0;
        }

        .mobile-dropdown li {
            margin: 0;
            padding: 0;
        }

            .mobile-dropdown li a {
                display: block;
                padding: 12px 20px;
                color: #333;
                font-size: 16px;
                font-weight: 500;
                text-decoration: none;
                transition: background 0.2s;
                border-bottom: 1px solid #f0f0f0;
            }

            .mobile-dropdown li:last-child a {
                border-bottom: none;
            }

            .mobile-dropdown li a:active {
                background-color: #f5f7fa;
            }
        /* 当菜单显示时 */
        .mobile-dropdown.show {
            display: block;
        }

    .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;
        }
}

/* 导航栏搜索框 */
.blog-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.blog-search {
    flex-shrink: 0;
    margin-left: 20px;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 0 5px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

    .search-input-wrapper:hover,
    .search-input-wrapper:focus-within {
        background: #fff;
        border-color: #667eea;
        box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    }

.search-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    width: 180px;
    font-size: 14px;
    color: #555;
    outline: none;
}

    .search-input::placeholder {
        color: #999;
    }

.search-btn {
    border: none;
    background: transparent;
    padding: 8px 10px;
    cursor: pointer;
    color: #667eea;
    transition: all 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .search-btn:hover {
        background: #667eea;
        color: #fff;
    }

    .search-btn .layui-icon {
        font-size: 18px;
    }

/* 搜索页面样式 */
.search-page-header {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .search-page-header h1 {
        font-size: 1.6rem;
        font-weight: 600;
        color: #333;
        margin: 0 0 20px 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .search-page-header h1 i {
            color: #667eea;
        }

.search-form-large {
    width: 100%;
}

.search-input-wrapper-large {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input-large {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: all 0.3s;
}

    .search-input-large:focus {
        border-color: #667eea;
        box-shadow: 0 2px 15px rgba(102, 126, 234, 0.2);
    }

    .search-input-large::placeholder {
        color: #999;
    }

.search-btn-large {
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

    .search-btn-large:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

.search-result-info {
    background: #fff;
    border-radius: 8px;
    padding: 15px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

    .search-result-info p {
        margin: 0;
        color: #666;
    }

    .search-result-info strong {
        color: #667eea;
    }

/* 搜索高亮样式 */
.search-highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-tips {
    margin-top: 20px;
}

/* 分页省略号 */
.pagination-ellipsis {
    padding: 0 10px;
    color: #999;
}

/* 响应式搜索框 */
@media (max-width: 768px) {
    .blog-nav-wrapper {
        height: auto;
        padding: 10px;
    }

    .blog-nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        height: auto;
    }

        .blog-nav-menu li {
            flex: 0 0 auto;
        }

        .blog-nav-menu a {
            padding: 0 15px;
        }

    .blog-search {
        /*width: calc(100% - 30px);
        margin: 10px 0 0 0;*/
    }

    .search-input {
        width: 100%;
    }

    .search-input-wrapper {
        flex: 1;
    }

    .search-input-large {
        font-size: 14px;
        padding: 10px 15px;
    }

    .search-btn-large {
        padding: 10px 18px;
        font-size: 14px;
    }


    .search-btn-large {
        justify-content: center;
    }
}

@media (max-width: 320px) {
    .search-btn-large {
        display: none;
    }
}
/* 访客信息侧边栏 */
.visitor-card .sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visitor-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.visitor-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
}

    .visitor-item:last-child {
        border-bottom: none;
    }

.visitor-label {
    flex-shrink: 0;
    width: 70px;
    color: #999;
    font-size: 0.85rem;
}

.visitor-value {
    color: #555;
    font-size: 0.85rem;
    word-break: break-all;
}

.visitor-welcome {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 5px;
    border: none;
}

    .visitor-welcome .visitor-value {
        color: #667eea;
        font-size: 0.9rem;
        font-weight: 500;
    }

/* 侧边栏标题样式修复 */
.sidebar-card h3.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 相关文章区域 */
.related-articles {
    margin-top: 20px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.related-cover {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

    .related-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .related-cover:hover img {
        transform: scale(1.05);
    }

.related-info {
    flex: 1;
    min-width: 0;
}

    .related-info h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0 0 8px 0;
        line-height: 1.4;
    }

        .related-info h3 a {
            color: #333;
            text-decoration: none;
            transition: color 0.3s;
        }

            .related-info h3 a:hover {
                color: #667eea;
            }

    .related-info .meta {
        color: #999;
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

        .related-info .meta span {
            margin-right: 12px;
        }

.related-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 响应式相关文章 */
@media (max-width: 768px) {
    .related-card {
        flex-direction: column;
    }

    .related-cover {
        width: 100%;
        height: 180px;
    }
}

/* 文章详情页侧边栏适配 */
.article-detail {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
