/* ============================================================
   飞之梦技术笔记 - 基于Bootstrap+SB Admin科技蓝主题
   ============================================================ */

body {
    background: #f8f9fc;
    color: #3a3b45;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 15px;
    line-height: 1.8;
}
a { color: #4e73df; text-decoration: none; transition: color 0.2s; }
a:hover { color: #224abe; }
.container { max-width: 1140px; }

/* ===== 顶部导航 ===== */
.top-navbar {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%) !important;
    box-shadow: 0 2px 12px rgba(78, 115, 223, 0.2);
    padding: 0.6rem 0;
}
.top-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: #fff !important;
}
.top-navbar .brand-logo { height: 36px; }
.top-navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1.1rem !important;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    border-radius: 0.35rem;
}
.top-navbar .nav-link:hover,
.top-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
}
.top-navbar .dropdown-menu {
    border: none;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    padding: 0.4rem 0;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
}
.top-navbar .dropdown-item {
    color: #3a3b45;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    transition: all 0.15s;
}
.top-navbar .dropdown-item:hover {
    background: #f8f9fc;
    color: #4e73df;
}
.top-navbar .navbar-toggler { border-color: rgba(255,255,255,0.3); }
.top-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 桌面端hover显示下拉菜单 */
@media (min-width: 992px) {
    .top-navbar .nav-item.dropdown { position: relative; }
    .top-navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .top-navbar .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: all 0.2s ease;
        display: block;
    }
    .top-navbar .dropdown-toggle::after { display: none; }
}

/* ===== 首页：励志语+搜索合并 ===== */
.home-hero-section {
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    padding: 2.5rem 0;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.home-hero-section .container { position: relative; z-index: 1; width: 100%; }
.home-quote-text {
    font-family: 'KaiTi', 'STKaiti', '楷体', serif;
    font-size: 1.4rem;
    line-height: 2;
    max-width: 680px;
    margin: 0 auto 1rem;
    text-indent: 2em;
    text-align: justify;
    opacity: 0.95;
}
.home-quote-text.single-line {
    text-align: center;
    text-indent: 0;
}
.home-quote-author {
    font-size: 0.9rem;
    opacity: 0.75;
    letter-spacing: 2px;
    margin-bottom: 1.75rem;
}
.home-search-box { max-width: 560px; margin: 0 auto; }
.home-search-form {
    display: flex;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.home-search-form input {
    flex: 1;
    padding: 0.9rem 1.25rem;
    border: none;
    font-size: 0.95rem;
    color: #3a3b45;
    outline: none;
}
.home-search-form input::placeholder { color: #b7b9cc; }
.home-search-form button {
    padding: 0 1.75rem;
    background: #36b9cc;
    color: #fff;
    border: none;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}
.home-search-form button:hover { background: #2c9faf; }

/* ===== 首页：板块通用标题 ===== */
.home-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.home-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}
.home-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #4e73df;
    border-radius: 2px;
}
.home-section-subtitle {
    font-size: 0.9rem;
    color: #858796;
    margin-top: 1rem;
}

/* ===== 首页：技术栏目卡片 ===== */
.home-categories-section {
    padding: 4rem 0;
    background: #f8f9fc;
}
.home-category-card {
    display: block;
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 0.75rem;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    text-decoration: none;
}
.home-category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(78,115,223,0.15);
    border-color: #d1d3e2;
    text-decoration: none;
}
.home-category-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8f9fc;
}
.home-category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.home-category-card:hover .home-category-cover img {
    transform: scale(1.08);
}
.home-category-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.4) 100%);
    transition: opacity 0.3s;
}
.home-category-card:hover .home-category-cover-overlay {
    background: linear-gradient(to bottom, rgba(78,115,223,0.1) 0%, rgba(34,74,190,0.5) 100%);
}
.home-category-count-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.95);
    color: #4e73df;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.home-category-info {
    padding: 1.25rem 1.5rem 1.5rem;
}
.home-category-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}
.home-category-card:hover .home-category-name {
    color: #4e73df;
}
.home-category-desc {
    font-size: 0.85rem;
    color: #858796;
    line-height: 1.6;
    margin-bottom: 0.875rem;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-category-arrow {
    font-size: 0.8rem;
    color: #4e73df;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-block;
}
.home-category-card:hover .home-category-arrow {
    letter-spacing: 1px;
    color: #224abe;
}

/* ===== 文章列表 ===== */
.list-page-wrap { padding: 2.5rem 0 4rem; }
.list-page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eaecf4;
}
.list-page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 0.5rem;
}
.list-page-header p { color: #858796; font-size: 0.875rem; }

.article-card {
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.article-card:hover {
    box-shadow: 0 8px 24px rgba(78, 115, 223, 0.1);
    transform: translateY(-2px);
    border-color: #d1d3e2;
}
.article-card .card-cover {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.article-card .card-body { padding: 1.5rem 1.75rem; }
.article-card .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.article-card .card-title a { color: #3a3b45; }
.article-card .card-title a:hover { color: #4e73df; }
.article-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #858796;
    margin-bottom: 0.875rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid #f3f4f7;
}
.article-card .card-meta a { color: #858796; }
.article-card .card-meta a:hover { color: #4e73df; }
.article-card .card-excerpt {
    font-size: 0.9rem;
    color: #5a5c69;
    line-height: 1.85;
    margin-bottom: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-card .card-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.article-card .card-tags a {
    font-size: 0.75rem;
    color: #4e73df;
    padding: 0.2rem 0.65rem;
    background: #eaecf4;
    border-radius: 20px;
    transition: all 0.2s;
}
.article-card .card-tags a:hover { background: #4e73df; color: #fff; }

.log-topflg {
    display: inline-block;
    background: #f6c23e;
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    font-weight: 600;
    vertical-align: middle;
}

/* ===== 分页 ===== */
.pagination-wrap { text-align: center; margin-top: 2rem; }
.pagination-wrap .page-link {
    color: #4e73df;
    border: 1px solid #eaecf4;
    margin: 0 2px;
    border-radius: 0.35rem !important;
}
.pagination-wrap .page-link:hover { background: #f8f9fc; }
.pagination-wrap .page-item.active .page-link {
    background: #4e73df;
    border-color: #4e73df;
    color: #fff;
}

/* ===== 文章详情 ===== */
.article-detail-wrap { padding: 2.5rem 0 4rem; }
.article-detail-card {
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 0.5rem;
    padding: 3rem 3.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.article-detail-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eaecf4;
}
.article-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #3a3b45;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.article-detail-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    font-size: 0.8rem;
    color: #858796;
}
.article-detail-meta a { color: #858796; }
.article-detail-meta a:hover { color: #4e73df; }
.article-detail-cover {
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
}
.article-detail-cover img { width: 100%; }

/* Markdown正文 */
.article-detail-body {
    font-size: 1rem;
    line-height: 1.9;
    color: #3a3b45;
}
.article-detail-body p { margin-bottom: 1.25rem; text-align: justify; }
.article-detail-body h1,
.article-detail-body h2,
.article-detail-body h3,
.article-detail-body h4,
.article-detail-body h5,
.article-detail-body h6 {
    color: #3a3b45 !important;
    font-weight: 700;
    margin: 2rem 0 1rem;
    line-height: 1.5;
}
.article-detail-body h1 {
    font-size: 1.6rem !important;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaecf4 !important;
}
.article-detail-body h2 {
    font-size: 1.4rem !important;
    padding-left: 1rem;
    border-left: 4px solid #4e73df !important;
    background: #f8f9fc;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.article-detail-body h3 {
    font-size: 1.2rem !important;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #eaecf4 !important;
}
.article-detail-body img {
    max-width: 100%;
    border-radius: 0.35rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 1.25rem auto;
}
.article-detail-body blockquote {
    border-left-color: #4e73df !important;
    background: #f8f9fc !important;
    padding: 1rem 1.25rem !important;
    border-radius: 0 0.35rem 0.35rem 0;
    margin: 1.25rem 0;
}
.article-detail-body pre {
    background: #f8f9fc !important;
    border: 1px solid #eaecf4 !important;
    border-radius: 0.35rem;
    margin: 1.25rem 0;
}
.article-detail-body code {
    background: #f3f4f7 !important;
    color: #e83e8c !important;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}
.article-detail-body table {
    border-radius: 0.35rem;
    overflow: hidden;
}
.article-detail-body th {
    background: #4e73df !important;
    color: #fff !important;
    border-color: #4e73df !important;
}
.article-detail-body ul, .article-detail-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-detail-body li { margin-bottom: 0.4rem; }

.article-detail-tags {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eaecf4;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.article-detail-tags::before {
    content: '标签：';
    font-size: 0.85rem;
    color: #858796;
}
.article-detail-tags a {
    font-size: 0.8rem;
    color: #4e73df;
    padding: 0.25rem 0.75rem;
    background: #eaecf4;
    border-radius: 20px;
}
.article-detail-tags a:hover { background: #4e73df; color: #fff; }

/* 上下篇 */
.neighbor-log {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eaecf4;
}
.neighbor-log a {
    font-size: 0.875rem;
    color: #5a5c69;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.neighbor-log a:hover { color: #4e73df; }
.neighbor-log .prev::before { content: '← 上一篇：'; color: #4e73df; }
.neighbor-log .next::after { content: '：下一篇 →'; color: #4e73df; }

/* 评论区 */
.comment-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #eaecf4; }

/* 相关文章 */
.log_related { margin-top: 2rem; }
.log_related h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eaecf4;
}
.log_related ul li { padding: 0.4rem 0; }
.log_related ul li a {
    font-size: 0.875rem;
    color: #5a5c69;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.log_related ul li a:hover { color: #4e73df; padding-left: 4px; }

/* ===== 侧边栏 ===== */
.blog-sidebar { width: 100%; box-sizing: border-box; }
.sidebar-widget {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sidebar-widget .widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3a3b45;
    padding: 0.875rem 1.25rem;
    background: #f8f9fc;
    border-bottom: 1px solid #eaecf4;
    margin: 0;
    position: relative;
    padding-left: 1.5rem;
}
.sidebar-widget .widget-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.1rem;
    background: #4e73df;
    border-radius: 0 2px 2px 0;
}
.sidebar-widget .widget-content { padding: 1rem 1.25rem; }
.sidebar-widget .widget-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f7;
    font-size: 0.875rem;
}
.sidebar-widget .widget-list li:last-child { border-bottom: none; }
.sidebar-widget .widget-list a {
    color: #5a5c69;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s;
}
.sidebar-widget .widget-list a:hover { color: #4e73df; padding-left: 4px; }

/* 日历 - 适配emlog原生输出结构 */
#calendar {
    padding: 0;
    font-size: 0.8rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #eaecf4;
}
#calendar .calendartop {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
}
#calendar .calendartop tr { display: flex; }
#calendar .calendartop td {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.25rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    white-space: nowrap;
}
#calendar .calendartop td:first-child { border-right: 1px solid rgba(255,255,255,0.15); }
#calendar .calendartop a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    font-size: 0.9rem;
    padding: 0 0.2rem;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
}
#calendar .calendartop a:hover { opacity: 1; }
#calendar .calendar {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    background: #fff;
}
#calendar .calendar td {
    padding: 0;
    font-size: 0.78rem;
    color: #5a5c69;
    height: 32px;
    width: 14.28%;
    border: 1px solid #f3f4f7;
}
#calendar .calendar .week {
    background: #f8f9fc;
    color: #858796;
    font-weight: 600;
    font-size: 0.72rem;
    height: 30px;
}
#calendar .calendar .sun { color: #e74a3b; }
#calendar .calendar .day {
    background: #4e73df;
    color: #fff;
    font-weight: 700;
}
#calendar .calendar .day2 a,
#calendar .calendar td a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #4e73df;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
#calendar .calendar td a:hover { background: #e8eefc; }
#calendar .calendar .day a { color: #fff; }
#calendar .calendar .day a:hover { background: #3a5bc7; }

/* 特殊widget */
.widget-blogger .blogger-info { text-align: center; padding: 0.5rem 0; }
.widget-blogger .blogger-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    margin: 0 auto 0.75rem; border: 3px solid #eaecf4;
}
.widget-blogger .blogger-name { font-weight: 700; color: #3a3b45; font-size: 1rem; margin-bottom: 0.35rem; }
.widget-blogger .blogger-desc { font-size: 0.8rem; color: #858796; line-height: 1.6; }

.widget-search .search-form {
    display: flex;
    gap: 0;
    padding: 1rem 1.25rem;
}
.widget-search .search-input {
    flex: 1; padding: 0.55rem 0.875rem;
    border: 1.5px solid #e3e6f0; border-right: none;
    border-radius: 0.4rem 0 0 0.4rem;
    font-size: 0.85rem; outline: none;
    background: #fcfcfd;
    transition: all 0.2s;
}
.widget-search .search-input:focus {
    border-color: #4e73df;
    background: #fff;
}
.widget-search .search-btn {
    padding: 0 1rem; background: #4e73df;
    color: #fff; border: none; border-radius: 0 0.4rem 0.4rem 0;
    cursor: pointer; display: flex; align-items: center;
    transition: background 0.2s;
}
.widget-search .search-btn:hover { background: #224abe; }

.widget-newlog .widget-list,
.widget-hotlog .widget-list,
.widget-archive .widget-content,
.widget-link .widget-content,
.widget-twitter .widget-content,
.widget-custom .widget-custom-content,
.widget-newcomm .widget-content {
    padding: 0.5rem 1.25rem;
}
.widget-newlog .widget-list-item,
.widget-hotlog .widget-list-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid #f3f4f7;
}
.widget-newlog .widget-list-item:last-child,
.widget-hotlog .widget-list-item:last-child {
    border-bottom: none;
}
.widget-newlog .widget-list-link {
    flex: 1;
    font-size: 0.875rem;
    color: #5a5c69;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
    text-decoration: none;
}
.widget-newlog .widget-list-link:hover { color: #4e73df; }
.widget-newlog .widget-list-date {
    font-size: 0.72rem;
    color: #b7b9cc;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.widget-hotlog .hot-rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 4px;
    font-size: 0.7rem; font-weight: 700; color: #fff;
    background: #d1d3e2; margin-right: 0.625rem; flex-shrink: 0;
}
.widget-hotlog .rank-1 { background: #e74a3b; }
.widget-hotlog .rank-2 { background: #f6c23e; }
.widget-hotlog .rank-3 { background: #f59f00; }

.widget-sort .widget-count {
    font-size: 0.7rem; color: #858796; background: #f3f4f7;
    padding: 0.1rem 0.4rem; border-radius: 10px; margin-left: 0.5rem;
}

/* 新版分类（多级+折叠） */
.widget-sort .widget-sort-list {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}
.widget-sort .widget-sort-item {
    list-style: none;
}
.widget-sort .widget-sort-row {
    display: flex;
    align-items: center;
    padding: 0.45rem 1.25rem;
    transition: background 0.15s;
    gap: 0.4rem;
}
.widget-sort .widget-sort-row:hover {
    background: #f8f9fc;
}
.widget-sort .widget-sort-item.active > .widget-sort-row {
    background: #f0f4ff;
}
.widget-sort .widget-sort-item.active > .widget-sort-row .widget-sort-link {
    color: #4e73df;
    font-weight: 600;
}
.widget-sort .widget-sort-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #858796;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 3px;
    transition: all 0.2s;
}
.widget-sort .widget-sort-toggle:hover {
    background: #e8ecf4;
    color: #4e73df;
}
.widget-sort .widget-sort-toggle svg {
    transition: transform 0.2s;
}
.widget-sort .widget-sort-item.expanded > .widget-sort-row .widget-sort-toggle svg {
    transform: rotate(90deg);
}
.widget-sort .widget-sort-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d3e2;
    flex-shrink: 0;
    margin-left: 6px;
    margin-right: 6px;
}
.widget-sort .widget-sort-link {
    flex: 1;
    font-size: 0.875rem;
    color: #5a5c69;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s;
}
.widget-sort .widget-sort-link:hover {
    color: #4e73df;
}
.widget-sort .widget-sort-count {
    font-size: 0.72rem;
    color: #858796;
    background: #f3f4f7;
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 500;
}
.widget-sort .widget-sort-children {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget-sort .widget-sort-children .widget-sort-row {
    padding-left: calc(1.25rem + 16px);
}

.widget-tag .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}
.widget-tag .tag-item {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: #f8f9fc;
    color: #4e73df;
    border-radius: 20px;
    font-size: 0.8rem !important;
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid #eaecf4;
}
.widget-tag .tag-item:hover {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
    transform: translateY(-1px);
}

.widget-newcomm .widget-list,
.widget-newcomm .comment-list {
    list-style: none;
    padding: 0 0 0 1rem;
    margin: 0;
}
.widget-newcomm .comment-widget-item {
    display: flex; gap: 0.6rem; padding: 0.6rem 0;
    border-bottom: 1px solid #f3f4f7;
    align-items: flex-start;
}
.widget-newcomm .comment-widget-item:last-child { border-bottom: none; }
.widget-newcomm .comment-widget-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.widget-newcomm .comment-widget-body { flex: 1; min-width: 0; }
.widget-newcomm .comment-widget-name { display: block; font-size: 0.8rem; font-weight: 600; color: #3a3b45; margin-bottom: 0.2rem; }
.widget-newcomm .comment-widget-content {
    font-size: 0.82rem; color: #5a5c69; line-height: 1.6;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden; width: 100%; text-decoration: none;
    transition: color 0.2s;
}
.widget-newcomm .comment-widget-content:hover { color: #4e73df; }

.widget-archive .archive-select {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid #d1d3e2; border-radius: 0.35rem;
    font-size: 0.85rem; color: #5a5c69; background: #fff; outline: none;
}
.widget-archive .archive-select:focus { border-color: #4e73df; }

.widget-link .link-item a {
    display: block; padding: 0.4rem 0; font-size: 0.875rem;
    color: #5a5c69; border-bottom: 1px solid #f3f4f7;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.widget-link .link-item:last-child a { border-bottom: none; }
.widget-link .link-item a:hover { color: #4e73df; padding-left: 4px; }

.widget-twitter .twitter-item { padding: 0.625rem 0; border-bottom: 1px solid #f3f4f7; }
.widget-twitter .twitter-item:last-child { border-bottom: none; }
.widget-twitter .twitter-content { font-size: 0.85rem; color: #5a5c69; line-height: 1.6; margin-bottom: 0.35rem; }
.widget-twitter .twitter-meta { font-size: 0.72rem; color: #b7b9cc; }

.widget-custom .widget-custom-content { font-size: 0.875rem; color: #5a5c69; line-height: 1.7; word-break: break-word; }

/* ===== 评论区（参考SunnyBreeze布局） ===== */
.comments-section {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eaecf4;
}
.comments-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eaecf4;
}

/* 评论项：左右布局 */
.comment-item {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px dashed #eaecf4;
    align-items: flex-start;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-avatar-wrap {
    flex-shrink: 0;
    margin-right: 0.75rem;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #eaecf4;
    object-fit: cover;
    display: block;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.comment-author {
    color: #4e73df;
    font-size: 0.9rem;
    font-weight: 600;
}
.comment-author a { color: #4e73df; }
.comment-author a:hover { color: #224abe; text-decoration: underline; }
.comment-reply-to {
    font-size: 0.75rem;
    color: #858796;
}
.reply-target {
    color: #4e73df;
    font-weight: 600;
    margin-left: 2px;
}
.comment-time {
    color: #b7b9cc;
    font-size: 0.72rem;
}
.comment-content {
    margin-top: 0.25rem;
    color: #5a5c69;
    font-size: 0.9rem;
    line-height: 1.75;
    word-wrap: break-word;
    word-break: break-word;
}
.comment-actions {
    margin-top: 0.5rem;
}
.comment-actions .com-reply {
    background: transparent;
    color: #4e73df;
    border: 1px solid #dce6ff;
    padding: 0.2rem 0.875rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-actions .com-reply:hover {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}

/* 子评论：左侧竖线缩进 */
.comment-children {
    margin-left: 0.75rem;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    border-left: 2px solid #eaecf4;
}
.comment-children .comment-item {
    padding: 0.75rem 0;
    border-bottom: none;
}
.comment-children .comment-avatar {
    width: 32px;
    height: 32px;
    border-width: 1px;
}
.comment-children .comment-avatar-wrap {
    margin-right: 0.625rem;
}

/* 评论分页 */
#comment-pagenavi {
    margin-top: 1.25rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f7;
}
#comment-pagenavi a, #comment-pagenavi span {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    margin: 0 2px;
    border: 1px solid #eaecf4;
    border-radius: 0.3rem;
    font-size: 0.8rem;
    color: #4e73df;
    transition: all 0.2s;
}
#comment-pagenavi a:hover {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
}
#comment-pagenavi span {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
    font-weight: 600;
}

/* ===== 评论发表表单 ===== */
.comment-post-section {
    margin-bottom: 2.5rem;
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.comment-post-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 1.25rem;
    padding-left: 0.75rem;
    border-left: 4px solid #4e73df;
}
.comment-form { background: transparent; padding: 0; }
.comment-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e3e6f0;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
    min-height: 110px;
    margin-bottom: 1rem;
    background: #fcfcfd;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.7;
    box-sizing: border-box;
}
.comment-textarea:focus {
    border-color: #4e73df;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78,115,223,0.1);
}
.comment-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.comment-fields input {
    flex: 1;
    min-width: 140px;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid #e3e6f0;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    outline: none;
    background: #fcfcfd;
    transition: all 0.2s;
    box-sizing: border-box;
}
.comment-fields input:focus {
    border-color: #4e73df;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(78,115,223,0.1);
}
.comment-captcha { display: flex; align-items: center; gap: 0.5rem; }
.comment-captcha img { height: 38px; cursor: pointer; border: 1px solid #e3e6f0; border-radius: 0.3rem; flex-shrink: 0; }
.comment-captcha input, .comment-captcha .captcha_input {
    flex: 0 0 100px !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    padding: 0.4rem 0.6rem !important;
    border: 1px solid #d1d3e2 !important;
    border-radius: 0.3rem !important;
    font-size: 0.875rem !important;
    outline: none;
}
.comment-captcha input:focus { border-color: #4e73df; }
.comment-submit-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}
.comment-submit-row input[type="submit"] {
    padding: 0.6rem 1.75rem;
    background: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(78,115,223,0.25);
}
.comment-submit-row input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78,115,223,0.35);
}
.comment-submit-row input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.comment-submit-row input[type="button"] {
    padding: 0.6rem 1.25rem;
    background: #fff;
    color: #858796;
    border: 1.5px solid #e3e6f0;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.comment-submit-row input[type="button"]:hover {
    border-color: #858796;
    color: #5a5c69;
}
.comment-submit-row span {
    font-size: 0.875rem;
    color: #858796;
}
.comment-submit-row span a { color: #4e73df; font-weight: 600; }

/* ===== 评论样式：紧凑列表式 ===== */
.comment-style-compact .comment-item {
    padding: 0.75rem 0;
}
.comment-style-compact .comment-avatar { width: 32px; height: 32px; border-width: 1px; }
.comment-style-compact .comment-avatar-wrap { margin-right: 0.625rem; }
.comment-style-compact .comment-children {
    margin-left: 0.5rem;
    padding-left: 0.875rem;
    border-left: 2px solid #f0f2f7;
}
.comment-style-compact .comment-children .comment-item { padding: 0.5rem 0; }
.comment-style-compact .comment-content { font-size: 0.85rem; line-height: 1.65; }
.comment-style-compact .com-reply {
    background: transparent;
    border: none;
    padding: 0;
    color: #4e73df;
    font-size: 0.72rem;
}
.comment-style-compact .com-reply:hover { background: transparent; color: #224abe; text-decoration: underline; }

/* ===== 评论样式：气泡对话式 ===== */
.comment-style-bubble .comment-item {
    padding: 0.875rem 0;
    align-items: flex-start;
}
.comment-style-bubble .comment-avatar {
    width: 36px;
    height: 36px;
    border: none;
    margin-top: 0.25rem;
}
.comment-style-bubble .comment-body {
    background: #f8f9fc;
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    padding: 0.75rem 1rem;
    position: relative;
}
.comment-style-bubble .comment-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid #f8f9fc;
    border-left: 8px solid transparent;
}
.comment-style-bubble .comment-children {
    margin-left: 0.5rem;
    padding-left: 0;
    border-left: none;
    margin-top: 0.5rem;
}
.comment-style-bubble .comment-children .comment-body {
    background: #f0f4ff;
    border-radius: 0 0.6rem 0.6rem 0.6rem;
}
.comment-style-bubble .comment-children .comment-body::before {
    border-top-color: #f0f4ff;
}
.comment-style-bubble .comment-content { font-size: 0.875rem; line-height: 1.65; }
.comment-style-bubble .com-reply {
    background: transparent;
    border: none;
    padding: 0;
    color: #4e73df;
    font-size: 0.72rem;
}
.comment-style-bubble .com-reply:hover { background: transparent; color: #224abe; text-decoration: underline; }

/* ===== 评论样式：极简线条式 ===== */
.comment-style-minimal .comments-title {
    border-bottom: 1px solid #f0f2f7;
    font-size: 1rem;
    color: #858796;
    font-weight: 500;
    padding-left: 0;
}
.comment-style-minimal .comment-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f2f7;
}
.comment-style-minimal .comment-avatar {
    width: 32px;
    height: 32px;
    border: 1px solid #eaecf4;
}
.comment-style-minimal .comment-children {
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-left: 1px solid #f0f2f7;
}
.comment-style-minimal .comment-children .comment-item { padding: 0.625rem 0; border-bottom: 1px solid #f5f6f9; }
.comment-style-minimal .comment-author { font-weight: 500; font-size: 0.85rem; color: #5a5c69; }
.comment-style-minimal .comment-author a { color: #5a5c69; }
.comment-style-minimal .comment-time { font-size: 0.7rem; color: #b7b9cc; }
.comment-style-minimal .comment-content { font-size: 0.85rem; line-height: 1.65; color: #858796; }
.comment-style-minimal .com-reply {
    background: transparent;
    border: none;
    padding: 0;
    color: #b7b9cc;
    font-size: 0.7rem;
}
.comment-style-minimal .com-reply:hover { background: transparent; color: #4e73df; }
.comment-style-minimal #comment-pagenavi { border-top: 1px solid #f0f2f7; }
.comment-style-minimal #comment-pagenavi a,
.comment-style-minimal #comment-pagenavi span {
    border: none;
    background: transparent;
    color: #858796;
}
.comment-style-minimal #comment-pagenavi a:hover { color: #4e73df; background: transparent; }
.comment-style-minimal #comment-pagenavi span { color: #4e73df; font-weight: 500; }

/* ===== 边栏个人资料统计 ===== */
.widget-blogger .blogger-stats {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin-top: 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid #f3f4f7;
    gap: 0;
}
.widget-blogger .blogger-stat-item {
    text-align: center;
    flex: 1;
    padding: 0 0.5rem;
}
.widget-blogger .blogger-stat-divider {
    width: 1px;
    background: #eaecf4;
    align-self: center;
    height: 28px;
}
.widget-blogger .blogger-stat-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #4e73df;
    line-height: 1.2;
}
.widget-blogger .blogger-stat-label {
    display: block;
    font-size: 0.72rem;
    color: #858796;
    margin-top: 0.15rem;
}

/* ===== 页脚 ===== */
.site-footer {
    background: #fff;
    border-top: 1px solid #eaecf4;
    padding: 2.5rem 0 2rem;
    margin-top: 3rem;
    text-align: center;
}
.footer-custom-html { text-align: center; }
.footer-custom-text {
    font-size: 0.85rem;
    color: #858796;
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* 网站统计 */
.footer-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.footer-stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}
.footer-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4e73df;
}
.footer-stat-label {
    font-size: 0.8rem;
    color: #858796;
}
.footer-stat-divider {
    color: #d1d3e2;
    font-size: 1.2rem;
}

/* 社交媒体 */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fc;
    color: #858796;
    transition: all 0.25s;
    cursor: pointer;
    text-decoration: none;
}
.footer-social-link:hover {
    background: #4e73df;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78,115,223,0.3);
}
.footer-social-tip { position: relative; }
.footer-social-qq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 0.62rem;
    font-weight: 800;
    color: #fff;
    background: #12b7f5;
    border-radius: 5px;
    letter-spacing: -0.5px;
    line-height: 1;
}
.footer-social-link:hover .footer-social-qq {
    background: #fff;
    color: #12b7f5;
}
.footer-brand { font-size: 1.1rem; font-weight: 700; color: #3a3b45; margin-bottom: 0.35rem; letter-spacing: 1px; }
.footer-desc { font-size: 0.8rem; color: #858796; margin-bottom: 1.25rem; }
.footer-divider { width: 60px; height: 2px; background: #4e73df; margin: 0 auto 1.25rem; border-radius: 2px; }
.footer-copyright { font-size: 0.8rem; color: #858796; margin-bottom: 0.35rem; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.35rem; }
.footer-copyright a { color: #4e73df; }
.footer-copyright-left, .footer-copyright-right { color: #858796; }
.footer-copyright-left { margin-right: 0.25rem; }
.footer-copyright-right { margin-left: 0.25rem; }
.footer-powered { color: #858796; }
.footer-powered a { color: #4e73df; }
.footer-beian { font-size: 0.75rem; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.footer-beian a { color: #b7b9cc; display: inline-flex; align-items: center; }
.footer-beian a:hover { color: #4e73df; }
.footer-police-link { gap: 0.25rem; }
.footer-police-icon { width: 14px; height: 14px; }

/* ===== 返回顶部 ===== */
.scroll-to-top {
    position: fixed; right: 1.5rem; bottom: 17.5rem;
    width: 2.5rem; height: 2.5rem;
    background: #4e73df; color: #fff; border-radius: 50%;
    box-shadow: 0 4px 12px rgba(78, 115, 223, 0.3);
    transition: all 0.3s; z-index: 1050;
    display: none; cursor: pointer; border: none;
    align-items: center; justify-content: center;
    padding: 0;
}
.scroll-to-top svg { display: block; }
.scroll-to-top:hover { background: #224abe; transform: translateY(-2px); }

/* ===== 登录弹窗 ===== */
.auth-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: none; }
.auth-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 400px; max-width: 90vw; background: #fff;
    border-radius: 0.5rem; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 2001; display: none; overflow: hidden;
}
.auth-modal-card { padding: 2rem; position: relative; }
.auth-modal-close {
    position: absolute; top: 0.75rem; right: 1rem;
    background: none; border: none; font-size: 1.5rem;
    color: #b7b9cc; cursor: pointer;
    width: 2rem; height: 2rem; display: flex;
    align-items: center; justify-content: center; border-radius: 0.25rem;
}
.auth-modal-close:hover { background: #f3f4f7; color: #5a5c69; }
.auth-modal-head { text-align: center; margin-bottom: 1.5rem; }
.auth-modal-head h3 { font-size: 1.35rem; font-weight: 700; color: #3a3b45; margin: 0; }
.auth-form-row { margin-bottom: 1rem; }
.auth-form-row input {
    width: 100%; padding: 0.625rem 0.875rem;
    border: 1px solid #d1d3e2; border-radius: 0.35rem;
    font-size: 0.9rem; outline: none; background: #fff;
}
.auth-form-row input:focus { border-color: #4e73df; }
.auth-captcha-row { display: flex; gap: 0.625rem; align-items: center; }
.auth-captcha-row input { flex: 1; }
.auth-captcha-row img { height: 38px; cursor: pointer; border: 1px solid #d1d3e2; border-radius: 0.25rem; }
.auth-checkbox { display: flex; align-items: center; gap: 0.375rem; font-size: 0.85rem; color: #858796; margin-bottom: 1rem; }
.auth-submit-btn {
    width: 100%; padding: 0.75rem;
    background: #4e73df; color: #fff; border: none;
    border-radius: 0.35rem; font-size: 0.95rem; font-weight: 600;
    letter-spacing: 2px; cursor: pointer; transition: background 0.2s;
}
.auth-submit-btn:hover { background: #224abe; }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-modal-switch { text-align: center; margin-top: 1rem; font-size: 0.85rem; }
.auth-modal-switch a { color: #4e73df; margin: 0 0.5rem; }
.auth-inline-row { display: flex; gap: 0.5rem; }
.auth-inline-btn {
    padding: 0 0.875rem; background: #4e73df;
    color: #fff; border: none; font-size: 0.8rem; cursor: pointer;
    white-space: nowrap; border-radius: 0.25rem;
}
.auth-inline-btn:disabled { opacity: 0.6; }
.auth-login-ext { margin-top: 0.875rem; text-align: center; }
.auth-modal-alert { margin-bottom: 1rem; }
.auth-modal-alert .alert { border: none; font-size: 0.85rem; }

/* ===== 404 ===== */
.page-404 { text-align: center; padding: 6rem 0; }
.page-404 h1 { font-size: 5rem; font-weight: 800; color: #4e73df; margin-bottom: 1rem; }
.page-404 p { font-size: 1.1rem; color: #858796; margin-bottom: 2rem; }
.page-404 a {
    display: inline-block; padding: 0.75rem 2rem;
    background: #4e73df; color: #fff; border-radius: 0.35rem; font-weight: 600;
}
.page-404 a:hover { background: #224abe; color: #fff; }

/* ===== 作品集 ===== */
.portfolio-info-bar {
    display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
    padding: 1rem 1.25rem; background: #f8f9fc;
    border-radius: 0.5rem; margin-bottom: 1.5rem; border: 1px solid #eaecf4;
}
.portfolio-info-item { display: flex; gap: 0.5rem; font-size: 0.875rem; }
.portfolio-info-label { color: #858796; }
.portfolio-info-value { color: #3a3b45; font-weight: 600; }
.portfolio-info-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 1.25rem; font-size: 0.85rem; font-weight: 600;
    border: none; border-radius: 0.35rem; cursor: pointer;
    transition: all 0.2s; color: #fff;
}
.portfolio-info-btn svg { width: 1rem; height: 1rem; }
.btn-demo { background: #1cc88a; }
.btn-demo:hover { background: #17a673; }
.btn-download { background: #4e73df; }
.btn-download:hover { background: #224abe; }

/* ===== 响应式 ===== */
@media (max-width: 1199px) {
    .container { max-width: 960px; }
}
@media (max-width: 992px) {
    .container { max-width: 100%; padding-left: 1rem; padding-right: 1rem; }
    .article-detail-card { padding: 2rem 1.5rem; }
    .home-categories-section { padding: 3rem 0; }
    .comment-post-section { padding: 1.5rem; }
}
@media (max-width: 768px) {
    body { font-size: 14px; }
    .container { padding-left: 0.75rem; padding-right: 0.75rem; }

    /* 导航 */
    .top-navbar { padding: 0.5rem 0; }
    .top-navbar .navbar-brand { font-size: 1rem; }
    .top-navbar .nav-link { padding: 0.5rem 0.75rem !important; font-size: 0.875rem; }

    /* 首页Hero */
    .home-hero-section { padding: 2rem 0 2.5rem; }
    .home-quote-text { font-size: 1rem; line-height: 1.9; max-width: 100%; }
    .home-quote-author { font-size: 0.8rem; margin-bottom: 1.5rem; }
    .home-search-box { max-width: 100%; }
    .home-search-form { flex-direction: column; border-radius: 0.5rem; }
    .home-search-form input { padding: 0.75rem 1rem; }
    .home-search-form button { justify-content: center; padding: 0.75rem; }

    /* 首页栏目 */
    .home-section-title { font-size: 1.4rem; }
    .home-section-subtitle { font-size: 0.85rem; }
    .home-categories-section { padding: 2.5rem 0; }
    .home-category-info { padding: 1rem 1.25rem 1.25rem; }
    .home-category-name { font-size: 1rem; }

    /* 文章列表 */
    .list-page-wrap { padding: 1.5rem 0 3rem; }
    .list-page-header h1 { font-size: 1.4rem; }
    .article-card .card-body { padding: 1.25rem; }
    .article-card .card-title { font-size: 1.1rem; }

    /* 单行列表模板 */
    .article-row-item { flex-direction: column; }
    .article-row-thumb { width: 100%; height: 160px; }
    .article-row-body { padding: 1rem 1.25rem; }

    /* 背景音乐 */
    .bgm-player { right: 0.75rem; bottom: 0.75rem; max-width: calc(100vw - 1.5rem); }
}

/* ===== 搜索按钮文字 ===== */
.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.search-btn svg { flex-shrink: 0; }
.search-btn span { font-size: 0.82rem; }

/* ===== 单行列表模板 ===== */
.article-row-item {
    display: flex;
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #eaecf4;
    transition: all 0.25s;
}
.article-row-item:hover {
    box-shadow: 0 4px 12px rgba(78,115,223,0.12);
    transform: translateY(-2px);
    border-color: #dce6ff;
}
.article-row-thumb {
    width: 220px;
    min-width: 220px;
    overflow: hidden;
    background: #f8f9fc;
    align-self: stretch;
    display: flex;
}
.article-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-row-item:hover .article-row-thumb img { transform: scale(1.05); }
.article-row-body {
    flex: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.article-row-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1.5;
}
.article-row-title a { color: #3a3b45; text-decoration: none; }
.article-row-title a:hover { color: #4e73df; }
.article-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #858796;
    margin-bottom: 0.5rem;
}
.article-row-meta span { display: inline-flex; align-items: center; }
.article-row-excerpt {
    font-size: 0.875rem;
    color: #5a5c69;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-row-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.article-row-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.article-row-more {
    font-size: 0.82rem;
    color: #4e73df;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.article-row-more:hover { color: #224abe; text-decoration: underline; }
.list-page-desc {
    color: #858796;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ===== 边栏个人资料社交链接 ===== */
.blogger-social {
    display: flex;
    justify-content: center;
    gap: 0.625rem;
    margin-top: 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f7;
}
.blogger-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f4ff;
    color: #4e73df;
    transition: all 0.2s;
}
.blogger-social-link:hover {
    background: #4e73df;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== Footer友情链接 ===== */
.footer-links-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-links-section .widget-title {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-links-apply {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    text-decoration: none;
}
.footer-links-apply:hover { color: #fff; text-decoration: underline; }
.footer-links-section .link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}
.footer-links-section .link-item a {
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links-section .link-item a:hover { color: #fff; }

/* ===== Footer版权扩展 ===== */
.footer-copyright-extra {
    font-size: 0.8rem;
    color: #858796;
    line-height: 1.7;
    text-align: center;
}
.footer-copyright-top { margin-bottom: 0.5rem; }
.footer-copyright-bottom { margin-top: 0.5rem; }

/* ===== 背景音乐播放器 ===== */
.bgm-player {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #fff;
    border-radius: 2rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #eaecf4;
    max-width: 320px;
    transition: all 0.3s;
}
.bgm-player.collapsed { display: none; }
.bgm-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}
.bgm-toggle:hover { transform: scale(1.08); }
.bgm-toggle svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    display: block;
    flex-shrink: 0;
}
.bgm-toggle .bgm-icon-pause { display: none; }
.bgm-toggle.playing .bgm-icon-play { display: none; }
.bgm-toggle.playing .bgm-icon-pause { display: block; }
.bgm-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.bgm-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.bgm-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #3a3b45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.bgm-equalizer {
    display: none;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    flex-shrink: 0;
}
.bgm-player.playing .bgm-equalizer { display: flex; }
.bgm-equalizer span {
    width: 3px;
    background: linear-gradient(180deg, #4e73df, #224abe);
    border-radius: 1px;
    animation: bgm-eq 0.9s ease-in-out infinite;
    transform-origin: bottom;
}
.bgm-equalizer span:nth-child(1) { height: 40%; animation-delay: 0s; }
.bgm-equalizer span:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.bgm-equalizer span:nth-child(3) { height: 55%; animation-delay: 0.4s; }
@keyframes bgm-eq {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}
.bgm-progress {
    height: 3px;
    background: #eaecf4;
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}
.bgm-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4e73df, #224abe);
    border-radius: 2px;
    transition: width 0.1s linear;
}
.bgm-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #b7b9cc;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.2s;
}
.bgm-close:hover { background: #f3f4f7; color: #5a5c69; }
.bgm-reopen {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4e73df, #224abe);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(78,115,223,0.4);
    transition: transform 0.2s;
}
.bgm-reopen:hover { transform: scale(1.1); }
    .article-card .card-cover { height: 180px; }
}

/* ===== 分页样式 ===== */
.pagination-wrap {
    margin-top: 2rem;
    text-align: center;
}
.pagination-wrap nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
}
.pagination-wrap nav a,
.pagination-wrap nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #eaecf4;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    color: #5a5c69;
    text-decoration: none;
    background: #fff;
    transition: all 0.2s;
    font-weight: 500;
}
.pagination-wrap nav a:hover {
    background: #f0f4ff;
    border-color: #4e73df;
    color: #4e73df;
    transform: translateY(-1px);
}
.pagination-wrap nav span {
    background: linear-gradient(135deg, #4e73df, #224abe);
    border-color: #4e73df;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(78,115,223,0.3);
    cursor: default;
}

/* ===== 音乐播放器6个位置 ===== */
.bgm-player.bgm-pos-right-bottom  { right: 1.25rem; bottom: 1.25rem; left: auto; top: auto; }
.bgm-player.bgm-pos-right-center  { right: 1.25rem; top: 50%; transform: translateY(-50%); left: auto; bottom: auto; }
.bgm-player.bgm-pos-right-top     { right: 1.25rem; top: 5rem; left: auto; bottom: auto; }
.bgm-player.bgm-pos-left-bottom   { left: 1.25rem; bottom: 1.25rem; right: auto; top: auto; }
.bgm-player.bgm-pos-left-center   { left: 1.25rem; top: 50%; transform: translateY(-50%); right: auto; bottom: auto; }
.bgm-player.bgm-pos-left-top      { left: 1.25rem; top: 5rem; right: auto; bottom: auto; }
.bgm-reopen.bgm-pos-right-bottom  { right: 1.25rem; bottom: 1.25rem; left: auto; top: auto; }
.bgm-reopen.bgm-pos-right-center  { right: 1.25rem; top: 50%; transform: translateY(-50%); left: auto; bottom: auto; }
.bgm-reopen.bgm-pos-right-top     { right: 1.25rem; top: 5rem; left: auto; bottom: auto; }
.bgm-reopen.bgm-pos-left-bottom   { left: 1.25rem; bottom: 1.25rem; right: auto; top: auto; }
.bgm-reopen.bgm-pos-left-center   { left: 1.25rem; top: 50%; transform: translateY(-50%); right: auto; bottom: auto; }
.bgm-reopen.bgm-pos-left-top      { left: 1.25rem; top: 5rem; right: auto; bottom: auto; }

/* ===== 边栏顶部对齐 ===== */
.list-page-wrap .row > .col-lg-4,
.article-detail-wrap .row > .col-lg-4 {
    padding-top: 0;
}
.list-page-wrap .blog-sidebar,
.article-detail-wrap .blog-sidebar {
    margin-top: 0;
}
.list-page-wrap .blog-sidebar .sidebar-widget:first-child,
.article-detail-wrap .blog-sidebar .sidebar-widget:first-child {
    margin-top: 0;
}

/* ===== 搜索按钮（仅图标） ===== */
.widget-search .search-btn {
    padding: 0 0.75rem;
    min-width: 42px;
}
.widget-search .search-btn span { display: none; }

/* ===== 友情链接重设计 ===== */
.footer-links-outer .sidebar-widget {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}
.footer-links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.footer-links-outer .widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #3a3b45;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-links-outer .widget-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #4e73df, #224abe);
    border-radius: 2px;
}
.footer-links-outer .footer-links-apply {
    font-size: 0.8rem;
    color: #4e73df;
    margin-left: auto;
    font-weight: 400;
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    border: 1px solid #dce6ff;
    border-radius: 1rem;
    transition: all 0.2s;
}
.footer-links-outer .footer-links-apply:hover {
    background: #4e73df;
    color: #fff;
    border-color: #4e73df;
    text-decoration: none;
}
.footer-links-outer .link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.625rem;
}
.footer-links-outer .link-item a {
    display: block;
    padding: 0.6rem 0.875rem;
    font-size: 0.85rem;
    color: #5a5c69;
    text-decoration: none;
    background: #fff;
    border: 1px solid #eaecf4;
    border-radius: 0.4rem;
    transition: all 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.footer-links-outer .link-item a:hover {
    color: #4e73df;
    border-color: #4e73df;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(78,115,223,0.1);
}

/* ===== 极简列表模板装饰 ===== */
.minimal-log-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #eaecf4;
    overflow: hidden;
    counter-reset: log-counter;
}
.minimal-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f3f4f7;
    transition: all 0.2s;
    gap: 1rem;
    position: relative;
    counter-increment: log-counter;
}
.minimal-log-item::before {
    content: counter(log-counter, decimal-leading-zero);
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
    margin-right: 0.75rem;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4e73df, #224abe);
    border-radius: 0.3rem;
    transition: all 0.2s;
}
.minimal-log-item:nth-child(odd) { background: #fcfcfd; }
.minimal-log-item:last-child { border-bottom: none; }
.minimal-log-item:hover {
    background: #f0f4ff;
    padding-left: 1.5rem;
}
.minimal-log-item:hover::before {
    background: linear-gradient(135deg, #224abe, #1a3a8a);
    transform: scale(1.05);
}
.minimal-log-title {
    flex: 1;
    font-size: 0.95rem;
    color: #3a3b45;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    transition: color 0.2s;
}
.minimal-log-title:hover { color: #4e73df; }
.minimal-log-date {
    font-size: 0.78rem;
    color: #b7b9cc;
    flex-shrink: 0;
    font-family: 'Courier New', monospace;
    background: #f8f9fc;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
}

    /* 文章详情 */
    .article-detail-wrap { padding: 1.5rem 0 3rem; }
    .article-detail-card { padding: 1.25rem 1rem; }
    .article-detail-title { font-size: 1.3rem; }
    .article-detail-meta { gap: 0.75rem; font-size: 0.75rem; }
    .article-detail-body { font-size: 0.95rem; line-height: 1.8; }
    .article-detail-body h1 { font-size: 1.4rem !important; }
    .article-detail-body h2 { font-size: 1.2rem !important; }
    .article-detail-body h3 { font-size: 1.05rem !important; }

    /* 评论 */
    .comments-section { margin-top: 1.5rem; padding-top: 1rem; }
    .comments-title { font-size: 1.1rem; }
    .comment-item { gap: 0.75rem; padding: 1rem 0; }
    .comment-avatar { width: 36px; height: 36px; }
    .comment-children { margin-left: 1rem; padding-left: 0.75rem; }
    .comment-content { font-size: 0.85rem; }
    .comment-post-section { padding: 1.25rem 1rem; margin-bottom: 1.5rem; }
    .comment-post-title { font-size: 1.05rem; }
    .comment-fields { flex-direction: column; }
    .comment-fields input { min-width: 100%; }

    /* 侧边栏 */
    .blog-sidebar { margin-top: 2rem; }
    .sidebar-widget { margin-bottom: 1.25rem; }

    /* 页脚 */
    .site-footer { padding: 2rem 0 1.5rem; margin-top: 2rem; }
    .footer-stats { gap: 0.75rem; }
    .footer-stat-num { font-size: 1.25rem; }
    .footer-social { gap: 0.5rem; }
    .footer-social-link { width: 32px; height: 32px; }
    .footer-brand { font-size: 1rem; }

    /* 返回顶部 */
    .scroll-to-top { right: 1rem; bottom: 1rem; width: 2.25rem; height: 2.25rem; line-height: 2.25rem; }

    /* 登录弹窗 */
    .auth-modal { width: 95vw; max-width: 360px; }
    .auth-modal-card { padding: 1.5rem; }
}
@media (max-width: 480px) {
    .home-quote-text { font-size: 0.9rem; line-height: 1.8; }
    .article-detail-card { padding: 1rem 0.875rem; }
    .comment-post-section { padding: 1rem 0.875rem; }
}

/* 励志语单行居中 */
.home-quote-text {
    text-align: center;
    text-indent: 0;
}
.home-quote-text.single-line {
    text-align: center;
}
