/* 基础样式 */
:root {
    --primary-color: #305df1;
    --primary-dark: #062543;
    --secondary-color: #6e6e73;
    --light-bg: #f5f5f7;
    --dark-bg: #373739;
    --text-dark: #333;
    --text-light: #86868b;
    --white: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


  /* 新增提示样式 */
  .stat-card {
    position: relative;
}

.tip-container {
    display: inline-block;
    position: relative;
}

.tip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
    /* 自动换行设置 */
    max-width: 220px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

.tip-container:hover .tip-text {
    opacity: 1;
    visibility: visible;
}

        /* 响应式调整 */
        @media (max-width: 768px) {
            .tip-text {
                max-width: 180px;
                font-size: 13px;
            }
        }
        
        @media (max-width: 480px) {
            .tip-text {
                max-width: 150px;
                font-size: 12px;
            }
        }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 113, 227, 0.25);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(24, 25, 27, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--light-bg);
}

.logo i {
    margin-right: 10px;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 头部横幅 */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #04305c 0%, #005bb5 100%);
    color: var(--white);
    text-align: center;
    margin-top: 60px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* 数据总览 */
.overview {
    padding: 80px 0;
    background-color: var(--white);
}

.overview h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.stat-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-light);
}

.age-distribution {
    margin-top: 60px;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 30px;
}

.age-distribution h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.distribution-chart {
    max-width: 800px;
    margin: 0 auto;
}

.age-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.age-label {
    width: 100px;
    font-weight: 500;
}

.age-bar {
    height: 20px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    margin: 0 15px;
    transition: width 1s ease;
}

.age-percent {
    width: 50px;
    text-align: right;
    font-weight: 500;
}

/* 数据模块 */
.modules {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.modules h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.module-card {
    display: block;
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    color: var(--text-dark);
}

.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.module-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.module-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.module-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.module-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* 关于项目 */
.about {
    padding: 80px 0;
    background-color: var(--white);
}

.about h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-placeholder {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: linear-gradient(135deg, #f0f7ff, #e1eeff);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 5rem;
}

/* 页脚 */
.footer {
    padding: 80px 0 30px;
    background-color: var(--dark-bg);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo .logo {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.footer-logo p {
    color: var(--text-light);
    opacity: 0.8;
}

.footer-contact p {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    width: 20px;
    color: var(--primary-color);
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-light);
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(245, 243, 243, 0.1);
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.7;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .about-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .age-group {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 25px;
    }
    
    .age-label {
        margin-bottom: 5px;
    }
    
    .age-bar {
        width: 100%;
        margin: 5px 0;
    }
    
    .age-percent {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 40px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
}
