
/* 全局变量定义 */
:root {
    --primary-color: #0f4c75; /* 深海蓝 */
    --secondary-color: #3282b8; /* 清爽蓝 */
    --accent-color: #bbe1fa; /* 淡蓝高光 */
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #1b262c;
    --text-sub: #5f6c7b;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航 */
.global-header {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.globe-icon {
    font-size: 1.8rem;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-sub);
    position: relative;
}

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

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn-lang, .btn-login {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-login {
    background: var(--primary-color);
    border: none;
    color: white;
}

.btn-login:hover {
    background: var(--secondary-color);
}

/* 搜索英雄区 */
.search-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.search-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.search-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-bar-wrapper {
    max-width: 600px;
    margin: 0 auto 20px;
    display: flex;
    background: white;
    border-radius: 30px;
    padding: 5px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.search-bar-wrapper input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    outline: none;
    border-radius: 30px 0 0 30px;
}

.btn-search {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-search:hover {
    background: white;
}

.quick-tags {
    font-size: 0.9rem;
    opacity: 0.8;
}

.quick-tags a {
    margin: 0 10px;
    text-decoration: underline;
}

.quick-tags a:hover {
    color: var(--accent-color);
}

/* 大洲卡片 */
.continents-section {
    margin-bottom: 50px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title h3 {
    font-size: 1.8rem;
    color: var(--text-main);
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
}

.view-all {
    color: var(--secondary-color);
    font-weight: 600;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.continent-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.continent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.continent-card:hover .card-image img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: white;
}

.overlay h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.overlay p {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

.card-stats {
    padding: 20px;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-bottom: 5px;
}

.stat-item .value {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* 数据排行榜 */
.data-rank-section {
    margin-bottom: 60px;
}

.rank-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.rank-column {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.rank-column h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: var(--text-main);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-color);
}

.rank-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

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

.rank-num {
    width: 30px;
    height: 30px;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 15px;
    font-size: 0.9rem;
}

.rank-num.highlight {
    background: var(--primary-color);
    color: white;
}

.country-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-info strong {
    font-size: 1rem;
    color: var(--text-main);
}

.country-info span {
    font-size: 0.9rem;
    color: var(--text-sub);
}

/* 页脚 */
.site-footer {
    background: var(--text-main);
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.copyright-bar {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    
    .main-nav {
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .search-hero h2 {
        font-size: 1.8rem;
    }
    
    .rank-container {
        grid-template-columns: 1fr;
    }
}
