/* ç¯çè¡å¸æ©æ¥ â ä¸­ææè²éèä¸»é¢ */

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent: #10b981;
    --accent-red: #ef4444;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #475569;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.4);
    --radius: 12px;
    --radius-sm: 8px;

    /* Market colors */
    --m-us: #3b82f6;
    --m-china: #ef4444;
    --m-hk: #eab308;
    --m-japan: #f97316;
    --m-europe: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 28px; }
.nav-brand h1 { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tagline { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-filters { display: flex; gap: 6px; }
.filter-btn {
    padding: 5px 14px; border: 1px solid var(--border); border-radius: 20px;
    background: transparent; color: var(--text-secondary); font-size: 12px;
    font-weight: 500; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.filter-btn:hover { border-color: var(--primary-light); color: var(--text); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.nav-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Hero Stats */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; display: flex; align-items: center; gap: 14px; transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--primary-light); }
.stat-icon { font-size: 26px; }
.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; }

/* Date Nav */
.date-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 20px; }
.date-btn {
    padding: 7px 18px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px;
    cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.date-btn:hover { border-color: var(--primary-light); color: var(--text); }
.date-select-wrapper select {
    padding: 7px 14px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); font-size: 13px; cursor: pointer; font-family: inherit;
}

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin-bottom: 40px; }

.news-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column;
}
.news-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.news-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* Market Badges */
.market-badge {
    padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.market-badge.m-us     { background: rgba(59,130,246,0.15); color: var(--m-us); }
.market-badge.m-china  { background: rgba(239,68,68,0.15);  color: var(--m-china); }
.market-badge.m-hk     { background: rgba(234,179,8,0.15);  color: var(--m-hk); }
.market-badge.m-japan  { background: rgba(249,115,22,0.15); color: var(--m-japan); }
.market-badge.m-europe { background: rgba(139,92,246,0.15); color: var(--m-europe); }
.market-badge.m-default { background: rgba(148,163,184,0.15); color: var(--text-secondary); }

.news-card .news-date { font-size: 11px; color: var(--text-muted); }

.news-title {
    font-size: 15px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; color: var(--text);
}
.news-title-zh {
    font-size: 16px; font-weight: 600; line-height: 1.5; margin-bottom: 4px; color: var(--text);
}
.news-title-en {
    font-size: 11px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.3;
}

.news-summary {
    background: rgba(99,102,241,0.08); border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 10px 14px; margin-bottom: 10px; font-size: 13px; color: var(--text-secondary); line-height: 1.6;
}

.news-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border);
}
.news-market { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.news-read { font-size: 12px; color: var(--primary-light); font-weight: 500; }

/* Modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    max-width: 720px; width: 100%; max-height: 85vh; overflow-y: auto; padding: 28px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-meta { display: flex; align-items: center; gap: 10px; }
.modal-source { font-size: 12px; color: var(--text-muted); }
.modal-close {
    background: none; border: none; color: var(--text-muted); font-size: 20px;
    cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 22px; font-weight: 700; line-height: 1.4; margin-bottom: 14px; }
.modal-summary {
    background: rgba(99,102,241,0.1); border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--primary-light);
    line-height: 1.6; font-weight: 500;
}
.modal-content { font-size: 15px; color: var(--text-secondary); line-height: 1.8; }
.modal-content p { margin-bottom: 12px; }
.modal-footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-link { font-size: 13px; color: var(--primary-light); text-decoration: none; font-weight: 500; }
.modal-link:hover { text-decoration: underline; }
.modal-date { font-size: 12px; color: var(--text-muted); }

/* Loading & Empty */
.loading, .no-data { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--text-muted); }
.spinner {
    width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; margin: 0 auto 14px; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal states */
.modal-loading { display: flex; flex-direction: column; align-items: center; padding: 40px 0; color: var(--text-muted); }
.modal-loading .spinner { width: 32px; height: 32px; }
.modal-empty { text-align: center; padding: 40px 0; color: var(--text-muted); font-size: 14px; }
.modal-note { font-size: 12px; color: var(--text-muted); }
.news-card.has-content { cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.news-card.has-content:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; color: var(--text-muted); font-size: 12px; }
footer p { margin-bottom: 4px; }

/* Responsive */
@media (max-width: 768px) {
    .navbar .container { flex-direction: column; gap: 10px; }
    .nav-right { flex-wrap: wrap; justify-content: center; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: 1fr; }
    .modal { padding: 20px; }
}
@media (max-width: 480px) {
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 12px; }
    .nav-filters { flex-wrap: wrap; justify-content: center; }
}