/* 全局样式 */
:root {
    --primary-color: #4b77be; /* 蓝色 */
    --secondary-color: #7ac142; /* 绿色 */
    --background-color: #ffffff;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --gray: #cccccc;
    --dark-gray: #666666;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* 页头样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--background-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    margin-right: 0.5rem;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 主要内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* 带侧边栏的主要内容区域 */
.main-content.with-sidebar {
    display: flex;
    gap: 2rem;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--primary-color);
    color: white;
}

/* 内容区域 */
.content-area {
    flex-grow: 1;
    min-width: 0; /* 防止内容溢出 */
}

.content-area h2 {
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* 英雄区域 */
.hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.2rem;
    color: var(--dark-gray);
}

/* 卡片容器 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.card p {
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #3a5f9e;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    color: var(--dark-gray);
    border-top: 1px solid var(--gray);
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.data-table th, .data-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

.data-table th {
    background-color: var(--light-gray);
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    position: relative;
    font-size: 0.9rem;
}

.data-table th:hover {
    background-color: #e9e9e9;
}

.data-table tbody tr:hover {
    background-color: var(--light-gray);
}

.sort-indicator::after {
    content: '';
    display: inline-block;
    margin-left: 0.5rem;
}

.sort-asc::after {
    content: '↑';
}

.sort-desc::after {
    content: '↓';
}

/* 页面标题 */
.page-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.page-description {
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

/* 表格控件 */
.table-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.search-container {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    min-width: 250px;
}

.filter-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    background-color: white;
}

/* 分页控件 */
.pagination-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background-color: var(--light-gray);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    color: var(--dark-gray);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-nav li {
        margin: 0.5rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.85rem;
    }
    
    .table-controls {
        flex-direction: column;
    }
    
    .search-container, .filter-container {
        width: 100%;
    }
    
    .search-input {
        width: 100%;
    }
    
    .main-content.with-sidebar {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* 大模型排名页面的容器布局 */
.models-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 子菜单容器 */
.submenu-container {
    width: 100%;
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 0.5rem;
}

.submenu-container .menu-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.submenu-container h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
}

.submenu {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: block;
    padding: 0.4rem 0.8rem;
    color: var(--text-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.submenu a:hover,
.submenu a.active {
    background-color: var(--primary-color);
    color: white;
}
