/* 全局变量 */
:root {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --primary-bg: #ecfdf5;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

/* 导航栏 */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-logo {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px;
    max-height: 32px;
    border-radius: 6px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-brand svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-link.active,
.nav-link.nav-link-active {
    background: var(--primary);
    color: white;
}

/* 主内容 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* 新闻布局 */
.news-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}

/* 侧边栏 */
.news-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 600;
    color: var(--text);
    justify-content: flex-start;
}

.sidebar-title svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.news-list {
    list-style: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.news-list li {
    border-bottom: 1px solid var(--border);
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 12px 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.news-list a:hover {
    background: var(--bg);
}

.news-list a.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 500;
}

/* 内容区域 */
.news-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.content-header {
    margin-bottom: 24px;
}

.content-title h1 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 4px;
}

.content-title .date {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 新闻文章 */
.news-article {
    line-height: 1.8;
}

.news-section {
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* 新闻项 */
.news-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-meta svg {
    width: 14px;
    height: 14px;
}

.source-link {
    color: var(--primary);
    text-decoration: none;
}

.source-link:hover {
    text-decoration: underline;
}

.news-body {
    color: var(--text);
}

.news-body h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin: 16px 0 8px;
}

.news-body ul {
    padding-left: 16px;
    margin: 8px 0;
}

.news-body li {
    margin-bottom: 6px;
}

/* 图片 */
.news-image {
    margin: 16px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.news-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.news-image .caption {
    padding: 8px 12px;
    background: var(--bg);
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
}

.data-table tr:hover {
    background: var(--bg);
}

/* 概览网格 */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.overview-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.overview-category h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.overview-category svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.overview-category ul {
    list-style: none;
    font-size: 0.85rem;
}

.overview-category li {
    margin-bottom: 6px;
}

.overview-category a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overview-category a:hover {
    color: var(--primary);
}

/* 厂商卡片 */
.vendor-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.vendor-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.vendor-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.vendor-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vendor-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.vendor-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.vendor-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.vendor-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.75rem;
    margin-top: 8px;
}

.vendor-tag.foreign {
    background: #fef3c7;
    color: #d97706;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 24px;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.85rem;
}

/* 成果卡片 */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.achievement-card {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.achievement-card:hover {
    box-shadow: var(--shadow);
}

.achievement-card .achievement-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.achievement-card .achievement-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.achievement-card .achievement-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.achievement-card .achievement-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* 移动端导航栏统一样式 */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 12px;
    }
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 0;
        gap: 8px;
    }
    .nav-brand {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        width: 100%;
    }
    .nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-radius: 16px;
        background: var(--bg);
    }
    .nav-link.active {
        background: var(--primary);
        color: white;
    }
    
    .news-layout {
        grid-template-columns: 1fr;
    }
    .news-sidebar {
        position: static;
    }
    .main-content {
        padding: 16px;
    }
    .news-content {
        padding: 16px;
    }
    .vendor-cards {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    /* 成果卡片移动端紧凑 */
    .achievement-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .achievement-card {
        padding: 12px 6px !important;
    }
    .achievement-card .achievement-icon {
        width: 32px !important;
        height: 32px !important;
        margin-bottom: 6px !important;
    }
    .achievement-card .achievement-icon svg {
        width: 16px !important;
        height: 16px !important;
    }
    .achievement-card .achievement-number {
        font-size: 1.3rem !important;
    }
    .achievement-card .achievement-label {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 6px 10px;
    }
    .nav-link {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .achievement-grid {
        gap: 6px !important;
    }
    .achievement-card {
        padding: 10px 4px !important;
    }
    .achievement-card .achievement-icon {
        width: 28px !important;
        height: 28px !important;
    }
    .achievement-card .achievement-number {
        font-size: 1.1rem !important;
    }
    .achievement-card .achievement-label {
        font-size: 0.65rem !important;
    }
}
