* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8fafc; /* 浅灰背景，替代纯黑 */
    color: #1e293b; /* 深色文字，保证可读性 */
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 淡阴影，更柔和 */
    backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, #7c3aed, #10b981);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: #475569; /* 中深色文字，替代浅灰 */
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #7c3aed; /* hover 时变主色 */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c3aed, #10b981);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: #1e293b; /* 深色图标 */
}

main {
    padding-top: 100px;
    padding-bottom: 80px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1e293b;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, #7c3aed, #10b981);
    border-radius: 4px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #7c3aed;
    color: white;
    margin-right: 16px;
}

.btn-primary:hover {
    background-color: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.2); /* 淡阴影，适配白色系 */
}

.btn-secondary {
    background-color: #10b981;
    color: white;
}

.btn-secondary:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2);
}

.hero-section {
    position: relative;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.5) 100%); /* 白色渐变遮罩 */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
}

.hero-tag {
    display: inline-block;
    background-color: rgba(124, 58, 237, 0.1); /* 淡紫色标签 */
    color: #7c3aed;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    max-width: 600px;
    color: #1e293b; /* 深色标题 */
}

.hero-desc {
    font-size: 16px;
    color: #475569; /* 中深色描述 */
    margin-bottom: 24px;
    max-width: 500px;
}

.game-filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.game-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #7c3aed;
    color: white;
}

.filter-btn:not(.active) {
    background-color: #ffffff; /* 白色按钮 */
    color: #475569;
    border: 1px solid #e2e8f0; /* 淡边框 */
}

.filter-btn:not(.active):hover {
    background-color: #f1f5f9; /* hover 淡灰背景 */
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.game-card {
    background-color: #ffffff; /* 白色卡片 */
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 淡阴影 */
    border: 1px solid #f1f5f9; /* 淡边框，增强质感 */
}

.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* hover 加深阴影 */
}

.game-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 1px solid #f1f5f9; /* 底部淡边框 */
}

.game-card-content {
    padding: 16px;
}

.game-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.game-card-desc {
    font-size: 14px;
    color: #64748b; /* 灰色描述 */
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-card-players {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-card-players i {
    color: #7c3aed;
}

.game-card-link {
    color: #7c3aed;
    font-weight: 500;
    transition: color 0.3s ease;
}

.game-card-link:hover {
    color: #6d28d9;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #ffffff; /* 白色页码按钮 */
    color: #475569;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.page-btn:hover:not(.page-btn.active) {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.page-btn.active {
    background-color: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8fafc;
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.game-detail {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.detail-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.detail-img {
    width: 240px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-header-content {
    flex: 1;
}

.detail-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.detail-rating {
    background-color: #f8fafc; /* 淡灰评分标签 */
    border: 1px solid #e2e8f0;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e293b;
}

.detail-rating i {
    color: #f59e0b;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1e293b;
}

.detail-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    color: #64748b;
    font-size: 14px;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-meta-item i {
    color: #7c3aed;
}

.detail-desc {
    font-size: 16px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 24px;
}

.detail-features {
    margin-bottom: 24px;
}

.features-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e293b;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
}

.feature-item i {
    color: #10b981;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.sidebar-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1e293b;
}

.sidebar-title i {
    color: #7c3aed;
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommended-item {
    display: flex;
    gap: 12px;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px;
}

.recommended-item:hover {
    background-color: #f8fafc; /* hover 淡灰背景 */
}

.recommended-img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.recommended-content {
    flex: 1;
}

.recommended-game-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #1e293b;
}

.recommended-game-rating {
    font-size: 12px;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 4px;
}

.play-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.game-player {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.player-title {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.player-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: #f8fafc; /* 淡灰按钮 */
    color: #475569;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.action-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.iframe-container {
    position: relative;
    width: 100%;
    background-color: #ffffff; /* 白色iframe背景 */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.iframe-container::before {
    content: '';
    display: block;
    padding-top: 160%; 
}

.game-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.game-info {
    margin-top: 20px;
}

.info-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.info-desc {
    font-size: 14px;
    color: #64748b;
}

@media (max-width: 1024px) {
    .detail-container,
    .play-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 14px;
    }

    .detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .detail-img {
        width: 100%;
        height: 200px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 300px;
    }

    .hero-overlay {
        padding: 24px;
    }

    .hero-title {
        font-size: 24px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .detail-title {
        font-size: 24px;
    }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .page-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}