/* 智链星穹 - 前台网站样式 */

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* 导航栏样式 */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero 区域渐变背景 */
.hero-gradient {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
}

/* 发光按钮效果 */
.glow-button {
    position: relative;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    transition: all 0.3s ease;
}

.glow-button:hover {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5), 0 0 40px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* 卡片悬浮效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 文章卡片封面图 */
.article-cover {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* 表格斑马纹 */
.table-row:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.5);
}

.table-row:hover {
    background-color: rgba(51, 65, 85, 0.7);
}

/* 来源标签颜色 */
.source-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.source-hn {
    background-color: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.source-tc {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.source-tw {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.source-vb {
    background-color: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

/* 其他来源的默认颜色 */
.source-tag:not(.source-hn):not(.source-tc):not(.source-tw):not(.source-vb) {
    background-color: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

/* 分数徽章 */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.75rem;
}

.score-high {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.score-medium {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    color: white;
}

.score-low {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

/* 链接样式 */
.link-hover {
    color: #94a3b8;
    transition: color 0.2s ease;
}

.link-hover:hover {
    color: #06b6d4;
}

/* 早报列表项 */
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
    transition: background-color 0.2s ease;
}

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

.news-item:hover {
    background-color: rgba(30, 41, 59, 0.5);
    margin: 0 -16px;
    padding: 12px 16px;
    border-radius: 8px;
}

/* 脉冲动画（Live 标签） */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 渐入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 空状态占位图 */
.empty-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.empty-cover svg {
    width: 48px;
    height: 48px;
    color: #475569;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-gradient {
        padding: 3rem 1rem;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
}

/* Markdown 内容样式 */
.prose-invert {
    color: #e2e8f0;
}

.prose-invert h1,
.prose-invert h2,
.prose-invert h3 {
    color: #f1f5f9;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.prose-invert p {
    margin-bottom: 1em;
    line-height: 1.75;
}

.prose-invert a {
    color: #06b6d4;
    text-decoration: none;
}

.prose-invert a:hover {
    text-decoration: underline;
}

.prose-invert img {
    border-radius: 8px;
    margin: 1.5em 0;
}

.prose-invert code {
    background-color: #1e293b;
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.prose-invert pre {
    background-color: #1e293b;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
}

.prose-invert blockquote {
    border-left: 4px solid #06b6d4;
    padding-left: 1em;
    margin: 1em 0;
    color: #94a3b8;
}

.prose-invert ul,
.prose-invert ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.prose-invert li {
    margin-bottom: 0.5em;
}

/* ============================================
   智能采集中心样式
   ============================================ */

/* 词云项 */
.word-cloud-item {
    display: inline-block;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.word-cloud-item:hover {
    color: #06b6d4;
}

/* 词云颜色渐变 (根据权重) */
.word-cloud-item[data-weight^="9"],
.word-cloud-item[data-weight="100"] {
    color: #06b6d4;
    font-weight: 600;
}

.word-cloud-item[data-weight^="8"] {
    color: #22d3ee;
    font-weight: 500;
}

.word-cloud-item[data-weight^="7"] {
    color: #a78bfa;
}

.word-cloud-item[data-weight^="6"] {
    color: #818cf8;
}

.word-cloud-item[data-weight^="5"] {
    color: #94a3b8;
}

.word-cloud-item[data-weight^="4"],
.word-cloud-item[data-weight^="3"],
.word-cloud-item[data-weight^="2"] {
    color: #64748b;
}

/* 日志滚动动画 */
@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

#crawl-logs {
    position: relative;
}

#crawl-logs .log-line {
    animation: fadeInLog 0.3s ease-out;
}

@keyframes fadeInLog {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 日志自动滚动容器 */
.log-scroll-container {
    animation: scrollUp 30s linear infinite;
}

.log-scroll-container:hover {
    animation-play-state: paused;
}

/* 日志行高亮 */
.log-line:hover {
    background-color: rgba(51, 65, 85, 0.3);
    border-radius: 4px;
}

/* 统计数字动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.5s ease-out;
}

/* 系统来源标签 */
.source-sys,
.source-default {
    background-color: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

/* ============================================
   自动滚动容器样式（稳定版）
   ============================================ */

/* 滚动容器设置 - 使用 contain 隔离布局 */
#news-scroll-container,
#topics-scroll-container {
    overflow: hidden;
    position: relative;
    contain: layout style;
}

/* 鼠标悬停时允许手动滚动 */
#news-scroll-container:hover,
#topics-scroll-container:hover {
    overflow-y: auto;
    scrollbar-width: thin;
}

#news-scroll-container:hover::-webkit-scrollbar,
#topics-scroll-container:hover::-webkit-scrollbar {
    width: 6px;
}

#news-scroll-container:hover::-webkit-scrollbar-thumb,
#topics-scroll-container:hover::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* 隐藏默认滚动条 */
#news-scroll-container::-webkit-scrollbar,
#topics-scroll-container::-webkit-scrollbar {
    width: 0;
    display: none;
}

#news-scroll-container,
#topics-scroll-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
