/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    overflow-x: hidden;
}

/* Inner Page Base（给将来其它内页用，当前首页不用） */
.inner-page {
    background: #f5f7fb;
}

/* 顶部白色条：logo + 语言切换 */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

/* 首页语言切换胶囊按钮 */
.language-switcher {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lang-btn {
    padding: 6px 14px;
    text-decoration: none;
    color: #6b7280;
    border-radius: 999px;
    transition: all 0.25s ease;
    font-size: 13px;
    font-weight: 600;
    position: relative;
}

.lang-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Main Banner */
.main-banner {
    height: 360px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

/* Banner装饰图案 */
.main-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.main-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(10px); }
}

.banner-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.logo {
    height: 56px;
    width: auto;
    border-radius: 0;
    background: transparent;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.main-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.english-subtitle {
    font-size: 1rem !important;
    opacity: 0.85 !important;
    letter-spacing: 3px;
    font-weight: 400 !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Card Container */
.card-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    grid-auto-flow: row dense;
}

/* Card Base Styles */
.card {
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: 150px;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.card:active {
    transform: translateY(-2px);
}

.card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

/* Wide Cards (占2列，仅桌面端生效；手机端在媒体查询中统一改为 span 1) */
.card-wide {
    grid-column: span 2;
}

/* Card Colors */
.card-purple {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
}

.card-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.card-yellow {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.card-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.card-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Footer */
.site-footer {
    background: #e5e7eb;
    color: #4b5563;
    text-align: center;
    padding: 16px 8px 20px;
    font-size: 12px;
}

.site-footer .footer-main {
    font-weight: 600;
    margin-bottom: 4px;
}

.site-footer .footer-sub {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .card-container {
        margin: 20px auto;
        padding: 0 12px;
    }

    /* 手机端：3列网格 + 不规则跨列，模仿 AFCA 的排布感 */
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* 统一基础尺寸 */
    .card,
    .card-wide {
        height: 110px;
    }

    /* 不规则跨列规则（针对 11 张卡片的当前顺序） */
    .card:nth-child(1) { grid-column: 1 / span 2; }
    .card:nth-child(2) { grid-column: 3 / span 1; }

    .card:nth-child(3) { grid-column: 1 / span 1; }
    .card:nth-child(4) { grid-column: 2 / span 1; }
    .card:nth-child(5) { grid-column: 3 / span 1; }

    .card:nth-child(6) { grid-column: 1 / span 2; }
    .card:nth-child(7) { grid-column: 3 / span 1; }

    .card:nth-child(8) { grid-column: 1 / span 1; }
    .card:nth-child(9) { grid-column: 2 / span 1; }
    .card:nth-child(10) { grid-column: 3 / span 1; }

    .card:nth-child(11) { grid-column: 1 / span 3; }

    .card i {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .card h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .main-banner {
        height: 280px;
    }

    .main-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .logo-section {
        flex-direction: column;
        gap: 10px;
    }

    .card-container {
        margin: 16px auto;
        padding: 0 10px;
    }

    /* 手机端：3 列网格，不允许任何卡片独占整行 */
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .card,
    .card-wide {
        height: 100px;
    }

    /* 按当前 11 张卡片顺序布置：只用 span 1 或 span 2，没有 1/-1 */
    /* 第 1 行：1 跨 2 列 + 2 占 1 列  -> 一行 2 个 */
    .card:nth-child(1) { grid-column: 1 / span 2; }
    .card:nth-child(2) { grid-column: 3 / span 1; }

    /* 第 2 行：3、4、5 各占 1 列 -> 一行 3 个 */
    .card:nth-child(3) { grid-column: 1 / span 1; }
    .card:nth-child(4) { grid-column: 2 / span 1; }
    .card:nth-child(5) { grid-column: 3 / span 1; }

    /* 第 3 行：6 跨 2 列 + 7 占 1 列 -> 一行 2 个 */
    .card:nth-child(6) { grid-column: 1 / span 2; }
    .card:nth-child(7) { grid-column: 3 / span 1; }

    /* 第 4 行：8 占 1 列 + 9 跨 2 列 -> 一行 2 个 */
    .card:nth-child(8) { grid-column: 1 / span 1; }
    .card:nth-child(9) { grid-column: 2 / span 2; }

    /* 第 5 行：10 跨 2 列 + 11 占 1 列 -> 一行 2 个 */
    .card:nth-child(10) { grid-column: 1 / span 2; }
    .card:nth-child(11) { grid-column: 3 / span 1; }
}