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

/* =============================================
   Hero 区域 — 电影感沉浸式设计
   ============================================= */
.hero-section {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    color: #fff;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* 深沉电影感渐变：顶部暗 → 中间稍透 → 底部很暗 */
    background:
        linear-gradient(
            to bottom,
            rgba(10, 10, 20, 0.65) 0%,
            rgba(10, 10, 20, 0.40) 35%,
            rgba(10, 10, 20, 0.35) 55%,
            rgba(10, 10, 20, 0.70) 100%
        );
    z-index: 1;
    pointer-events: none;
}

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

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

/* Kicker — 小标签，定位品类 */
.hero-kicker {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-gold);
    margin-bottom: 1rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(255, 184, 0, 0.35);
    border-radius: var(--radius-full);
    background: rgba(255, 184, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 2px 32px rgba(0, 0, 0, 0.5),
                 0 1px 8px rgba(0, 0, 0, 0.3);
}

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

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

/* 主 CTA — 琥珀金暖色调，区别于通用 SaaS 蓝 */
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #1a1a2e;
    background: linear-gradient(135deg, #FFB800 0%, #FF9500 100%);
    border: none;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(255, 184, 0, 0.4),
                0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 52px;
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(255, 184, 0, 0.55),
                0 2px 8px rgba(0, 0, 0, 0.15);
    color: #1a1a2e;
}

.btn-hero-primary:active {
    transform: translateY(0);
}

/* =============================================
   游戏大厅区域
   ============================================= */
.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: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

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

/* Highlight card */
.game-card-highlight {
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: var(--shadow), 0 0 0 1px rgba(139, 92, 246, 0.08);
}

@media (hover: hover) and (pointer: fine) {
    .game-card-highlight:hover {
        border-color: rgba(139, 92, 246, 0.3);
        box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
    }
}

/* Recommend badge */
.game-card-recommend {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.88), rgba(99, 102, 241, 0.88));
    color: #fff;
    z-index: 2;
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
}

.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-size: 0.9375rem;
    font-weight: 400;
    color: #6E6E73;
    text-decoration: none;
    background: none;
    border: none;
    transition: 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;
    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-difficulty {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    color: #fff;
    z-index: 2;
    backdrop-filter: blur(6px);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.game-difficulty-easy {
    background: rgba(46, 125, 50, 0.85);
}

.game-difficulty-medium {
    background: rgba(230, 81, 0, 0.85);
}

.game-difficulty-hard {
    background: rgba(198, 40, 40, 0.85);
}

.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%);
    display: flex;
    z-index: 0;
}

.game-card-large .game-image img {
    z-index: 1;
}

.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: auto;
    font-size: 0.9375rem;
    padding: 0.5rem 1.25rem;
}

.game-card-large .game-meta {
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

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

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

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

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

.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.15);
}

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

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

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

.features-seo-text {
    text-align: center;
    max-width: 680px;
    margin: 3rem auto 0;
    font-size: 0.9rem;
    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, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 5rem 0;
    text-align: center;
    color: #ffffff;
    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(255, 184, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #ffffff;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1.5;
}

/* =============================================
   移动端适配 — Mobile First
   ============================================= */
@media (max-width: 768px) {
    /* Hero */
    .hero-section {
        padding: 3.5rem 0 3rem;
        min-height: 60vh;
    }

    .hero-kicker {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }

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

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        color: rgba(255, 255, 255, 0.85);
    }

    .hero-buttons {
        padding: 0 1rem;
    }

    .btn-hero-primary {
        width: 100%;
        max-width: 320px;
        padding: 0.875rem 1.5rem;
    }

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

    .games-lobby-section .section-header {
        margin-bottom: 2rem;
    }

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

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

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

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

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

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

    .feature-card {
        padding: 1.25rem;
    }

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

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

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

    .feature-card p {
        font-size: 0.875rem;
    }

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

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

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

    .cta-content .btn-hero-primary {
        width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2.5rem 0 2.5rem;
        min-height: 50vh;
    }

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

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

    .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;
    }

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