/* 优化后的现代极简游戏风 */
:root {
    --primary-color: #6d5dfc;
    --secondary-color: #8e77ff;
    --accent-color: #a891ff;
    --purple-gradient: linear-gradient(135deg, #6d5dfc 0%, #8e77ff 50%, #a891ff 100%);
    --blue-gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 50%, #7209b7 100%);
    --dark-bg: #121212;
    --card-bg: #1e1e1e;
    --text-color: #f8f9fa;
    --text-secondary: #adb5bd;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --border-radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-border: rgba(109, 93, 252, 0.25);
    --card-border-hover: rgba(109, 93, 252, 0.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 霓虹网格背景 */
.neon-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--primary-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-color) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.03;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 主容器 */
.app-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

/* 电脑端优化 */
@media (min-width: 1024px) {
    .app-container {
        max-width: 1400px;
        padding: 2rem;
    }

    .header-wrapper {
        flex-direction: row !important;
        text-align: left !important;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }

    .nav-title {
        font-size: 2.2rem !important;
    }

    .nav-subtitle {
        font-size: 1.1rem !important;
        max-width: 600px !important;
        margin: 0.5rem auto 0 !important;
    }

    .quick-nav {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
    }

    .nav-btn {
        padding: 1.2rem !important;
        font-size: 1.1rem !important;
    }

    .banner-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1.5rem !important;
    }

    .banner-card {
        width: 100% !important;
        height: 100px !important;
    }

    .banner-title {
        font-size: 0.9rem !important;
    }

    .games-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 1.5rem !important;
    }

    .game-card {
        transform: scale(1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .game-card:hover {
        transform: scale(1.05);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .game-title {
        font-size: 1.1rem !important;
        min-height: 3em !important;
    }

    .play-button {
        padding: 1rem !important;
        font-size: 1.1rem !important;
    }
}

/* 平板端优化 */
@media (min-width: 768px) and (max-width: 1023px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
    }

    .banner-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
    }

    .banner-card {
        height: 90px !important;
    }

    .quick-nav {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 1rem !important;
    }
}

/* 头部区域 */
.main-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    background: var(--blue-gradient);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.main-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
    background-size: 100% 100%;
    opacity: 0.4;
}

.geometric-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.geometric-circle {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    top: 20px;
    left: 20px;
    animation: float 8s ease-in-out infinite;
}

.geometric-circle-2 {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    bottom: 40px;
    left: 15%;
    animation: float 12s ease-in-out infinite reverse;
}

.geometric-circle-3 {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    top: 30%;
    right: 15%;
    animation: spin 20s linear infinite;
}

.geometric-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid rgba(255, 255, 255, 0.2);
    bottom: 20px;
    right: 20px;
    animation: float 10s ease-in-out infinite reverse;
}

.geometric-triangle-2 {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 35px solid rgba(255, 255, 255, 0.15);
    top: 20%;
    left: 10%;
    animation: float 15s ease-in-out infinite;
}

.geometric-square {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    top: 50%;
    left: 80%;
    transform: rotate(45deg);
    animation: float 12s ease-in-out infinite;
}

.geometric-square-2 {
    position: absolute;
    width: 25px;
    height: 25px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    bottom: 30%;
    right: 10%;
    transform: rotate(15deg);
    animation: spin 25s linear infinite reverse;
}

.geometric-hexagon {
    position: absolute;
    width: 35px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    top: 60%;
    left: 70%;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    animation: float 18s ease-in-out infinite;
}

.geometric-diamond {
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.08);
    top: 15%;
    right: 25%;
    transform: rotate(45deg);
    animation: spin 30s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.header-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

.nav-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.nav-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffffff, #e0e0ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    position: relative;
    padding: 0 1rem;
}

.nav-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    border-radius: 2px;
}

.nav-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    line-height: 1.4;
    padding: 1rem 2.4rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 50px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 700px;
    margin-bottom: 0.5rem;
    font-weight: 500;
    width: auto;
    display: inline-block;
}

.nav-address {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.35);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 快速导航按钮 */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.nav-btn {
    background: var(--purple-gradient);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 0.5rem;
    text-align: center;
    text-decoration: none;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    box-shadow: 0 4px 12px rgba(109, 93, 252, 0.3);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    transition: left 0.6s ease;
}

.nav-btn:hover,
.nav-btn:active {
    background: linear-gradient(135deg, #8e77ff 0%, #6d5dfc 50%, #a891ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 93, 252, 0.4);
}

.nav-btn:hover::before {
    left: 100%;
}

/* 广告区域 */
.banner-section {
    margin-bottom: 1.5rem;
}

.banner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.banner-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(67, 97, 238, 0.3);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 110px;
}

.banner-link {
    display: flex;
    width: 100%;
    flex: 0 0 70px;
    position: relative;
    overflow: hidden;
    background: rgba(30, 30, 30, 0.7);
    align-items: center;
    justify-content: center;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
    padding: 5px;
    max-height: 65px;
}

.banner-card:hover .banner-image {
    transform: scale(1.05);
}

.banner-content {
    padding: 0.4rem 0.5rem;
    background: rgba(30, 30, 30, 0.95);
    border-top: 1px solid rgba(67, 97, 238, 0.3);
    text-align: center;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.banner-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 0.2rem;
    margin: 0;
}

.banner-card:hover,
.banner-card:active {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(109, 93, 252, 0.5);
}

/* 搜索栏 */
.search-section {
    margin-bottom: 1rem;
}

.search-form {
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.search-input {
    width: 100%;
    flex: 1;
    min-width: 0;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(109, 93, 252, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-color);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(173, 181, 189, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.1), 0 8px 22px rgba(0, 0, 0, 0.25);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 2;
}

.search-submit {
    flex: 0 0 auto;
    border: none;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    background: var(--purple-gradient);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(109, 93, 252, 0.28);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.search-submit:hover,
.search-submit:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(109, 93, 252, 0.38);
}

.search-submit:hover::before {
    left: 110%;
}

/* 分类导航 */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 0 0 1.5rem;
    padding: 0.75rem;
    background: rgba(30, 30, 30, 0.62);
    border: 1px solid rgba(109, 93, 252, 0.18);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.category-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(109, 93, 252, 0.26);
    color: rgba(248, 249, 250, 0.86);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    z-index: 0;
}

.category-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--purple-gradient);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: -1;
}

.category-tab::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 50%, transparent 100%);
    transition: left 0.5s ease;
    z-index: 0;
    pointer-events: none;
}

.category-tab:hover,
.category-tab:active,
.category-tab.active {
    color: #ffffff;
    border-color: rgba(168, 145, 255, 0.72);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 93, 252, 0.28);
}

.category-tab:hover::before,
.category-tab:active::before,
.category-tab.active::before {
    opacity: 1;
}

.category-tab:hover::after {
    left: 120%;
}

/* 游戏区域 */
.games-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

/* 游戏卡片 */
.game-card {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(109, 93, 252, 0.2);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(109, 93, 252, 0.05) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover,
.game-card:active {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.game-card:hover::before {
    opacity: 1;
}

.game-media {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
}

.game-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-poster {
    transform: scale(1.1);
}

.game-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--warning-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    z-index: 2;
}

.game-info {
    padding: 0.75rem;
}

.game-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.game-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(109, 93, 252, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.game-rating {
    font-size: 0.75rem;
    color: var(--success-color);
}

.game-rating i {
    margin-right: 0.25rem;
}

.play-button {
    width: 100%;
    padding: 0.75rem;
    background: var(--purple-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.play-button:hover,
.play-button:active {
    background: linear-gradient(135deg, #8e77ff 0%, #6d5dfc 50%, #a891ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(109, 93, 252, 0.3);
}

.play-button:hover::before {
    left: 100%;
}

.play-button.loading {
    background: #666;
    cursor: not-allowed;
}

/* 分页 */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 2rem 0 0;
    justify-content: center;
    align-items: center;
    padding: 0.85rem;
    background: rgba(30, 30, 30, 0.62);
    border: 1px solid rgba(109, 93, 252, 0.18);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(109, 93, 252, 0.26);
    background: rgba(255, 255, 255, 0.055);
    color: rgba(248, 249, 250, 0.86);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: all 0.25s ease;
}

.pagination a:hover,
.pagination a:active,
.pagination .active {
    background: var(--purple-gradient);
    color: #fff;
    border-color: rgba(168, 145, 255, 0.72);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 93, 252, 0.3);
}

.pagination .disabled {
    color: rgba(173, 181, 189, 0.45);
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    cursor: not-allowed;
}

/* 底部信息 */
.app-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(30, 30, 30, 0.95);
    border-radius: var(--border-radius);
    border: 1px solid rgba(109, 93, 252, 0.2);
    margin-top: 2rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 游戏模态框 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.game-modal.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.game-modal-header {
    width: 95%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 8px 8px 0 0;
    margin-bottom: -1px;
    z-index: 10;
}

.game-title-bar {
    font-size: 1rem;
    font-weight: 600;
    color: #FFD700;
}

.game-modal-controls {
    display: flex;
    gap: 10px;
}

.modal-btn {
    background: rgba(212, 175, 55, 0.1);
    border: none;
    color: #FFD700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.modal-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
}

.modal-btn.close-btn:hover {
    background: rgba(255, 71, 87, 0.3);
    border-color: rgba(255, 71, 87, 0.5);
}

.game-modal-content {
    width: 95%;
    max-width: 1200px;
    height: 85vh;
    background: white;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.game-modal.fullscreen .game-modal-content {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
}

.game-modal.fullscreen .game-modal-header {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
}

/* CQ9 模式选择弹窗 */
.cq9-choice-modal {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.cq9-choice-modal.active {
    display: flex;
}

.cq9-choice-panel {
    width: min(92vw, 420px);
    background:
        linear-gradient(180deg, rgba(45, 45, 55, 0.98), rgba(24, 24, 28, 0.98));
    border: 1px solid rgba(109, 93, 252, 0.34);
    border-radius: var(--border-radius);
    padding: 1.4rem;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.cq9-choice-title {
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.cq9-choice-name {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
}

.cq9-choice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cq9-choice-btn {
    border: none;
    border-radius: 12px;
    padding: 0.9rem 0.75rem;
    background: var(--purple-gradient);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(109, 93, 252, 0.25);
    transition: all 0.25s ease;
}

.cq9-choice-btn.feature {
    background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 50%, #7209b7 100%);
}

.cq9-choice-btn:hover,
.cq9-choice-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(109, 93, 252, 0.35);
}

.cq9-choice-cancel {
    width: 100%;
    border: 1px solid rgba(109, 93, 252, 0.25);
    border-radius: 12px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(248, 249, 250, 0.82);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
}

.cq9-choice-cancel:hover,
.cq9-choice-cancel:active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(109, 93, 252, 0.45);
}

/* 保护提示 */
.protection-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #FFD700;
    font-size: 1.5rem;
    text-align: center;
    padding: 20px;
}

/* 响应式设计 - 手机端优化 */
@media (max-width: 767px) {
    .app-container {
        padding: 0.75rem;
    }

    .main-nav {
        padding: 1.5rem 1rem;
        min-height: 150px;
    }

    .nav-title {
        font-size: 1.5rem;
    }

    .nav-subtitle {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.3rem 0;
    }

    .nav-address {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .quick-nav {
        grid-template-columns: repeat(4, 1fr);
    }

    .nav-btn {
        padding: 0.8rem 0.25rem;
        font-size: 0.75rem;
        min-height: 50px;
    }

    .banner-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
    }

    .banner-card {
        height: 95px !important;
    }

    .banner-link {
        flex: 0 0 60px;
    }

    .banner-image {
        max-height: 55px;
    }

    .banner-content {
        padding: 0.3rem 0.2rem;
        min-height: 30px;
    }

    .banner-title {
        font-size: 0.7rem;
        line-height: 1.1;
        -webkit-line-clamp: 2;
        padding: 0 0.1rem;
    }

    .search-section {
        margin-bottom: 0.85rem;
    }

    .search-box {
        gap: 0.45rem;
    }

    .search-input {
        padding: 0.85rem 0.85rem 0.85rem 2.65rem;
        font-size: 0.9rem;
        border-radius: 14px;
    }

    .search-icon {
        left: 0.9rem;
        font-size: 0.9rem;
    }

    .search-submit {
        padding: 0.85rem 0.9rem;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    .category-tabs {
        gap: 0.45rem;
        padding: 0.6rem;
        margin-bottom: 1.2rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
    }

    .section-header {
        align-items: flex-start;
        gap: 0.35rem;
    }

    .section-title {
        font-size: 1.15rem;
    }

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

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .game-title {
        font-size: 0.8rem;
        height: 2.8em;
    }

    .play-button {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .pagination {
        gap: 0.4rem;
        padding: 0.65rem;
        margin-top: 1.5rem;
    }

    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 0.68rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .nav-title {
        font-size: 1.3rem;
    }

    .nav-subtitle {
        font-size: 0.75rem;
    }

    .quick-nav {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .nav-btn {
        font-size: 0.7rem;
        padding: 0.6rem 0.1rem;
        min-height: 45px;
    }

    .banner-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.4rem !important;
    }

    .banner-card {
        height: 85px !important;
    }

    .banner-link {
        flex: 0 0 50px;
    }

    .banner-image {
        max-height: 45px;
    }

    .banner-title {
        font-size: 0.65rem;
        -webkit-line-clamp: 2;
        padding: 0.1rem;
    }

    .search-box {
        gap: 0.35rem;
    }

    .search-input {
        padding: 0.75rem 0.75rem 0.75rem 2.45rem;
        font-size: 0.85rem;
    }

    .search-submit {
        padding: 0.75rem 0.75rem;
        font-size: 0.8rem;
    }

    .category-tabs {
        padding: 0.5rem;
    }

    .category-tab {
        min-height: 32px;
        padding: 0.45rem 0.75rem;
        font-size: 0.76rem;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .game-info {
        padding: 0.5rem;
    }

    .game-title {
        font-size: 0.75rem;
        height: 3em;
    }

    .play-button {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .pagination {
        gap: 0.35rem;
    }

    .pagination a,
    .pagination span {
        min-width: 31px;
        height: 31px;
        padding: 0 0.58rem;
        font-size: 0.72rem;
    }

    .cq9-choice-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .game-title {
        font-size: 0.7rem;
        height: 3.2em;
    }

    .play-button {
        padding: 0.4rem;
        font-size: 0.7rem;
    }

    .search-submit {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .category-tab {
        font-size: 0.72rem;
    }
}

/* 横屏优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .banner-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .game-media {
        aspect-ratio: 4/3;
    }
}

/* 加载动画 */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-shimmer {
    position: relative;
    overflow: hidden;
    background: #2d2d2d;
}

.loading-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    animation: shimmer 1.5s infinite;
}

/* 游戏卡片随机颜色 */
.color-1 { background: linear-gradient(45deg, #6d5dfc, #8e77ff); }
.color-2 { background: linear-gradient(45deg, #4361ee, #3a0ca3); }
.color-3 { background: linear-gradient(45deg, #8e77ff, #a891ff); }
.color-4 { background: linear-gradient(45deg, #3a0ca3, #4361ee); }
.color-5 { background: linear-gradient(45deg, #7209b7, #560bad); }
.color-6 { background: linear-gradient(45deg, #560bad, #7209b7); }