/* 新闻列表页 */
.news-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0;
}

/* 左右布局 */
.news-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* 左侧边栏 */
.news-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

/* 移动端工具栏（搜索+图标按钮）：桌面端隐藏 */
.news-toolbar {
    display: none;
}

/* 侧边栏作者卡片：头像 + 统计数字 */
.news-author-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

body.light-mode .news-author-card {
    border-color: rgba(0, 0, 0, 0.09);
    background: rgba(255, 255, 255, 0.65);
}

.news-author-card:hover {
    border-color: rgba(86, 156, 214, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

body.light-mode .news-author-card:hover {
    box-shadow: 0 8px 24px rgba(43, 108, 176, 0.12);
}

.news-author-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

body.light-mode .news-author-card-top {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.news-author-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid transparent;
    background:
        linear-gradient(#0d0d0d, #0d0d0d) padding-box,
        linear-gradient(135deg, #569cd6, #c586c0 55%, #6a9955) border-box;
}

body.light-mode .news-author-card-avatar {
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #2b6cb0, #805ad5 55%, #2f855a) border-box;
}

.news-author-card-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #569cd6;
}

body.light-mode .news-author-card-fallback {
    color: #2b6cb0;
}

.news-author-card-info {
    min-width: 0;
}

.news-author-card-name {
    font-size: 1rem;
    font-weight: 600;
}

.news-author-card-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--text-secondary, #888);
}

.news-author-card-hint i {
    width: 12px;
    height: 12px;
    color: #569cd6;
}

.news-author-card:hover .news-author-card-hint {
    color: #569cd6;
}

.news-author-card-stats {
    display: flex;
    gap: 12px;
    padding-top: 14px;
}

.news-author-card-stat {
    flex: 1;
}

.news-author-card-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: #569cd6;
    line-height: 1.2;
}

body.light-mode .news-author-card-num {
    color: #2b6cb0;
}

.news-author-card-label {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--text-secondary, #888);
}

/* 搜索框 */
.news-search {
    margin-bottom: 24px;
}

.search-input-wrap {
    display: flex;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    transition: border-color 0.2s;
}

body.light-mode .search-input-wrap {
    border-color: rgba(0,0,0,0.15);
    background: rgba(0,0,0,0.03);
}

.search-input-wrap:focus-within {
    border-color: var(--accent-color, #6a9955);
}

.news-search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 0.9rem;
    outline: none;
    font-family: inherit;
}

.news-search-btn {
    flex-shrink: 0;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.news-search-btn i {
    width: 18px;
    height: 18px;
}

/* 分类列表 */
.news-categories {
    margin-bottom: 24px;
}

.news-categories h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #888);
    margin-bottom: 10px;
    padding: 0 4px;
}

.news-cat-item {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 2px;
}

.news-cat-item:hover {
    background: rgba(86, 156, 214, 0.15);
    color: #569cd6;
}

body.light-mode .news-cat-item:hover {
    background: rgba(86, 156, 214, 0.1);
    color: #2b6cb0;
}

.news-cat-item.active {
    background: rgba(86, 156, 214, 0.2);
    color: #569cd6;
    border-left: 3px solid #569cd6;
    padding-left: 9px;
}

body.light-mode .news-cat-item.active {
    background: rgba(86, 156, 214, 0.15);
    color: #2b6cb0;
}

/* 日历 */
.news-calendar {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 16px;
}

body.light-mode .news-calendar {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-month-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.calendar-nav-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.calendar-nav-btn:hover {
    background: rgba(255,255,255,0.1);
}

body.light-mode .calendar-nav-btn:hover {
    background: rgba(0,0,0,0.08);
}

.calendar-nav-btn i {
    width: 16px;
    height: 16px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.calendar-weekday {
    font-size: 0.7rem;
    color: var(--text-secondary, #888);
    padding: 4px 0;
}

.calendar-day {
    font-size: 0.8rem;
    padding: 6px 0;
    border-radius: 4px;
    color: var(--text-secondary, #666);
}

.calendar-day.has-article {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    transition: background 0.2s;
}

.calendar-day.has-article:hover {
    background: rgba(59, 130, 246, 0.3);
}

.calendar-day.has-article.selected {
    background: var(--accent-color, #6a9955);
    color: #fff;
}

.calendar-day.today {
    border: 1px solid var(--accent-color, #6a9955);
}

.calendar-clear-btn {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--accent-color, #6a9955);
    text-decoration: none;
}

.calendar-clear-btn:hover {
    text-decoration: underline;
}

/* 右侧文章列表 */
.news-list {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
}

/* --- News Card: Modern Neo-Editorial --- */
.news-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    text-decoration: none;
    color: inherit;
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    animation: newsCardIn 0.45s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
}

@keyframes newsCardIn {
    to { opacity: 1; transform: translateY(0); }
}

body.light-mode .news-card {
    border-color: rgba(0,0,0,0.07);
    background: rgba(255,255,255,0.5);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.news-card:hover {
    border-color: var(--cat-color, #6a9955);
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15), 0 0 0 1px var(--cat-color, #6a9955);
}

body.light-mode .news-card:hover {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08), 0 0 0 1px var(--cat-color, #569cd6);
}

/* Left accent bar */
.news-card-accent {
    width: 3px;
    flex-shrink: 0;
    background: var(--cat-color, #6a9955);
    border-radius: 0;
    opacity: 0.5;
    transition: opacity 0.25s, width 0.25s;
}

.news-card:hover .news-card-accent {
    opacity: 1;
    width: 4px;
}

/* Featured (pinned) card */
.news-card-featured {
    display: flex;
    flex-direction: row;
    border-color: rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
}

body.light-mode .news-card-featured {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.7);
}

.news-card-featured:hover {
    border-color: var(--cat-color, #6a9955);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2), 0 0 0 1px var(--cat-color, #6a9955);
}

body.light-mode .news-card-featured:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 0 0 1px var(--cat-color, #569cd6);
}

/* Left image area - matches software card style */
.news-card-image {
    flex: 0 0 30%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.15);
}

.news-card-image-placeholder i {
    width: 40px;
    height: 40px;
}

.news-card-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 2;
}

.news-card:hover .news-card-thumb-overlay {
    opacity: 1;
}

/* Date badge on image bottom-right */
.news-card-date-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    min-width: 44px;
    border-top: 3px solid #2563eb;
}

.news-date-day {
    font-size: 28px;
    font-weight: 800;
    color: #1e40af;
    line-height: 1.15;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.news-date-month {
    font-size: 10px;
    font-weight: 600;
    color: #3b82f6;
    letter-spacing: 0.3px;
    margin-top: 2px;
    padding-top: 3px;
    border-top: 1px solid rgba(37, 99, 235, 0.15);
}

body.light-mode .news-card-date-badge {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .news-date-day {
    color: #1d4ed8;
}

body.light-mode .news-date-month {
    color: #2563eb;
}

/* Category tag on thumbnail top-left */
.news-card-cat-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 10px;
    z-index: 3;
}

.news-card-body-featured {
    padding: 14px 18px 5px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.news-card-title-lg {
    font-size: 1.1rem !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    -webkit-line-clamp: 3 !important;
    flex-shrink: 0;
}

/* Body */
.news-card-body {
    flex: 1;
    min-width: 0;
    padding: 14px 18px 5px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.news-card-top-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-card-pin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ce9178;
    background: rgba(206, 145, 120, 0.12);
    padding: 3px 10px;
}

.news-card-pin i {
    width: 12px;
    height: 12px;
}

.news-card-title {
    font-size: 1.15rem;
    line-height: 1.2;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.news-card:hover .news-card-title {
    color: var(--cat-color, #6a9955);
}

.news-card-summary {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary, #999);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.light-mode .news-card-summary {
    color: #777;
}

/* Bottom meta */
.news-card-bottom-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    font-size: 0.78rem;
    color: var(--text-secondary, #777);
    margin-top: auto;
    flex-shrink: 0;
}

.news-card-source {
    color: var(--text-secondary, #888);
    opacity: 0.7;
}

.news-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #888);
}

.news-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.news-empty p {
    font-size: 1rem;
}

/* 分页导航样式 */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 16px 0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.pagination-item:hover:not(.disabled):not(.active) {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.pagination-item.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.45);
    transform: scale(1.1);
}

.pagination-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: none;
}

.pagination-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px 24px;
    background: var(--card-bg);
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    display: inline-block;
}

body.light-mode .pagination-info {
    background: #ffffff;
    border-color: #e5e7eb;
}

@media (max-width: 768px) {
    .pagination-item {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .pagination-wrapper {
        padding: 12px 0;
        gap: 16px;
        margin-top: 24px;
    }

    .pagination-info {
        font-size: 12px;
        padding: 10px 16px;
    }

    .pagination {
        gap: 4px;
    }
}

/* 详情页统一容器 */
.news-article-container {
    padding: 20px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* 后台预览模式提示条 */
.news-preview-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    border: 1px dashed rgba(86, 156, 214, 0.5);
    border-radius: 10px;
    background: rgba(86, 156, 214, 0.08);
    color: #569cd6;
    font-size: 0.85rem;
}

.news-preview-banner i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

body.light-mode .news-article-container {
    border-color: rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.6);
}

.news-article-title {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.news-article-summary {
    font-size: 0.95rem;
    color: var(--text-secondary, #aaa);
    line-height: 1.6;
    margin-bottom: 12px;
}

body.light-mode .news-article-summary {
    color: #666;
}

.news-article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
}

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

.news-meta-item i {
    width: 14px;
    height: 14px;
}

.news-meta-item a {
    color: #569cd6;
    text-decoration: none;
}

.news-meta-item a:hover {
    text-decoration: underline;
}

.news-meta-tag {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    background: rgba(86,156,214,0.15);
    color: #569cd6;
}

body.light-mode .news-meta-tag {
    background: rgba(86,156,214,0.12);
    color: #2b6cb0;
}

.news-article-divider {
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .news-article-divider {
    border-color: rgba(0,0,0,0.08);
}

/* 详情页视频区域 */
.news-video-wrap {
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    margin-bottom: 4px;
}

.news-video-thumbnail {
    position: relative;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.news-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.news-video-play-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.news-video-play-btn i {
    width: 28px;
    height: 28px;
    color: #fff;
}

.news-video-wrap iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border: none;
}

/* 详情页正文 */
.news-article-body {
    font-size: 0.95rem;
    line-height: 1.8;
    color: inherit;
    padding: 8px 0;
}

/* 正文标题层级：h1(1.6rem) > h2(1.25rem) > h3(1.05rem)，与页面大标题(1.5rem)明显区分 */
.news-article-body h1,
.news-article-body h2,
.news-article-body h3 {
    font-weight: 700;
    color: inherit;
    line-height: 1.4;
}

.news-article-body h1 {
    font-size: 1.6rem;
    margin: 32px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .news-article-body h1 {
    border-color: rgba(0,0,0,0.1);
}

.news-article-body h2 {
    font-size: 1.25rem;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.light-mode .news-article-body h2 {
    border-color: rgba(0,0,0,0.1);
}

.news-article-body h3 {
    font-size: 1.05rem;
    margin: 20px 0 10px;
    color: #999; /* 深色主题下 #666 过暗，用 #999 保证可读 */
}

body.light-mode .news-article-body h3 {
    color: #666; /* 浅色主题按需求使用 #666 */
}

.news-article-body p {
    margin-bottom: 12px;
}

.news-article-body ul, .news-article-body ol {
    margin: 12px 0;
    padding-left: 24px;
}

.news-article-body li {
    margin-bottom: 6px;
}

.news-article-body blockquote {
    border-left: 3px solid #569cd6;
    padding: 8px 16px;
    margin: 12px 0;
    background: rgba(86,156,214,0.08);
    border-radius: 0 6px 6px 0;
}

.news-article-body pre {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 0.85rem;
}

body.light-mode .news-article-body pre {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.1);
}

.news-article-body code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.news-article-body p code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

body.light-mode .news-article-body p code {
    background: rgba(0,0,0,0.08);
}

.news-article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px auto;
}

.news-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.news-article-body th, .news-article-body td {
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 12px;
    text-align: left;
}

body.light-mode .news-article-body th,
body.light-mode .news-article-body td {
    border-color: rgba(0,0,0,0.12);
}

.news-article-body th {
    background: rgba(255,255,255,0.05);
    font-weight: 600;
}

.news-article-body a {
    color: #569cd6;
    text-decoration: none;
}

.news-article-body a:hover {
    text-decoration: underline;
}

/* 详情页作者信息（头像 + 名字，点击进入作者主页） */
.news-meta-author {
    display: flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font-size: 0.8rem;
}

.news-meta-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

body.light-mode .news-meta-author-avatar {
    border-color: rgba(0, 0, 0, 0.12);
}

.news-meta-author-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(86, 156, 214, 0.18);
    color: #569cd6;
}

body.light-mode .news-meta-author-fallback {
    background: rgba(86, 156, 214, 0.12);
    color: #2b6cb0;
}

.news-meta-author-name {
    color: #569cd6;
}

body.light-mode .news-meta-author-name {
    color: #2b6cb0;
}

.news-meta-author:hover .news-meta-author-name {
    text-decoration: underline;
}

/* 详情页底部：最新文章列表 */
.news-latest {
    margin-top: 6px;
}

.news-latest-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.news-latest-head i {
    width: 18px;
    height: 18px;
    color: #569cd6;
}

body.light-mode .news-latest-head i {
    color: #2b6cb0;
}

.news-latest-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    transition: padding-left 0.2s, color 0.15s;
}

body.light-mode .news-latest-item {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.news-latest-item:hover {
    padding-left: 10px;
    color: #569cd6;
}

.news-latest-item-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-latest-item-date {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-secondary, #888);
}

.news-latest-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #569cd6;
    text-decoration: none;
}

.news-latest-more i {
    width: 14px;
    height: 14px;
}

.news-latest-more:hover {
    text-decoration: underline;
}

/* 上下篇导航 */
.news-article-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 0;
}

.news-article-nav .nav-prev,
.news-article-nav .nav-next {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-article-nav .nav-next {
    text-align: right;
    text-decoration: none;
    color: inherit;
}

.news-article-nav .nav-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-article-nav .nav-title {
    font-size: 0.9rem;
    color: #569cd6;
}

/* 响应式 */
@media (max-width: 768px) {
    .news-page {
        padding: 24px 12px;
    }

    .news-layout {
        flex-direction: column;
    }

    /* 正文列去掉自身内边距，避免与页面边距叠加导致左右空白过大 */
    .news-list {
        padding: 0;
    }

    /* 侧边栏：一行式工具栏（搜索 + 分类/日历图标按钮），面板在下方整行展开 */
    .news-sidebar {
        width: 100%;
        position: static;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .news-toolbar-row {
        display: flex;
        align-items: stretch;
        gap: 8px;
    }

    .news-search {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .news-toolbar {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }

    .news-toolbar-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        padding: 0 12px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 10px;
        color: inherit;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
    }

    body.light-mode .news-toolbar-btn {
        background: rgba(0,0,0,0.03);
        border-color: rgba(0,0,0,0.12);
    }

    .news-toolbar-btn.active {
        background: rgba(86, 156, 214, 0.18);
        border-color: rgba(86, 156, 214, 0.5);
        color: #569cd6;
    }

    .news-toolbar-icon {
        width: 20px;
        height: 20px;
    }

    /* 分类/日历面板：整行宽度，默认折叠（0fr），展开时撑开 */
    .news-widget {
        width: 100%;
    }

    .news-calendar {
        width: 100%;
        padding: 0;
    }

    /* 折叠内容：grid 0fr → 1fr 平滑展开收起 */
    .news-widget-body {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 0.3s ease;
    }

    .news-widget.open .news-widget-body {
        grid-template-rows: 1fr;
    }

    .news-widget-inner {
        overflow: hidden;
        min-height: 0;
        padding: 0 16px;
    }

    .news-widget.open .news-widget-inner {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    /* 移动端标题栏已显示"分类"，面板内的 h3 不再重复 */
    .news-widget-inner h3 {
        display: none;
    }

    /* 文章卡片：图片在上、标题在下 */
    .news-card {
        flex-direction: column;
    }

    .news-card-featured {
        flex-direction: column;
    }

    .news-card-image {
        flex: none;
        width: 100%;
        max-height: 170px;
    }

    .news-card-body {
        padding: 16px 16px 5px;
    }

    .news-card-body-featured {
        padding: 16px 16px 5px;
    }

    .news-card-title-lg {
        font-size: 1.1rem !important;
    }

    /* 上一篇/下一篇：手机版改为两张整行卡片，标签在上标题在下，避免错位 */
    .news-article-nav {
        flex-direction: column;
        gap: 10px;
    }

    .news-article-nav .nav-prev,
    .news-article-nav .nav-next {
        display: block;
        width: 100%;
        padding: 12px 14px;
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 10px;
        background: rgba(255,255,255,0.03);
        box-sizing: border-box;
        text-align: left;
    }

    body.light-mode .news-article-nav .nav-prev,
    body.light-mode .news-article-nav .nav-next {
        border-color: rgba(0,0,0,0.1);
        background: rgba(0,0,0,0.02);
    }

    .news-article-nav .nav-prev a {
        display: block;
        text-decoration: none;
        color: inherit;
    }

    .news-article-nav .nav-label,
    .news-article-nav .nav-title {
        display: block;
    }

    .news-article-nav .nav-label {
        margin-bottom: 4px;
    }

    .news-article-nav .nav-next {
        text-align: left;
    }

    /* 正文去外框：手机版直接显示文字，充分利用横向宽度 */
    .news-article-container {
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    /* 顶部 banner 精简：只保留面包屑 */
    .article-banner-inner {
        padding: 20px 12px !important;
    }

    .article-banner .banner-title,
    .article-banner .banner-desc {
        display: none;
    }
}

/* 文章详情页 · 关联软件卡片 */
.news-software-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    margin: 4px 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.news-software-card:hover {
    border-color: rgba(86, 156, 214, 0.5);
    background: rgba(86, 156, 214, 0.08);
    transform: translateY(-2px);
}
.news-software-icon {
    flex: none;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.news-software-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.news-software-letter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}
.news-software-info {
    flex: 1;
    min-width: 0;
}
.news-software-label {
    font-size: 12px;
    color: #8b949e;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.news-software-name {
    font-size: 17px;
    font-weight: 700;
    color: #e6edf3;
}
.news-software-desc {
    margin-top: 4px;
    font-size: 13px;
    color: #8b949e;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-software-go {
    flex: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(86, 156, 214, 0.15);
    color: #569cd6;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.25s;
}
.news-software-go i {
    width: 14px;
    height: 14px;
}
.news-software-card:hover .news-software-go {
    background: rgba(86, 156, 214, 0.28);
}
body.light-mode .news-software-card {
    border-color: #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
body.light-mode .news-software-card:hover {
    border-color: #569cd6;
    background: #f0f7ff;
}
body.light-mode .news-software-icon {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
body.light-mode .news-software-name {
    color: #1e293b;
}
body.light-mode .news-software-label,
body.light-mode .news-software-desc {
    color: #64748b;
}
@media (max-width: 560px) {
    .news-software-card {
        flex-wrap: wrap;
    }
    .news-software-go {
        width: 100%;
        justify-content: center;
    }
}
