/* 字体资源已移至 css/fonts.css */

:root {
    --primary-color:#9e94d8;
    --secondary-color:#333333;
    --background-color:#f2eefc;
    --card-bg:#FAFAFA;
    --text-color:#444444;
    --online-color:#00BFA6;
    --nav-bg:rgba(109, 91, 154, 0.8);
    --nav-bg-scroll:#424a55;
    --button-hover:#b6ade6;
}

/* 导航栏主题切换按钮已移至 navigation.css */

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.theme-toggle-btn i {
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover i {
    transform: rotate(180deg);
}

/* 深色主题变量 */
.dark-theme {
    --primary-color: #a78bfa;
    --secondary-color: #f1f5f9;
    --background-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #e2e8f0;
    --online-color: #10b981;
    --nav-bg: rgba(15, 23, 42, 0.8);
    --nav-bg-scroll: #1e293b;
    --button-hover: #c4b5fd;
}

/* 导航栏样式已移至 navigation.css */

.dark-theme .theme-toggle-btn {
    background: rgba(71, 85, 105, 0.3);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: #e2e8f0;
}

.dark-theme .theme-toggle-btn:hover {
    background: rgba(71, 85, 105, 0.5);
}

/* 深色主题导航链接样式已移至 navigation.css */

/* Footer 在深色主题下的适配 */
/* Footer dark overrides moved to /footer.css */

/* 新闻卡片深色主题适配 */
.dark-theme .news-item {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(71, 85, 105, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.dark-theme .news-item:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.dark-theme .news-content h3 {
    color: #f1f5f9;
}

.dark-theme .news-date {
    color: #cbd5e1;
}

.dark-theme .news-content p {
    color: #e2e8f0;
}

.dark-theme .news-btn {
    border-color: #c4b5fd;
    color: #c4b5fd;
}

.dark-theme .news-btn:hover {
    background: #c4b5fd;
    color: #1e293b;
}

.dark-theme .news-tag {
    background: rgba(196, 181, 253, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(196, 181, 253, 0.3);
}

.dark-theme .news-tag.pinned {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 滚动条深色主题适配 */
.dark-theme .news-content::-webkit-scrollbar-track {
    background: rgba(71, 85, 105, 0.3);
}

.dark-theme .news-content::-webkit-scrollbar-thumb {
    background: rgba(196, 181, 253, 0.5);
}

.dark-theme .news-content::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 181, 253, 0.7);
}

.dark-theme .news-content::-webkit-scrollbar-track {
    background: linear-gradient(to right, rgba(71, 85, 105, 0.3), rgba(71, 85, 105, 0.1));
}

.dark-theme .news-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #c4b5fd, #a78bfa);
    border: 1px solid rgba(71, 85, 105, 0.2);
}

.dark-theme .news-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to right, #a78bfa, #c4b5fd);
    box-shadow: 0 0 8px rgba(196, 181, 253, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

.news-markdown h1 { font-size: 1.5em; color: var(--secondary-color); }
.news-markdown ul { padding-left: 20px; }
.news-markdown strong { color: var(--primary-color); }

.news-content a.external-link svg {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    vertical-align: sub; /* 保持对齐 */
}
/* 导航栏样式已移至 navigation.css */

/* 导航栏样式已移至 navigation.css */
/* 导航栏样式已移至 navigation.css */

/* 移动端样式已移至 news-mobile.css */

/* 移动端样式已移至 news-mobile.css */




/* 导航栏样式已移至 navigation.css */
.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.logo-and-text {
    display: flex;
    align-items: center;
    
    color: white;
    font-size: 1.1em;
    text-decoration: none;
}


.logo-and-text svg {
    width: 18px;
    height: 18px;
    margin-left: 3px;
    margin-bottom: 3px;
}
















/* 缓存状态指示器样式 */
.cache-status-indicator {
    margin: 10px 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cache-status-indicator button {
    background: #9e94d8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cache-status-indicator button:hover {
    background: #b6ade6;
}

.cache-status-indicator button:active {
    transform: translateY(1px);
}

/* 错误消息样式 */
.error-message {
    background: #fff5f5;
    border: 2px solid #fed7d7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #c53030;
}

.error-message h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #c53030;
}

.error-message p {
    margin: 10px 0;
    color: #744210;
}

.news-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 100px auto 0;
}

.intro {
    text-align: center;
    margin-bottom: 40px;
}

.intro h2 {
    font-family: var(--font-primary);
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.intro p {
    font-family: var(--font-primary);
    font-size: 1.1em;
    color: var(--text-color);
    opacity: 0.8;
}

.news-search {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.news-search input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1em;
    width: 300px;
}

.news-search button {
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.news-search button:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.tag-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.tag-filter label {
    font-family: var(--font-primary);
    font-size: 1em;
    color: var(--text-color);
    font-weight: 500;
}

.tag-filter select {
    appearance: none; /* 移除浏览器默认下拉箭头 */
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--card-bg); /* 背景色与新闻卡片一致 */
    border: 1px solid var(--primary-color); /* 边框使用主题色 */
    border-radius: 8px; /* 更圆润的边角 */
    padding: 10px 32px 10px 12px; /* 留出右边箭头空间 */
    font-family: var(--font-primary);
    font-size: 1em;
    color: var(--text-color);
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%239e94d8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>'); /* 自定义倒三角 */
    background-repeat: no-repeat;
    background-position: right 12px center; /* 箭头位置 */
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s;
    min-width: 150px; /* 确保宽度适中 */
}

.tag-filter select:hover {
    border-color: var(--button-hover);
    background-color: #f8f6ff; /* 轻微背景变化 */
}

.tag-filter select:focus {
    outline: none;
    border-color: var(--button-hover);
    box-shadow: 0 0 0 3px rgba(158, 148, 216, 0.2); /* 添加焦点光环 */
}

.tag-filter select option {
    background: var(--card-bg);
    color: var(--text-color);
    font-family: var(--font-primary);
    padding: 10px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 20px;
    background: transparent;
    border-radius: 12px;
}

/* 垂直滚动条样式 for .news-grid */
.news-grid::-webkit-scrollbar {
    width: 6px;
}

.news-grid::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, rgba(241, 241, 241, 0.3), rgba(241, 241, 241, 0.1));
    border-radius: 6px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.news-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-color), var(--button-hover));
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--button-hover), var(--primary-color));
    box-shadow: 0 0 8px rgba(182, 173, 230, 0.5);
}

.news-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    position: relative;
    min-height: 400px;
    animation: fadeIn 0.5s ease calc(var(--news-index) * 0.1s);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 无图新闻：与绝对定位按钮的空白 */
/* .news-item.no-image {
    min-height: auto;
} */

.news-item.no-image .news-content {
    height: auto;
    max-height: 260px;
}

.news-item.no-image .news-btn {
    position: static;
    left: auto;
    transform: none;
    margin-top: 12px;
}

.news-img {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

/* 新闻内容区域 */
.news-content {
    padding: 24px;
    height: 150px;
    overflow-x: auto; /* 启用水平滚动 */
    overflow-y: auto; /* 保持垂直滚动 */

}

/* 垂直滚动条样式 for .news-content */
.news-content::-webkit-scrollbar {
    width: 4px;
}

.news-content::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.3);
    border-radius: 4px;
}

.news-content::-webkit-scrollbar-thumb {
    background: rgba(158, 148, 216, 0.5); 
    border-radius: 4px;
}

.news-content::-webkit-scrollbar-thumb:hover {
    background: rgba(182, 173, 230, 0.7); 
}

/* 水平滚动条样式 for .news-content */
.news-content::-webkit-scrollbar {
    height: 4px;
}

.news-content::-webkit-scrollbar-track {
    background: linear-gradient(to right, rgba(241, 241, 241, 0.3), rgba(241, 241, 241, 0.1));
    border-radius: 4px;
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1);
}

.news-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, var(--primary-color), var(--button-hover));
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.news-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to right, var(--button-hover), var(--primary-color));
    box-shadow: 0 0 8px rgba(182, 173, 230, 0.5);
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.news-content h3 {
    font-family: var(--font-primary);
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.news-date {
    font-family: var(--font-primary);
    font-size: 0.9em;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 10px;
}

.news-content p {
    font-family: var(--font-primary);
    font-size: 1em;
    color: var(--text-color);
}

.news-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 0.95em;
    position: absolute;
    bottom: 10px; /* 增加底部间距，减少紧贴感 */
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s;
}

.news-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 2px 8px rgba(158, 148, 216, 0.3);
}



.news-pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 12px;
    margin: 0 5px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--button-hover);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--button-hover);
    font-weight: bold;
    cursor: default;
    transform: none;
}

.pagination-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.empty-message,
.error-message {
    font-family: var(--font-primary);
    font-size: 1.1em;
    text-align: center;
    color: var(--text-color);
}











/* feet */
/* Footer base moved to /footer.css */


@keyframes fadeIn {/* 页头文字、页头按钮动画 */
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 页脚链接样式 */
/* Footer columns moved to /footer.css */
/*版权*/
/* Copyright moved to /footer.css */

/* 网站状态信息样式 */
/* Status info moved to /footer.css */

/* 响应式设计 */
/* 移动端样式已移至 news-mobile.css */

/* 系统深色主题自动应用 */
@media (prefers-color-scheme: dark) {
    :root:not(.dark-theme) {
        --primary-color: #a78bfa;
        --secondary-color: #f1f5f9;
        --background-color: #0f172a;
        --card-bg: #1e293b;
        --text-color: #e2e8f0;
        --nav-bg: rgba(15, 23, 42, 0.8);
        --nav-bg-scroll: #1e293b;
    }
    
    :root:not(.dark-theme) body {
        background: var(--background-color) !important;
        color: var(--text-color) !important;
    }
    
/* 导航栏样式已移至 navigation.css */
    
/* Footer系统深色主题样式已移至 footer.css */
    
    /* 新闻卡片深色主题 */
    :root:not(.dark-theme) .news-item {
        background: rgba(30, 41, 59, 0.8) !important;
        border: 1px solid rgba(71, 85, 105, 0.3) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    }
    
    :root:not(.dark-theme) .news-item:hover {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
    }
    
    :root:not(.dark-theme) .news-item h3 {
        color: #e2e8f0 !important;
    }
    
    :root:not(.dark-theme) .news-item .news-date {
        color: #94a3b8 !important;
    }
    
    :root:not(.dark-theme) .news-item .news-content p {
        color: #cbd5e1 !important;
    }
    
    :root:not(.dark-theme) .news-item .news-tag {
        background: rgba(71, 85, 105, 0.3) !important;
        color: #cbd5e1 !important;
    }
    
    :root:not(.dark-theme) .news-item .news-tag.pinned {
        background: rgba(16, 185, 129, 0.2) !important;
        color: #10b981 !important;
        border: 1px solid rgba(16, 185, 129, 0.3) !important;
    }
    
/* 系统深色主题导航链接样式已移至 navigation.css */
}

