:root {
    --bg: #ffffff;
    --bg-alt: #f7f8fa;
    --bg-header: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b7280;
    --accent: #f7931a;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 8px;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

body.rtl {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
    direction: rtl;
}

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

/* Header */
.header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.4rem;
    min-width: 0;
}

.logo-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-mark {
    color: var(--accent);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.lang-select {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
}

.nav {
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.nav-inner {
    display: flex;
    gap: 28px;
    height: 44px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* Featured */
.featured {
    padding: 32px 0 16px;
    background: var(--bg-alt);
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.featured-image {
    width: 100%;
    height: 340px;
    object-fit: cover;
    background: #e5e7eb;
}

.featured-content {
    padding: 28px 28px 28px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.featured-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.featured-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 16px;
}

.featured-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* News Grid */
.news-section {
    padding: 32px 0 60px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s ease;
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f3f4f6;
}

.news-body {
    padding: 16px;
}

.news-source {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.news-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.loading, .error {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

/* Detail */
.back-btn {
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    margin: 24px 0;
    font-size: 0.9rem;
}

.back-btn:hover { 
    border-color: var(--accent); 
}

.article {
    max-width: 720px;
    margin: 0 auto 60px;
}

.article h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.85;
    white-space: pre-wrap;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 16px 0;
}

/* Footer */
.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== 响应式（强制手机 2 列） ===== */
@media (max-width: 1024px) {
    .news-grid { 
        grid-template-columns: repeat(3, 1fr); 
        gap: 16px;
    }
}

@media (max-width: 900px) {
    .featured-card { 
        grid-template-columns: 1fr; 
        gap: 0;
    }
    .featured-content { 
        padding: 20px; 
    }
    .featured-image { 
        height: 240px; 
    }
    .featured-title {
        font-size: 1.5rem;
    }
    .news-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .header-top {
        height: 56px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-inner {
        gap: 16px;
    }
    
    /* 强制 2 列，覆盖所有常见手机宽度 */
    .news-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 10px;
    }
    
    .news-image {
        height: 100px;
    }
    
    .news-body {
        padding: 8px 10px;
    }
    
    .news-title {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .news-desc {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
    
    .featured {
        padding: 16px 0 12px;
    }
    
    .featured-title { 
        font-size: 1.25rem; 
    }
    
    .featured-desc {
        font-size: 0.88rem;
    }
    
    .news-section {
        padding: 16px 0 40px;
    }
    
    .article h1 {
        font-size: 1.4rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .footer-inner { 
        flex-direction: column; 
        gap: 12px; 
        text-align: center; 
    }
    
    .back-btn {
        margin: 16px 0;
    }
}

/* 只有极窄屏幕（小于 320px）才变回 1 列 */
@media (max-width: 320px) {
    .news-grid { 
        grid-template-columns: 1fr !important; 
    }
    .news-image {
        height: 140px;
    }
}