/* 首页样式 */
.home-main {
    flex: 1;
    background-color: var(--bg-color);
}

/* Hero 区域 */
.hero-section {
    position: relative;
    padding: 6rem 0 8rem;
    text-align: center;
    color: var(--text-color);
    overflow: hidden;
    min-height: 60vh;
    max-height: 75vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: grayscale(35%) saturate(1.08) brightness(0.99) contrast(1.12);
    transform: scale(1.01);
    transition: transform 0.6s ease-out;
    will-change: transform;
    z-index: 0;
    opacity: 1;
    display: block;
}

/* 如果图片不存在，使用渐变背景作为fallback */
.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 50%, #f5f5f7 100%);
    z-index: -1;
    opacity: 0;
}

/* 确保图片元素有内容 */
.hero-image:empty::before {
    opacity: 1;
}

.hero-section:hover .hero-image {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.08) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(255, 255, 255, 0.1) 70%,
        rgba(255, 255, 255, 0.55) 100%
    );
    backdrop-filter: blur(0.2px) saturate(105%);
    -webkit-backdrop-filter: blur(0.2px) saturate(105%);
    z-index: 1;
}

.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: radial-gradient(
        ellipse 120% 80% at center top,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 40%,
        transparent 70%
    );
    pointer-events: none;
    animation: lightPulse 8s ease-in-out infinite;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.28) 30%,
        rgba(255, 255, 255, 0.08) 60%,
        transparent 100%
    );
    pointer-events: none;
}

@keyframes lightPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(12px);
    animation: heroFadeIn 0.3s ease-out forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45),
                 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 2.5rem;
    letter-spacing: 0.01em;
    line-height: 1.5;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-buttons .btn-primary:hover:not(:disabled) {
    background: var(--brand-gradient-hover);
    box-shadow: 0 6px 28px rgba(59, 130, 246, 0.55);
    transform: translateY(-2px);
}

.hero-buttons .btn-outline {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.hero-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.75);
}

/* 游戏展示区域 */
.games-section {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.games-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* 游戏大厅区域 */
.games-lobby-section {
    padding: 5rem 0;
    background-color: #ffffff;
}

.games-lobby-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.games-lobby-section .section-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 游戏大厅下方「更多游戏」轻量级探索链接（居中、去按钮化） */
.games-lobby-more {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    padding: 2rem 1.25rem;
}

.games-lobby-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #6E6E73;
    text-decoration: none;
    background: none;
    border: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.games-lobby-more-link:hover {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.2);
    text-underline-offset: 3px;
}

.games-lobby-more-arrow {
    font-size: 0.875rem;
    color: inherit;
}

.game-card {
    background-color: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.game-icon {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.game-card .game-icon.game-icon-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.5rem;
}

.game-card .game-icon.game-icon-img img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.game-card .game-icon .game-icon-fallback {
    font-size: 4.5rem;
}

.game-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.game-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 1rem;
    min-height: 3.2em; /* 固定 2 行高度（line-height 1.6 × 2） */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 游戏卡片元数据标签 */
.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.game-meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    background-color: #f5f5f7;
    color: #6e6e73;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.2s, color 0.2s;
}

.game-meta-tag svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* 难度等级颜色 */
.game-meta-difficulty-easy {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.game-meta-difficulty-medium {
    background-color: #fff3e0;
    color: #e65100;
}

.game-meta-difficulty-hard {
    background-color: #fce4ec;
    color: #c62828;
}

/* AI 队友状态 */
.game-meta-ai-yes {
    background-color: #e3f2fd;
    color: #1565c0;
}

.game-meta-ai-no {
    background-color: #f5f5f5;
    color: #9e9e9e;
}

.game-meta-ai-pending {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* 即将上线的游戏卡片 */
.game-card-upcoming {
    position: relative;
    overflow: hidden;
    filter: grayscale(0.3);
    opacity: 0.88;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card-upcoming:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* 即将上线对角角标 */
.game-upcoming-badge {
    position: absolute;
    top: 16px;
    right: -32px;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.3rem 2.5rem;
    transform: rotate(45deg);
    z-index: 2;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), 0.3);
}

.game-image {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 28%;
}

.game-image-placeholder {
    font-size: 4rem;
    color: var(--text-light);
    opacity: 0.6;
}

.game-info {
    text-align: left;
}

.game-card-large {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 0;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 430px;
}

@media (hover: hover) and (pointer: fine) {
    .game-card-large:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
}

.game-card-large .game-image {
    width: 100%;
    height: 0;
    padding-bottom: 66%;
    flex-shrink: 0;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    background-color: #f5f5f7;
    position: relative;
}

.game-card-large .game-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.game-card-large .game-image .game-image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.game-card-large .game-info {
    flex: 1;
    padding: 1.35rem 1.25rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.game-card-large .game-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    line-height: 1.2;
}

.game-card-large .game-info p {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
    min-height: 3em;
}

.game-card-large .game-info .btn {
    align-self: flex-start;
    margin-top: 0.25rem;
    font-size: 0.9375rem;
    padding: 0.5rem 1.25rem;
}

/* 特色功能区域 */
.features-section {
    padding: 6rem 0;
    background-color: #f5f5f7;
}

.features-section .section-title {
    text-align: center;
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.features-subtitle {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 3.5rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

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

.feature-card {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--brand-primary);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover .feature-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

.feature-icon-wrap svg {
    width: 36px;
    height: 36px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.3;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.5;
    font-weight: 400;
    font-size: 1rem;
}

.features-seo-text {
    text-align: center;
    max-width: 680px;
    margin: 3.5rem auto 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #aaa;
    font-weight: 400;
}

.features-seo-text a {
    color: #bbb;
    text-decoration: none;
    border-bottom: 1px solid rgba(187,187,187,0.3);
    transition: color 0.2s;
}

.features-seo-text a:hover {
    color: #999;
}

/* CTA 区域 */
.cta-section {
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f4fd 50%, #f0fafb 100%);
    padding: 6rem 0;
    text-align: center;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content h2 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-color);
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.5;
}

/* ==================== 首页移动端适配 ==================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 4rem;
        min-height: 40vh;
        max-height: none;
    }

    .hero-title {
        font-size: 2.5rem;
        color: #ffffff;
        text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5),
                     0 1px 8px rgba(0, 0, 0, 0.35);
        -webkit-text-stroke: none;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding: 0 1.5rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-buttons .btn-outline {
        background: rgba(255, 255, 255, 0.22);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.6);
        color: #fff;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    }

    .games-lobby-section {
        padding: 3rem 0;
    }

    .games-lobby-section .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .game-card-large {
        min-height: 390px;
    }

    .game-card-large .game-image {
        padding-bottom: 62%;
    }

    .features-section {
        padding: 3rem 0;
    }

    .features-section .section-title {
        font-size: 2rem;
    }

    .features-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon-wrap {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .feature-icon-wrap svg {
        width: 30px;
        height: 30px;
    }

    .cta-section {
        padding: 3rem 0;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .cta-content .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .games-lobby-section {
        padding: 2rem 0;
    }

    .game-card-large {
        min-height: 360px;
    }

    .game-card-large .game-image {
        padding-bottom: 60%;
    }

    .features-section {
        padding: 2rem 0;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .feature-icon-wrap {
        width: 54px;
        height: 54px;
        border-radius: 14px;
    }

    .feature-icon-wrap svg {
        width: 26px;
        height: 26px;
    }

    .feature-card h3 {
        font-size: 1.25rem;
    }

    .cta-section {
        padding: 2rem 0;
    }
}


