/*
Theme Name: CryptoNews Minimal Pro
Theme URI: https://nmyardcare.com
Author: Web3 Pro Dev
Description: 高性能、金融科技白、现代极简 Web3 实时快讯与交易所聚合主题
Version: 2.1.0
*/

:root {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bullish: #059669;
    --bearish: #dc2626;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 顶部导航 */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.site-logo span { color: #f59e0b; }
.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.active { color: var(--primary); }

/* 动态无缝匀速滚动行情条 */
.ticker-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
}
.ticker-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: ticker-slide 30s linear infinite;
}
.ticker-bar:hover .ticker-track {
    animation-play-state: paused;
}
@keyframes ticker-slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.ticker-price { font-family: monospace; color: var(--text-main); font-weight: 700; }
.ticker-change.up { color: var(--bullish); }
.ticker-change.down { color: var(--bearish); }

/* 页面主体网格 */
.layout-container {
    max-width: 1240px;
    margin: 28px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
}
@media (max-width: 900px) {
    .layout-container { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

/* 快讯卡片 */
.timeline-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
}
.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.news-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}
.news-badge {
    background: #eff6ff;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}
.news-thumb-box {
    margin-bottom: 14px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 260px;
    background: #f1f5f9;
}
.news-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.45;
}
.news-title a { color: var(--text-main); text-decoration: none; }
.news-title a:hover { color: var(--primary); }
.news-content {
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 16px;
}
.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}
.news-actions { display: flex; gap: 10px; }
.vote-btn {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}
.vote-btn.bullish:hover { background: #ecfdf5; color: var(--bullish); border-color: #a7f3d0; }
.vote-btn.bearish:hover { background: #fef2f2; color: var(--bearish); border-color: #fecaca; }
.read-more {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.read-more:hover { text-decoration: underline; }

/* 侧边栏卡片与交易所邀请 */
.sidebar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.exchange-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}
.exchange-item:last-child { border-bottom: none; }
.ex-name { font-weight: 700; font-size: 14px; }
.ex-tag { font-size: 11px; color: var(--bullish); background: #ecfdf5; padding: 2px 6px; border-radius: 4px; }
.ex-btn {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.15s;
}
.ex-btn:hover { background: var(--primary-hover); }

/* 单文章详情页 */
.article-detail {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 36px;
    box-shadow: var(--shadow-sm);
}
.article-detail h1 { font-size: 26px; margin-bottom: 16px; line-height: 1.4; }
.article-detail .content { font-size: 16px; line-height: 1.8; color: #334155; }