/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "思源黑体", sans-serif;
}

/* 变量定义（高端配色） */
:root {
    --primary-color: #0f3460; /* 深蓝（权威） */
    --secondary-color: #d4af37; /* 金色（高端） */
    --gray-light: #f5f7fa;
    --gray-mid: #e0e5ec;
    --gray-dark: #333;
    --text-color: #222;
    --up-color: #e63946; /* 上升色 */
    --down-color: #1d3557; /* 下降色 */
    --flat-color: #8d99ae; /* 持平色 */
}

/* 基础布局 */
body {
    background-color: var(--gray-light);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    background: url(../images/bg-header.jpg) no-repeat center center;
    background-size: cover;
    padding: 2rem 0;
    border-bottom: 3px solid var(--secondary-color);
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.logo img {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
}

.logo h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo h1 span {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.header-desc {
    font-size: 1.1rem;
    color: var(--gray-dark);
    font-weight: 500;
}

/* 核心内容区 */
.main {
    padding: 3rem 0;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--secondary-color);
}

.section-title i {
    color: var(--secondary-color);
    margin-right: 0.8rem;
}

/* 排名榜单区 */
.ranking-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.ranking-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.ranking-card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--gray-mid);
}

.ranking-list {
    margin-bottom: 1.5rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    background: var(--gray-light);
    transition: all 0.3s ease;
}

.ranking-item.active {
    background: linear-gradient(120deg, var(--primary-color) 0%, #1a508b 100%);
    color: #fff;
}

.ranking-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.rank {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    margin-right: 1rem;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.item-info p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.trend.up {
    color: var(--up-color);
}

.trend.down {
    color: var(--down-color);
}

.trend.flat {
    color: var(--flat-color);
}

.brand-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ranking-item.active .brand-link {
    color: #fff;
    border-color: #fff;
}

.brand-link:hover {
    background: var(--secondary-color);
    color: #fff;
}

.rank-sub {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--gray-mid);
}

.sub-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.sub-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 券商研报区 */
.research-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.research-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.chart-card {
    position: relative;
    background: url(../images/chart-bg.png) no-repeat right bottom;
    background-size: 200px;
}

.chart-container {
    width: 100%;
    height: 300px;
    margin: 1rem 0;
}

.data-card .data-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.data-item {
    padding: 1rem;
    background: var(--gray-light);
    border-radius: 4px;
}

.data-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.data-source {
    font-size: 0.8rem;
    color: var(--flat-color);
    margin-top: 1rem;
}

/* 底部样式 */
.footer {
    background: var(--primary-color);
    color: #fff;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-inner {
    text-align: center;
}

.copyright {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.coop {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 响应式适配 */
@media (max-width: 768px) { /* 平板/手机 */
    .logo img {
        width: 40px;
        height: 40px;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .header-desc {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .ranking-wrapper, .research-wrapper {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .ranking-item {
        flex-wrap: wrap;
    }

    .brand-link {
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) { /* 手机 */
    .container {
        width: 95%;
    }

    .header {
        padding: 1.5rem 0;
    }

    .main {
        padding: 2rem 0;
    }

    .ranking-card, .research-card {
        padding: 1rem;
    }

    .chart-container {
        height: 200px;
    }
}