/* ===== macOS 26 动态玻璃效果 (Pure Dark Mode) ===== */
:root {
    --glass-bg: rgba(28, 28, 30, 0.6);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-blur: 50px;
    --text: #f5f5f7;
    --text-secondary: #86868b;
    --text-muted: #6e6e73;
    --accent: #2997ff;
    --accent-pink: #ff2d55;
    --accent-purple: #bf5af2;
    --accent-orange: #ff9500;
    --radius: 18px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Noto Sans SC', sans-serif;
}

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

body {
    font-family: var(--font);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
    color: var(--text);
    background-color: #000000;
}

/* ===== 纯黑背景 + 微弱氛围光 ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000000;
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

/* 仅保留极其微弱的蓝色光晕，像苹果官网的高级感 */
.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.15), transparent 70%);
    top: -20%;
    right: -10%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(94, 92, 230, 0.1), transparent 70%);
    bottom: -10%;
    left: -10%;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 20px) scale(1.05);
    }
}

/* ===== 主容器 ===== */
.dashboard {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* ===== 玻璃卡片通用样式 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

/* ===== 顶部状态栏 ===== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 8px;
    /* 极简模式，几乎无背景 */
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: #fff;
}

.logo .en {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 10px;
}

.live-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-family: 'SF Mono', monospace;
    color: var(--text-secondary);
}

.live-badge {
    color: var(--accent-pink);
    font-weight: 600;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ===== 筛选栏 ===== */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    background: rgba(44, 44, 46, 0.6);
    padding: 4px;
    border-radius: 100px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.filter-btn,
.time-btn {
    padding: 8px 20px;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font);
}

.filter-btn:hover,
.time-btn:hover {
    color: var(--text);
}

.filter-btn.active,
.time-btn.active {
    background: rgba(99, 99, 102, 0.4);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ===== 新闻容器 ===== */
.news-container {
    background: transparent;
    /* 移除外层背景 */
    border: none;
}

/* ===== 统计栏 ===== */
.stats-bar {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0 20px 20px;
    margin-bottom: 0;
    font-family: 'SF Mono', monospace;
    letter-spacing: 0.02em;
    text-align: center;
}

.stats-bar span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== 新闻卡片 ===== */
.news-item {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: rgba(28, 28, 30, 0.4);
    border-top: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    border-radius: 0;
    /* 列表式设计，更像 Apple News */
}

.news-item:first-child {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.news-item:last-child {
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    border-bottom: 1px solid var(--glass-border);
}

.news-item:hover {
    background: var(--glass-hover);
    transform: scale(1.01);
    z-index: 10;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.news-item.new .news-title {
    color: #fff;
}

.news-time-col {
    flex-shrink: 0;
    width: 70px;
    text-align: right;
    padding-top: 4px;
}

.news-time-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.news-time-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-source {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.news-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #e5e5e7;
    transition: color 0.2s;
}

.news-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ===== 加载状态 ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px;
    color: var(--text-secondary);
}

.loader {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--text-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 底部栏 ===== */
.bottombar {
    padding: 40px;
    text-align: center;
}

.refresh-btn {
    padding: 12px 30px;
    background: rgba(44, 44, 46, 0.8);
    color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    font-family: var(--font);
}

.refresh-btn:hover {
    background: rgba(58, 58, 60, 1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
    .dashboard {
        padding: 20px 16px;
    }

    .topbar {
        margin-bottom: 24px;
        justify-content: center;
        flex-direction: column;
        gap: 10px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .filters {
        gap: 12px;
    }

    .news-item {
        padding: 16px;
        gap: 16px;
    }

    .news-time-col {
        width: 50px;
        text-align: left;
    }

    .news-time-value {
        font-size: 0.85rem;
    }

    .news-title {
        font-size: 1.05rem;
    }
}