/* 
 * 云算科技 - 全局样式表
 * 风格：蓝白科技风、简约、响应式
 */

:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --accent-color: #e7f1ff;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* 导航栏 */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

/* 移动端导航切换 */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 页面主体 */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Banner 区域 */
.banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}

.banner h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* 模块标题 */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 5px solid var(--primary-color);
    color: var(--primary-color);
}

/* 卡片布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.card p {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
}

.card .meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* 榜单列表 */
.rank-list {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 40px;
}

.rank-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-num {
    font-size: 20px;
    font-weight: bold;
    width: 40px;
    color: var(--secondary-color);
}

.rank-name {
    flex: 1;
    font-weight: 500;
}

.rank-score {
    color: #f39c12;
    font-weight: bold;
}

/* 页脚 */
footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    margin: 0 10px;
    color: #ccc;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-info {
    font-size: 12px;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .banner h1 {
        font-size: 28px;
    }

    .banner p {
        font-size: 16px;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
