:root {
    /* 页面边距标准化 - 保留原有合理配置 */
    --page-gutter: 0.5rem;
    --max-width: 87.5rem; /* 1400px */

    /* 品牌主色调：沉稳正红系，层级过渡自然
    --primary-50: #fef7f7;    /* 极浅红 - 背景/辅助 */
    --primary-100: #fee8e8;   /* 浅红 - 悬停/次要元素 */
    --primary-200: #fecdcd;   /* 淡红 - 边框/分割线 */
    --primary-300: #fba8a8;   /* 中浅红 - 小图标/提示 */
    --primary-400: #f87171;   /* 中红 - 按钮/交互元素 */
    --primary-500: #dc2626;   /* 主红 - 标题/重点文字/核心按钮（新闻类标准正红） */
    --primary-600: #b91c1c;   /* 深红 - 选中/强调/渐变终止色 */
    --primary-700: #991b1b;   /* 深暗红 - hover/激活态 */
    --primary-800: #7f1d1d;   /* 暗深红 - 边框/阴影 */
    --primary-900: #6b1d1d;   /* 极深红 - 文本/禁用态 */

    /* 辅助色调：专业深蓝系（代表可信、理性），修正原重复色值，梯度清晰 */
    --secondary-50: #f0f7ff;  /* 极浅蓝 - 背景/卡片 */
    --secondary-100: #e0efff; /* 浅蓝 - 悬停/次要背景 */
    --secondary-200: #bae0ff; /* 淡蓝 - 边框/提示 */
    --secondary-300: #7cc3fc; /* 中浅蓝 - 图标/次要按钮 */
    --secondary-400: #38a1f3; /* 中蓝 - 交互元素/链接 */
    --secondary-500: #2563eb; /* 主蓝 - 链接/次要按钮/强调 */
    --secondary-600: #1d4ed8; /* 深蓝 - 选中/渐变终止 */
    --secondary-700: #1e40af; /* 深暗蓝 - hover/激活 */
    --secondary-800: #1e3a8a; /* 暗深蓝 - 边框/阴影 */
    --secondary-900: #1e305f; /* 极深蓝 - 文本/禁用 */

    /* 点缀色：保留金色/橙色，用于热点、重要提示、时间戳等 */
    --accent-gold: #d4a017;   /* 金色 - 热点标识/重要标签 */
    --accent-orange: #f97316; /* 橙色 - 提示/警告/新内容标识 */
}

/* 文字选中样式 */
::selection {
    background: rgba(220, 38, 38, 0.8);
    color: #ffffff;
}
/* 兼容火狐浏览器 */
::-moz-selection {
    background: rgba(220, 38, 38, 0.8);
    color: #ffffff;
}

/* 可选：针对深色背景的选中样式适配 */
.dark-bg ::selection,
.secondary-bg ::selection {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-500);
}
.dark-bg ::-moz-selection,
.secondary-bg ::-moz-selection {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-500);
}

@media (min-width: 768px) {
    :root {
        --page-gutter: 1.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --page-gutter: 0.5rem;
    }
}

/* 基础布局标准化 */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    font-family: 
        system-ui,                /* 所有现代浏览器的系统字体关键字 */
        -apple-system,            /* Safari (macOS/iOS) */
        "Segoe UI",               /* Windows */
        Roboto,                   /* Android/Chrome OS */
        "Helvetica Neue",         /* macOS 老版 */
        Arial,                    /* 经典兜底 */
        "Noto Sans",              /* 针对非拉丁字符的支持 */
        "Liberation Sans",        /* Linux 发行版常用 */
        sans-serif,               /* 最终兜底 */
        "Apple Color Emoji",      /* 苹果 Emoji */
        "Segoe UI Emoji",         /* Windows Emoji */
        "Segoe UI Symbol",        /* Windows 符号 */
        "Noto Color Emoji";       /* 通用 Emoji */
}

.container {
    width: 100%;
    max-width: 87.5rem; /* 1400px 强制限制 */
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
    box-sizing: border-box;
}

/* 玻璃态效果 */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
}

.glass-dark {
    background: rgba(30, 64, 175, 0.9);
    backdrop-filter: blur(1.25rem);
    -webkit-backdrop-filter: blur(1.25rem);
}

/* 卡片效果 */
.news-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.news-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.1);
}

/* 图片缩放效果 */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.img-zoom:hover img {
    transform: scale(1.1);
}

/* 导航下划线动画 */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.125rem;
    left: 0;
    width: 0;
    height: 0.125rem;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-gold));
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* 标签样式 */
.tag {
    position: relative;
    overflow: hidden;
}
.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}
.tag:hover::before {
    left: 100%;
}

/* 加载动画 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* 数字滚动动画 */
@keyframes countUp {
    from { opacity: 0; transform: translateY(1.25rem); }
    to { opacity: 1; transform: translateY(0); }
}
.count-up {
    animation: countUp 0.6s ease-out forwards;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 脉冲动画 */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -0.25rem;
    border: 0.125rem solid var(--primary-500);
    border-radius: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
}

/* 轮播指示器 */
.carousel-dot {
    transition: all 0.3s ease;
}
.carousel-dot.active {
    width: 2rem;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-gold));
}

/* 懒加载占位 */
.lazy-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

/* 无障碍焦点样式 */
:focus-visible {
    outline: 0.125rem solid var(--primary-500);
    outline-offset: 0.125rem;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .footer-about {
        display: none;
    }
}

/* --- 列表页样式 --- */
.filter-item {
    transition: all 0.2s ease;
}
.filter-item:hover {
    background-color: rgba(196, 30, 58, 0.1);
}
.filter-item.active {
    background-color: var(--primary-500);
    color: white;
}

.pagination-item {
    transition: all 0.2s ease;
}
.pagination-item:hover:not(.active):not(.disabled) {
    background-color: rgba(196, 30, 58, 0.1);
    transform: translateY(-0.125rem);
}
.pagination-item.active {
    background-color: var(--primary-500);
    color: white;
}
.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.view-toggle-btn {
    transition: all 0.2s ease;
}
.view-toggle-btn.active {
    background-color: var(--primary-500);
    color: white;
}

/* 新的文章列表布局（非卡片式） */
.article-list-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
}

.article-item {
    display: flex;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    gap: 1.5rem;
    transition: background-color 0.2s ease;
    align-items: flex-start;
}

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

.article-item:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.article-item-image {
    flex-shrink: 0;
    width: 12rem; /* 192px */
    height: 8rem; /* 128px */
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f3f4f6;
}

.article-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-item:hover .article-item-image img {
    transform: scale(1.05);
}

.article-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item:hover .article-item-title {
    color: var(--primary-500);
}

.article-item-excerpt {
    font-size: 0.9375rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #999;
}

.article-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-item-tag {
    color: var(--primary-500);
    font-weight: 500;
}

/* 响应式适配 */
@media (max-width: 640px) {
    .article-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-item-image {
        width: 100%;
        height: 12rem;
    }
    
    .article-item-title {
        font-size: 1.125rem;
    }
}

/* --- 详情页样式 --- */
.article-content {
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    overflow: hidden;
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #1a1a1a;
}

.article-content h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: #333;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    display: block;
    border-radius: 0.5rem;
    object-fit: contain;
    box-sizing: border-box;
}

.article-content blockquote {
    border-left: 0.25rem solid var(--primary-500);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #555;
    background-color: #f9f9f9;
    border-radius: 0 0.5rem 0.5rem 0;
}

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

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

.drop-cap::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 1;
    margin-right: 0.5rem;
    color: var(--primary-500);
}

.font-size-small .article-content {
    font-size: 1rem;
}

.font-size-medium .article-content {
    font-size: 1.125rem;
}

.font-size-large .article-content {
    font-size: 1.25rem;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* 强制清除所有可能干扰 container 宽度的媒体查询 */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px !important;
    }
}

/* 响应式调整 */
@media (max-width: 40rem) {
    .responsive-title {
        font-size: 1.5rem !important;
    }
}

/* Pagination Container Reset */
.article-list-container + div ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* space-x-2 */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    padding: 0;
    margin: 0;
    list-style: none;
}

/* Pagination Item Base Style */
.article-list-container + div ul li a,
.article-list-container + div ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem; /* 44px min-width for touch target */
    height: 2.75rem; /* 44px height */
    padding: 0 1rem; /* Horizontal padding for text buttons */
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    color: #374151; /* text-gray-700 */
    background-color: white;
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1;
    white-space: nowrap; /* Prevent text wrapping */
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

/* Mobile Optimization */
@media (max-width: 640px) {
    .article-list-container + div ul {
        gap: 0.375rem;
    }
    
    .article-list-container + div ul li a,
    .article-list-container + div ul li span {
        padding: 0 0.75rem;
        font-size: 0.875rem;
        /* Maintain 44px touch target */
    }
}

/* Hover State (excluding active/disabled) */
.article-list-container + div ul li a:hover:not(.active),
.article-list-container + div ul li span:hover:not(.active) {
    background-color: rgba(220, 38, 38, 0.1); /* light red tint matching primary color */
    color: var(--primary-500);
    border-color: var(--primary-200);
    transform: translateY(-0.125rem);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Active State */
.article-list-container + div ul li.active span,
.article-list-container + div ul li.active a {
    background-color: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
    cursor: default;
    pointer-events: none;
}

/* Disabled State */
.article-list-container + div ul li.disabled a,
.article-list-container + div ul li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9fafb;
    color: #9ca3af;
    border-color: #e5e7eb;
    transform: none !important;
    box-shadow: none !important;
}

/* Focus Accessibility */
.article-list-container + div ul li a:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
    z-index: 10;
}

@media (max-width: 768px) {
    footer .footer-section {
        display: none !important;
    }
    
    footer .border-t {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

/* 中小屏幕下图片溢出修复 */
@media (max-width: 991px) {
    .article-content img {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
    }
}


