/* ===== CSS 变量定义（浅色/深色主题）===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-tertiary: #eef1f5;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --accent-primary: #3b82f6;
    --accent-secondary: #2563eb;
    --border-color: #e2e8f0;
}

/* 深色主题 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-tertiary: #94a3b8;
        --accent-primary: #60a5fa;
        --accent-secondary: #3b82f6;
        --border-color: #334155;
    }
}

/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

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

/* ===== 头部样式 ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.lang-switcher {
    display: flex;
    gap: 4px;
}

.lang-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: var(--accent-primary);
    color: white;
}

.pinned-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.subscribe-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

/* ===== 频道栏 ===== */
.channel-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.channel-tab {
    padding: 8px 20px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.channel-tab.active {
    background: var(--accent-primary);
    color: white;
}

.channel-tab:hover:not(.active) {
    background: var(--bg-tertiary);
}

/* ===== 骨架屏样式 ===== */
.skeleton-wrapper {
    margin: 20px 0;
}

.skeleton-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-title {
    width: 60%;
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-text {
    width: 100%;
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 40%;
}

/* ===== 公告列表样式 ===== */
.bulletin-container {
    margin: 20px 0;
    min-height: 200px;
}

.bulletin-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.bulletin-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.bulletin-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.bulletin-channel {
    background: var(--bg-tertiary);
    padding: 2px 10px;
    border-radius: 20px;
    color: var(--text-secondary);
}

.bulletin-date {
    color: var(--text-tertiary);
}

.bulletin-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== 底部样式 ===== */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ===== EL-6 新增样式 ===== */
/* 骨架屏平滑淡出 */
.bulletin-container.data-loaded .bulletin-skeleton {
    display: none;
}

.bulletin-item {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 错误状态 */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 2rem 0;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.error-suggestion {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.retry-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* 离线标记 */
.offline-badge {
    background: #ffd966;
    color: #856404;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 2rem 0;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-title {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-desc {
    color: var(--text-tertiary);
}
}