/* ============================================
   前台展示样式
   ============================================ */

/* --- 前台导航栏 --- */
.front-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-on-glass);
    font-size: 1.15rem;
    font-weight: 400;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.navbar-brand:hover {
    text-decoration: none;
    color: #fff;
}

.navbar-brand-logo {
    width: 28px;
    height: 28px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar-nav a {
    padding: 6px 14px;
    color: var(--text-on-glass-muted);
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-on-glass);
    text-decoration: none;
}

.navbar-nav a.active {
    background: rgba(74, 143, 212, 0.25);
    border-bottom: 2px solid var(--win-blue-light);
}

/* --- 前台主体内容区 --- */
.front-main {
    padding-top: calc(var(--navbar-height) + 24px);
    padding-bottom: 40px;
    min-height: calc(100vh - 80px);
}

/* --- 首页：桌面布局 --- */
.home-grid,
.article-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 文章卡片 --- */
.post-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-window-light);
}

.post-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-window);
    transform: translateY(-3px);
}

.post-card-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-lighter);
    display: block;
}

.post-card-cover-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(43,87,151,0.3), rgba(26,90,58,0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-lighter);
}

.post-card-cover-placeholder svg {
    width: 48px;
    height: 48px;
    color: rgba(255,255,255,0.2);
}

.post-card-body {
    padding: 20px;
}

.post-card-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--win-blue-light);
    margin-bottom: 8px;
}

.post-card-category svg {
    width: 12px;
    height: 12px;
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-on-glass);
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-card-title a:hover {
    color: #6DB3F8;
    text-decoration: none;
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-on-glass-muted);
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.post-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-card-meta svg {
    width: 13px;
    height: 13px;
}

.post-card-featured {
    position: relative;
}

.post-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--win-blue-light), var(--color-success));
    z-index: 1;
}

/* --- 侧边栏 --- */
.front-sidebar .aero-card {
    margin-bottom: 20px;
}

.sidebar-section-title {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-on-glass);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-lighter);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--win-blue-light);
}

.sidebar-nav-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: var(--text-on-glass-muted);
    font-size: 0.88rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.sidebar-nav-list a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-on-glass);
    text-decoration: none;
    border-left-color: var(--win-blue-light);
}

.sidebar-nav-list a svg {
    width: 15px;
    height: 15px;
}

.sidebar-nav-list .count {
    margin-left: auto;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 8px;
    border-radius: 10px;
}

/* 最近文章列表 */
.recent-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.recent-post-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--win-blue-light);
    margin-top: 7px;
    flex-shrink: 0;
}

.recent-post-info {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    font-size: 0.85rem;
    color: var(--text-on-glass);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.recent-post-title:hover {
    color: #6DB3F8;
    text-decoration: none;
}

.recent-post-date {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
    margin-top: 2px;
}

/* --- 文章详情页 --- */
.article-window {
    max-width: 100%;
    padding: 0;
}

.article-content-window {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-window);
    overflow: hidden;
}

.article-header {
    padding: 24px 30px 16px;
    border-bottom: 1px solid var(--border-lighter);
}

.article-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-on-glass);
    line-height: 1.35;
    margin-bottom: 10px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-meta svg {
    width: 13px;
    height: 13px;
}

.article-cover {
    padding: 16px 30px 0;
    text-align: center;
}

.article-cover img {
    max-width: 65%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-lighter);
}

.article-body {
    padding: 20px 30px;
    color: rgba(255,255,255,0.82) !important;
    font-size: 14px !important;
    line-height: 1.75 !important;
}

/* 覆盖编辑器内联样式 */
.article-body * {
    font-size: inherit !important;
}

.article-body h1, .article-body h2, .article-body h3,
.article-body h4, .article-body h5, .article-body h6 {
    color: var(--text-on-glass);
    font-weight: 500;
    margin: 20px 0 10px;
}

.article-body h1 { font-size: 1.15rem !important; }
.article-body h2 {
    font-size: 1rem !important;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 18px 0 10px;
}

.article-body h3 {
    font-size: 0.92rem !important;
    margin: 14px 0 8px;
}

.article-body p {
    margin-bottom: 10px;
    font-size: 14px !important;
}

.article-body ul, .article-body ol {
    margin-bottom: 14px;
    padding-left: 22px;
}

.article-body li {
    margin-bottom: 4px;
    list-style: disc;
    line-height: 1.8;
}

.article-body ol li {
    list-style: decimal;
}

.article-body blockquote {
    border-left: 4px solid var(--win-blue-light);
    padding: 12px 20px;
    margin: 16px 0;
    background: rgba(74, 143, 212, 0.08);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

.article-body code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Consolas', 'Courier New', monospace;
}

.article-body pre {
    background: rgba(0,0,0,0.35);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--border-lighter);
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 16px 0;
    border: 1px solid var(--border-lighter);
}

.article-body a {
    color: var(--win-blue-light);
    border-bottom: 1px solid rgba(74,143,212,0.3);
}

.article-body a:hover {
    border-bottom-color: var(--win-blue-light);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.article-body th, .article-body td {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.15);
    text-align: left;
}

.article-body th {
    background: rgba(255,255,255,0.08);
    font-weight: 600;
}

/* 文章导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 40px;
    border-top: 1px solid var(--border-lighter);
    background: rgba(0,0,0,0.08);
}

.article-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-on-glass-muted);
    font-size: 0.85rem;
    text-decoration: none;
    max-width: 45%;
    transition: color var(--transition-fast);
}

.article-nav a:hover {
    color: var(--text-on-glass);
    text-decoration: none;
}

.article-nav .nav-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
}

.article-nav .nav-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- 归档/分类页：资源管理器样式 --- */
.archive-window {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.archive-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.archive-header svg {
    width: 24px;
    height: 24px;
    color: var(--win-blue-light);
}

.archive-header h1 {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-on-glass);
}

.archive-list {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-standard);
    -webkit-backdrop-filter: var(--blur-standard);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.archive-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background var(--transition-fast);
    text-decoration: none;
    color: var(--text-on-glass);
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-item:hover {
    background: rgba(255,255,255,0.08);
    text-decoration: none;
    color: var(--text-on-glass);
}

.archive-item svg {
    width: 20px;
    height: 20px;
    color: var(--win-blue-light);
    flex-shrink: 0;
}

.archive-item-info {
    flex: 1;
    min-width: 0;
}

.archive-item-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.archive-item-excerpt {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-item-date {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
}

.archive-item-views {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.archive-item-views svg {
    width: 12px;
    height: 12px;
}

/* --- 前台页脚 --- */
.front-footer {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.front-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

.front-footer-inner a {
    color: rgba(255,255,255,0.5);
}

.front-footer-inner a:hover {
    color: var(--text-on-glass);
}

/* --- 搜索结果页 --- */
.search-header {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-on-glass-muted);
    font-size: 0.9rem;
}

.search-header strong {
    color: var(--text-on-glass);
}

/* --- 响应式 --- */
@media (max-width: 960px) {
    .home-grid,
    .article-grid {
        grid-template-columns: 1fr;
    }

    .front-sidebar {
        order: 2;
    }
}

@media (max-width: 640px) {
    .front-navbar {
        padding: 0 12px;
    }

    .navbar-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .navbar-nav.mobile-open {
        display: flex;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: rgba(15, 25, 40, 0.95);
        backdrop-filter: var(--blur-heavy);
        flex-direction: column;
        padding: 8px;
        border-bottom: 1px solid var(--border-lighter);
    }

    .article-header {
        padding: 24px 20px 16px;
    }

    .article-body {
        padding: 24px 20px;
    }

    .article-nav {
        padding: 16px 20px;
        flex-direction: column;
    }

    .article-nav a {
        max-width: 100%;
    }

    .article-title {
        font-size: 1rem !important;
    }

    .front-footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

.mobile-menu-btn {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--border-lighter);
    border-radius: var(--radius-sm);
    color: var(--text-on-glass);
    cursor: pointer;
}
