/**
 * ModernMag Theme - Main Stylesheet
 * Author: Yojack
 * Version: 1.0.0
 */

/* ==================== 基础设置 Joe风格 ==================== */
:root {
    --theme: #409eff;
    --background: #fff;
    --main: #303133;
    --routine: #606266;
    --minor: #909399;
    --seat: #c0c4cc;
    --classA: #dcdfe6;
    --classB: #e4e7ed;
    --classC: #ebeef5;
    --classD: #f2f6fc;
    
    /* 统一样式变量 */
    --radius-wrap: 8px;
    --radius-inner: 4px;
    --card-border: 1px solid #e5e7eb;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --transition: all 0.35s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
    font-size: 14px;
    line-height: 2;
    color: var(--main);
    background-color: #f5f7f9;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--main);
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

a {
    color: var(--routine);
    text-decoration: none;
    transition: color 0.35s;
}

a:hover {
    color: var(--theme);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== 导航栏 Bootstrap + Joe风格 ==================== */
.modernmag-navbar {
    background: var(--background) !important;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
    padding: 0;
}

.modernmag-navbar .container {
    position: relative;
}

/* Logo */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 15px;
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    background: var(--classC);
    transform: translateY(-50%);
}

.navbar-brand img {
    max-width: 150px;
    max-height: 42px;
    object-fit: cover;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--main);
    transition: color 0.35s;
}

.navbar-brand:hover .logo-text {
    color: var(--theme);
}

/* 导航链接 */
.navbar-nav .nav-link {
    position: relative;
    height: 52px;
    line-height: 52px;
    font-size: 14px;
    padding: 0 15px !important;
    color: var(--main) !important;
    transition: color 0.35s;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: opacity 0.5s, transform 0.5s;
    border-radius: 6px 6px 0 0;
    opacity: 0;
    transform: scaleX(0.25);
    background: var(--theme);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--theme) !important;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Bootstrap 下拉菜单样式覆盖 */
.dropdown-menu {
    border: none;
    border-top: 3px solid var(--theme);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 var(--radius-inner) var(--radius-inner);
    padding: 10px 0;
    margin-top: 0;
}

.dropdown-item {
    padding: 8px 20px;
    color: var(--routine);
    font-size: 14px;
    transition: color 0.35s;
}

.dropdown-item:hover {
    background-color: transparent;
    color: var(--theme);
}

/* 搜索框 */
.modernmag-navbar .d-flex {
    position: relative;
}

.search-input {
    width: 200px;
    height: 36px;
    padding: 0 40px 0 12px !important;
    border: 1px solid var(--classC) !important;
    border-radius: var(--radius-inner) !important;
    font-size: 13px;
    color: var(--main);
    background: var(--background);
    transition: border-color 0.35s;
}

.search-input:focus {
    border-color: var(--theme) !important;
    box-shadow: none !important;
}

.search-input::placeholder {
    color: var(--minor);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--minor);
    padding: 0;
    transition: color 0.35s;
}

.search-btn:hover {
    color: var(--theme);
    background: transparent;
}

/* 用户登录入口 */
.modernmag-navbar .login-link {
    color: var(--minor);
    font-weight: 400;
    padding: 8px 15px !important;
    transition: color 0.3s ease;
    display: flex !important;
    align-items: center;
    height: 100%;
}

.modernmag-navbar .login-link:hover {
    color: var(--theme);
}

/* 用户菜单 */
.modernmag-navbar .user-menu .nav-link {
    color: var(--minor);
    font-weight: 400;
    padding: 8px 15px !important;
    transition: color 0.3s ease;
    display: flex !important;
    align-items: center;
    height: 100%;
}

.modernmag-navbar .user-menu .nav-link:hover {
    color: var(--theme);
}

.modernmag-navbar .user-menu .user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modernmag-navbar .user-menu .dropdown-menu {
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--classC);
    margin-top: 8px;
}

.modernmag-navbar .user-menu .dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.modernmag-navbar .user-menu .dropdown-item:hover {
    background: rgba(24, 144, 255, 0.1);
    color: var(--theme);
}

.modernmag-navbar .user-menu .dropdown-item i {
    width: 20px;
    text-align: center;
}

/* 移动端汉堡按钮 */
.navbar-toggler {
    border-color: var(--classC);
    font-size: 14px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.navbar-toggler:focus {
    box-shadow: none;
    border-color: var(--theme);
}

.navbar-toggler-icon {
    width: 18px;
    height: 18px;
}

/* 移动端适配 */
@media (max-width: 991px) {
    .navbar-brand::after {
        display: none;
    }
    
    .navbar-nav .nav-link {
        height: auto;
        line-height: normal;
        padding: 10px 15px !important;
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .modernmag-navbar .d-flex {
        margin-top: 10px;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .modernmag-navbar .login-link,
    .modernmag-navbar .user-menu .nav-link {
        margin-top: 10px;
        display: inline-block;
    }
    
    .modernmag-navbar .user-menu .dropdown-menu {
        margin-top: 10px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background: var(--classD);
        margin-left: 15px;
    }
    
    .dropdown-item {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .navbar-collapse {
        border-top: 1px solid var(--classC);
        margin-top: 10px;
        padding-top: 10px;
    }
}

/* ==================== Banner横幅 Joe风格 ==================== */
.joe-banner {
    padding: 20px 0;
}

.banner-wrapper {
    position: relative;
    height: 280px;
    border-radius: var(--radius-wrap);
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.7) 0%, rgba(118, 75, 162, 0.7) 100%);
}

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 0 30px;
}

.banner-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: white;
    letter-spacing: 1px;
}

.banner-subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.95;
    color: white;
    letter-spacing: 0.5px;
}

/* ==================== 主要内容区 Joe风格 ==================== */
.modernmag-main {
    padding: var(--spacing-md) 0;
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--spacing-sm) 16px;
    margin-bottom: var(--spacing-md);
    font-size: 13px;
    color: #64748b;
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-inner);
    box-shadow: var(--card-shadow);
}

.breadcrumb-item {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-item:hover {
    color: var(--theme);
}

.breadcrumb-item i {
    font-size: 14px;
}

.breadcrumb-separator {
    color: #cbd5e1;
    margin: 0 4px;
}

.breadcrumb-current {
    color: #1a202c;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

/* ==================== 文章列表 卡片式布局 ==================== */
.posts-wrapper {
    background: transparent;
}

.post-card {
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-wrap);
    box-shadow: var(--card-shadow);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    display: flex;
    transition: var(--transition);
    position: relative;
    height: 200px;
}

.post-card:hover {
    border-color: #d1d5db;
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.post-card.post-featured {
    border: 2px solid var(--theme);
}

/* 缩略图 - 固定尺寸 */
.post-thumb {
    width: 280px;
    height: 200px;
    min-width: 280px;
    min-height: 200px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    background: var(--classD);
}

.post-thumb img {
    width: 280px;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(to right, #fc712a, #f84c39);
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: var(--radius-inner);
    z-index: 1;
}

/* 文章内容 */
.post-content {
    flex: 1;
    padding: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    height: 200px;
    overflow: hidden;
    justify-content: space-between;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.post-category-tag {
    flex-shrink: 0;
}

.post-category-tag a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: #64748b;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 400;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.post-category-tag a:hover {
    background: #e2e8f0;
    color: #475569;
}

.post-category-tag a i {
    font-size: 11px;
}

.post-title {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 600;
    margin: 0;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    min-height: 0;
}

.post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.post-title a:hover {
    color: var(--theme);
}

.post-excerpt {
    font-size: 13px;
    line-height: 1.75;
    color: #64748b;
    margin-bottom: 12px;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    min-height: 0;
    max-height: calc(13px * 1.75 * 3);
    letter-spacing: 0.2px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    transition: color 0.3s;
}

.post-meta .meta-item:hover {
    color: var(--theme);
}

.post-meta i {
    font-size: 13px;
    opacity: 0.7;
}

/* 无缩略图时的布局 */
.post-card:not(:has(.post-thumb)) {
    height: 200px;
}

.post-card:not(:has(.post-thumb)) .post-content {
    padding: var(--spacing-sm);
    height: 200px;
}

/* ==================== 文章详情页 ==================== */
.article-single {
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-wrap);
    padding: var(--spacing-md);
    box-shadow: var(--card-shadow);
    margin-bottom: var(--spacing-md);
}

.article-header {
    border-bottom: 1px solid #f1f5f9;
}

.article-title {
    font-size: 28px;
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.4;
    color: #1a202c;
    font-weight: 700;
}

.article-meta-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #64748b;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s;
}

.meta-author:hover {
    color: var(--theme);
}

.meta-author i {
    font-size: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    font-size: 14px;
    opacity: 0.8;
}

.article-featured-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.article-content {
    font-size: 15px;
    line-height: 2;
    color: var(--routine);
    margin: 20px 0;
}

.article-content img {
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-muted);
}

/* ==================== ModernMag 代码高亮样式 ==================== */
/* 确保插件样式不被覆盖 */
.article-content .code-wrapper {
    margin: var(--spacing-md) 0 !important;
}

.article-content .code-wrapper pre {
    margin: 0 !important;
}

/* 文章标签 */
.article-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #f1f5f9;
    margin-top: var(--spacing-lg);
}

.article-tags i {
    color: #64748b;
    font-size: 15px;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.article-tag:hover {
    background: var(--theme);
    color: white;
}

/* 文章底部 - 上一篇 */
.article-footer {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #f1f5f9;
    margin: var(--spacing-lg) 0;
}

.article-nav-title {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.article-nav-link {
    font-size: 15px;
    color: #1a202c;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
}

.article-nav-link:hover {
    color: var(--theme);
}

.no-article {
    font-size: 14px;
    color: #94a3b8;
}

/* 相关推荐 */
.related-posts {
    padding: var(--spacing-md) 0;
}

.related-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: var(--spacing-md);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item a {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 8px 0;
}

.related-item a:hover {
    color: var(--theme);
}


/* ==================== 评论区 Joe风格 ==================== */
.comments-area {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid #f1f5f9;
}

.comments-title {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    color: #1a202c;
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: var(--classD);
    border-radius: var(--radius-inner);
    margin-bottom: 12px;
    transition: background 0.35s;
}

.comment-item:hover {
    background: var(--classC);
}

.comment-item.comment-pending {
    opacity: 0.7;
}

.comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.comment-body {
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.comment-author {
    font-weight: 600;
    color: var(--main);
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: var(--minor);
}

.comment-content {
    line-height: 1.8;
    margin-bottom: 10px;
    color: var(--routine);
    font-size: 14px;
}

.comment-actions {
    display: flex;
    gap: 1rem;
}

.comment-reply {
    font-size: 13px;
    color: var(--theme);
    cursor: pointer;
    transition: color 0.35s;
}

.comment-reply:hover {
    color: #096dd9;
}

.comment-children {
    margin-top: 1rem;
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.comment-child {
    background: white;
}

.comment-child .comment-avatar img {
    width: 36px;
    height: 36px;
}

.comment-form-wrapper {
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-wrap);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-shadow);
}

.comment-form-title {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--main);
}

.verify-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
}

/* ==================== 侧边栏 ==================== */
.modernmag-sidebar {
    position: sticky;
    top: 70px;
}

/* 第一个侧边栏小部件不需要上边距 */
.sidebar-widget:first-child {
    margin-top: 0;
}

.sidebar-widget {
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-wrap);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-shadow);
}

.widget-title {
    font-size: 15px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--classC);
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--main);
    position: relative;
}

.widget-title i {
    margin-right: 6px;
    color: var(--theme);
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--theme);
    border-radius: 1px;
}

.widget-content {
}

/* 空状态文本 - 白色背景 */
.sidebar-widget .text-muted,
.sidebar-widget .category-item .text-muted,
.sidebar-widget .archive-item .text-muted {
    display: block;
    padding: 12px;
    background: #ffffff;
    border-radius: var(--radius-inner);
    color: var(--minor);
    text-align: center;
    font-size: 14px;
}

/* 暂无文章 - 卡片样式 */
.no-posts {
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-wrap);
    box-shadow: var(--card-shadow);
    padding: 40px var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.no-posts .text-muted {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 15px;
    color: var(--minor);
}

/* 侧边栏搜索框 */
.search-widget {
    background: #ffffff;
    padding: var(--spacing-md);
}

.sidebar-search-form {
    position: relative;
}

.sidebar-search-form .form-control {
    width: 100%;
    height: 36px;
    padding: 0 40px 0 12px;
    border: 1px solid var(--classC);
    border-radius: var(--radius-inner);
    font-size: 13px;
}

.sidebar-search-form .form-control:focus {
    border-color: var(--theme);
    box-shadow: none;
}

.sidebar-search-form .btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--minor);
    padding: 0;
}

.sidebar-search-form .btn:hover {
    color: var(--theme);
    background: transparent;
}

/* 热门文章 */
.hot-posts-list {
}

.hot-post-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--classD);
}

.hot-post-item:first-child {
    padding-top: 0;
}

.hot-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--classD);
    color: var(--minor);
    border-radius: var(--radius-inner);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.hot-post-item:nth-child(1) .post-rank {
    background: linear-gradient(to right, #fc712a, #f84c39);
    color: white;
}

.hot-post-item:nth-child(2) .post-rank {
    background: linear-gradient(to right, #ff9800, #ff5722);
    color: white;
}

.hot-post-item:nth-child(3) .post-rank {
    background: linear-gradient(to right, #ffb74d, #ffa726);
    color: white;
}

.post-info {
    flex: 1;
    min-width: 0;
}

.hot-post-item .post-title {
    font-size: 13px;
    margin-bottom: 4px;
    line-height: 1.6;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-post-item .post-title a {
    color: var(--routine);
}

.hot-post-item .post-title a:hover {
    color: var(--theme);
}

.hot-post-item .post-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--minor);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 分类列表 */
.category-list {
    margin: 0;
    padding: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--classD);
    border-radius: var(--radius-inner);
    color: var(--routine);
    transition: all 0.35s;
}

.category-link:hover {
    background: var(--theme);
    color: white;
}

.category-link i {
    margin-right: 6px;
    font-size: 14px;
}

.category-name {
    flex: 1;
    font-size: 14px;
}

.category-count {
    margin-left: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.category-link:hover .category-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding:0 12px;
    color: white !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.tag-item::before {
    content: '#';
    margin-right: 2px;
    opacity: 0.8;
}

.tag-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* 标签随机颜色 - 12种渐变色 */
.tag-color-1 { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.tag-color-2 { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.tag-color-3 { 
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.tag-color-4 { 
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.tag-color-5 { 
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.tag-color-6 { 
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}
.tag-color-7 { 
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}
.tag-color-8 { 
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}
.tag-color-9 { 
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}
.tag-color-10 { 
    background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%);
}
.tag-color-11 { 
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
}
.tag-color-12 { 
    background: linear-gradient(135deg, #f8b195 0%, #f67280 100%);
}

/* 标签云小部件特殊样式 */
.tag-cloud-widget .widget-content {
    padding-top: 10px;
}

/* 归档列表 */
.archive-list {
    margin: 0;
    padding: 0;
}

.archive-item {
    margin-bottom: 8px;
}

.archive-item:last-child {
    margin-bottom: 0;
}

.archive-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--classD);
    border-radius: var(--radius-inner);
    color: var(--routine);
    transition: all 0.35s;
    text-decoration: none;
}

.archive-link:hover {
    background: var(--theme);
    color: white;
}

.archive-link i {
    margin-right: 8px;
    flex-shrink: 0;
    font-size: 14px;
}

.archive-text {
    flex: 1;
    color: var(--routine);
    font-size: 14px;
    line-height: 1.5;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-link:hover .archive-text {
    color: white;
}

.archive-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    flex-shrink: 0;
}

.archive-link:hover .archive-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ==================== 分页 Joe风格 ==================== */
.pagination-wrapper {
    margin-top: 20px;
}

.pagination {
    gap: 8px;
    justify-content: center;
}

.page-item {
    margin: 0;
}

.page-link {
    border: 1px solid var(--classC);
    background: var(--background);
    color: var(--routine);
    padding: 6px 12px;
    border-radius: var(--radius-inner);
    transition: all 0.35s;
    min-width: 36px;
    text-align: center;
}

.page-link:hover {
    background: var(--theme);
    border-color: var(--theme);
    color: white;
}

.page-item.active .page-link {
    background: var(--theme);
    border-color: var(--theme);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--classD);
}

.pagination-info {
    margin-top: 10px;
    text-align: center;
    color: var(--minor);
    font-size: 13px;
}

/* ==================== 页脚 Joe风格 ==================== */
.modernmag-footer {
    background: var(--background);
    border-top: 1px solid var(--classC);
}

.footer-content {
    padding: 20px 0;
}

.footer-title {
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--main);
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--theme);
}

.footer-about p {
    line-height: 1.8;
    color: var(--routine);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--classD);
    color: var(--routine);
    border-radius: var(--radius-inner);
    transition: all 0.35s;
}

.social-link:hover {
    background: var(--theme);
    color: white;
    transform: translateY(-2px);
}

.footer-posts {
}

.footer-post-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-post-item:last-child {
    border-bottom: none;
}

.footer-post-link {
    color: var(--routine);
    transition: color 0.35s;
    font-size: 14px;
}

.footer-post-link:hover {
    color: var(--theme);
}

.footer-post-link i {
    margin-right: 4px;
    font-size: 12px;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags .tag-link {
    display: inline-block;
    padding: 4px 10px;
    background: var(--classD);
    color: var(--routine);
    border-radius: var(--radius-inner);
    font-size: 13px;
    transition: all 0.35s;
}

.footer-tags .tag-link:hover {
    background: var(--theme);
    color: white;
}

.footer-bottom {
    margin: 0;
    padding: 0;
}

.footer-bottom p {
    margin: 0;
    color: var(--minor);
    font-size: 13px;
    line-height: 1.8;
}

.footer-bottom a {
    color: var(--routine);
    transition: color 0.35s;
}

.footer-bottom a:hover {
    color: var(--theme);
}

.footer-stats {
    color: var(--minor);
    font-size: 13px;
}

.footer-stats span {
    margin: 0 8px;
}

.footer-stats i {
    margin-right: 4px;
}

/* ==================== 返回顶部 Joe风格 ==================== */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 45px;
    height: 45px;
    background: var(--theme);
    color: white;
    border-radius: var(--radius-inner);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.35s;
}

.back-to-top:hover {
    background: #096dd9;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    display: flex;
}

/* ==================== 搜索结果页 ==================== */
.search-header-wrapper {
    background: #ffffff;
    border: var(--card-border);
    border-radius: var(--radius-wrap);
    box-shadow: var(--card-shadow);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-title i {
    font-size: 26px;
    color: var(--theme);
}

.search-info {
    font-size: 14px;
    color: #64748b;
    margin-bottom: var(--spacing-md);
}

.search-info strong {
    color: var(--theme);
}

.page-search-form {
    display: flex;
    gap: 10px;
}

.page-search-form .search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-inner);
    font-size: 14px;
    transition: all 0.3s;
}

.page-search-form .search-input:focus {
    outline: none;
    border-color: var(--theme);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.page-search-form .search-btn {
    height: 44px;
    padding: 0 24px;
    background: var(--theme);
    color: white;
    border: none;
    border-radius: var(--radius-inner);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-search-form .search-btn:hover {
    background: #096dd9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.page-search-form .search-btn i {
    font-size: 16px;
}

/* ==================== 404 页面 ==================== */
.error-404-page {
    padding: 4rem 0;
    text-align: center;
}

.error-code {
    font-size: 10rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==================== 响应式设计 Bootstrap ==================== */

/* 大屏幕 >= 1200px */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* 中等屏幕 768px - 991px (平板) */
@media (max-width: 991px) {
    .banner-title {
        font-size: 2rem;
    }
    
    .banner-subtitle {
        font-size: 1rem;
    }
    
    .modernmag-banner {
        padding: 80px 0;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-single {
        padding: 0.5rem;
    }
    
    .modernmag-sidebar {
        position: static;
        margin-top: 1rem;
    }
    
    .error-code {
        font-size: 6rem;
    }
}

/* 小屏幕 < 768px (手机) */
@media (max-width: 767px) {
    .banner-wrapper {
        height: 180px !important;
    }
    
    .banner-title {
        font-size: 24px;
    }
    
    .banner-subtitle {
        font-size: 14px;
    }
    
    /* 卡片布局改为上下排列 */
    .post-card {
        flex-direction: column;
        height: auto;
        min-height: 200px;
    }
    
    .post-thumb {
        width: 100%;
        height: 180px;
        min-width: 100%;
    }
    
    .post-thumb img {
        width: 100%;
        height: 180px;
    }
    
    .post-content {
        padding: 12px;
        height: auto;
        min-height: 0;
    }
    
    .post-header {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .post-title {
        font-size: 16px;
        width: 100%;
    }
    
    .post-excerpt {
        margin-bottom: 12px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        max-height: calc(13px * 1.75 * 3);
    }
    
    .post-header {
        align-items: center;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 12px;
        margin-top: 8px;
    }
    
    .article-single {
        padding: 12px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .sidebar-widget {
        padding: 15px;
    }
    
    .comment-item {
        padding: 12px;
        gap: 10px;
    }
    
    .comment-children {
        margin-left: 10px;
        padding-left: 10px;
    }
    
    .comment-form-wrapper {
        padding: 15px;
    }
    
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .footer-content {
        padding: 20px 0 15px;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* 超小屏幕 < 576px */
@media (max-width: 575px) {
    .banner-wrapper {
        height: 150px !important;
    }
    
    .banner-title {
        font-size: 20px;
    }
    
    .banner-subtitle {
        font-size: 13px;
    }
    
    .post-item {
        padding: 12px 8px;
    }
    
    .post-item.post-featured {
        margin: 0 -8px;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .posts-wrapper {
        padding: 0;
    }
    
    .article-single {
        padding: 12px;
    }
    
    .sidebar-widget {
        padding: 12px;
    }
    
    .widget-title {
        font-size: 14px;
    }
    
    .comment-avatar img {
        width: 36px !important;
        height: 36px !important;
    }
}

/* ==================== 打印样式 ==================== */
@media print {
    .navbar,
    .modernmag-banner,
    .modernmag-sidebar,
    .article-navigation,
    .comments-area,
    .back-to-top,
    .modernmag-footer {
        display: none !important;
    }
    
    .article-single {
        box-shadow: none;
        padding: 0;
    }
}

