/* 优化后的蓝紫黑现代游戏风 */
:root {
    --page: #080812;
    --ink: #f8f9ff;
    --ink-soft: rgba(248, 249, 255, 0.72);
    --ink-faint: rgba(248, 249, 255, 0.46);

    --primary: #6d5dfc;
    --secondary: #8e77ff;
    --accent: #a891ff;
    --cyan: #4cc9f0;
    --pink: #f72585;

    --purple-gradient: linear-gradient(135deg, #6d5dfc 0%, #8e77ff 50%, #a891ff 100%);
    --blue-gradient: linear-gradient(135deg, #4361ee 0%, #3a0ca3 50%, #7209b7 100%);
    --deep-gradient: linear-gradient(145deg, rgba(109, 93, 252, 0.18), rgba(67, 97, 238, 0.08), rgba(114, 9, 183, 0.18));

    --glass: rgba(24, 24, 38, 0.72);
    --glass-strong: rgba(35, 35, 56, 0.86);
    --card-bg: rgba(30, 30, 46, 0.9);

    --line: rgba(109, 93, 252, 0.24);
    --white-line: rgba(255, 255, 255, 0.12);
    --glow-line: rgba(168, 145, 255, 0.46);

    --white: #ffffff;
    --black: #090909;

    --shadow: 0 26px 90px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 14px 42px rgba(0, 0, 0, 0.28);
    --shadow-purple: 0 18px 48px rgba(109, 93, 252, 0.26);

    --radius: 16px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100%;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 0%, rgba(109, 93, 252, 0.18), transparent 30rem),
        radial-gradient(circle at 82% 10%, rgba(76, 201, 240, 0.12), transparent 32rem),
        radial-gradient(circle at 50% 90%, rgba(247, 37, 133, 0.1), transparent 30rem),
        linear-gradient(135deg, #06060d 0%, #121224 46%, #090912 100%);
    line-height: 1.5;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background-image:
        linear-gradient(rgba(109, 93, 252, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(109, 93, 252, 0.08) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.62), transparent 76%);
    animation: gridMove 22s linear infinite;
}

body::after {
    background:
        linear-gradient(120deg, transparent 0%, rgba(168, 145, 255, 0.12) 32%, transparent 58%),
        radial-gradient(circle at var(--mx, 50%) var(--my, 18%), rgba(109, 93, 252, 0.18), transparent 18rem);
    opacity: 0.82;
}

@keyframes gridMove {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(46px, 46px);
    }
}

body.is-ready .app-container {
    opacity: 1;
    transform: translateY(0);
}

button,
input {
    font: inherit;
}

button {
    touch-action: manipulation;
}

img {
    display: block;
}

.neon-bg,
.geometric-pattern {
    display: none;
}

.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 12px 14px 28px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.main-nav,
.carousel-shell,
.quick-nav,
.notice-shell,
.brand-section,
.search-box,
.category-tab,
.games-section,
.game-card,
.app-footer {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--glass);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(26px) saturate(1.55);
    -webkit-backdrop-filter: blur(26px) saturate(1.55);
}

/* 顶部主视觉 */
.main-nav {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    padding: 22px 18px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.14), transparent 36%),
        radial-gradient(circle at 90% 80%, rgba(76, 201, 240, 0.16), transparent 42%),
        var(--blue-gradient);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-purple), var(--shadow);
}

.main-nav::before,
.games-section::before,
.notice-shell::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 38%, rgba(255,255,255,0.08));
    pointer-events: none;
}

.main-nav::after {
    content: "";
    position: absolute;
    right: -88px;
    top: -118px;
    width: 350px;
    height: 350px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(66px);
}

.header-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.nav-brand {
    width: min(860px, 100%);
    margin: 0 auto;
}

.brand-line {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-title {
    color: var(--ink);
    font-size: 2.18rem;
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: 0;
    background: linear-gradient(45deg, #ffffff, #e6e2ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.36);
}

.nav-subtitle {
    max-width: 320px;
    margin: 8px auto 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    font-weight: 760;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 轮播 */
.carousel-section {
    width: 100%;
    margin: 0 0 12px;
}

.carousel-shell {
    position: relative;
    overflow: visible;
    width: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 28px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
    transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

.carousel-shell::before {
    display: none;
}

.carousel-shell:hover {
    box-shadow: none;
}

.carousel-track {
    position: relative;
    inset: auto;
}

.carousel-slide {
    position: relative;
    inset: auto;
    display: none;
    place-items: unset;
    opacity: 1;
    transform: none;
    transition: opacity 0.58s var(--ease), transform 0.58s var(--ease);
}

.carousel-slide.active {
    display: block;
    opacity: 1;
    transform: none;
}

.carousel-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 0;
    object-fit: contain;
    border-radius: 28px;
    border: 1px solid rgba(168, 145, 255, 0.45);
    background: rgba(22, 22, 36, 0.76);
    box-shadow:
        0 16px 44px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(109, 93, 252, 0.14);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 8px;
    z-index: 2;
    display: flex;
    gap: 7px;
    transform: translateX(-50%);
    padding: 5px;
    border-radius: 999px;
    background: rgba(8, 8, 18, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.carousel-dot.active {
    width: 20px;
    background: var(--purple-gradient);
    box-shadow: 0 0 12px rgba(109, 93, 252, 0.75);
}

/* 快捷导航 */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 26px;
    background: rgba(18, 18, 32, 0.72);
    border: 1px solid rgba(109, 93, 252, 0.22);
}

.nav-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 19px;
    color: var(--white);
    background: var(--purple-gradient);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 930;
    box-shadow: 0 10px 28px rgba(109, 93, 252, 0.26);
    transition: transform 0.26s var(--ease), background 0.26s var(--ease), box-shadow 0.26s var(--ease);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    left: -110%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.26), transparent);
    transition: left 0.55s var(--ease);
}

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

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

.nav-btn:active,
.play-button:active,
.category-tab:active,
.game-menu-toggle:active,
.game-action-btn:active,
.cq9-choice-btn:active,
.cq9-choice-cancel:active,
.search-submit:active {
    transform: scale(0.98);
}

/* 公告 */
.notice-section {
    margin-bottom: 18px;
}

.notice-shell {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(18, 18, 32, 0.72);
    border: 1px solid rgba(109, 93, 252, 0.22);
}

.notice-label {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--purple-gradient);
    box-shadow: 0 10px 24px rgba(109, 93, 252, 0.3);
}

.notice-icon {
    width: 21px;
    height: 21px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.notice-marquee {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.notice-track {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    white-space: nowrap;
    line-height: 1;
    color: var(--ink-soft);
    font-size: 0.9rem;
    font-weight: 880;
    animation: noticeScroll 12s linear infinite;
}

.notice-track span {
    display: inline-flex;
    align-items: center;
    height: 36px;
}

.notice-shell:hover .notice-track {
    animation-play-state: paused;
}

/* 品牌区 */
.brand-section {
    position: relative;
    overflow: hidden;
    margin: 18px 2px 16px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.brand-section::before {
    display: none;
}

.brand-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.brand-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    color: var(--ink);
    background: transparent;
    text-decoration: none;
    box-shadow: none;
    transform: none;
    transition: transform 0.28s var(--ease), background 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.brand-card:hover {
    transform: translateY(-2px);
    background: transparent;
    box-shadow: none;
}

.brand-logo-wrap {
    width: auto;
    height: auto;
    display: block;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.brand-logo {
    width: 66px;
    height: 66px;
    max-width: none;
    max-height: none;
    border-radius: 18px;
    object-fit: contain;
    background: rgba(24, 24, 38, 0.88);
    border: 1px solid rgba(168, 145, 255, 0.28);
    box-shadow:
        0 12px 24px rgba(0,0,0,0.28),
        0 0 18px rgba(109, 93, 252, 0.14);
}

.brand-name {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.84rem;
    line-height: 1.22;
    font-weight: 930;
}

/* 搜索 */
.search-section {
    position: relative;
    top: auto;
    z-index: 50;
    margin-bottom: 12px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.search-form {
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
    background: rgba(18, 18, 32, 0.78);
    border: 1px solid rgba(109, 93, 252, 0.24);
}

.search-icon,
.search-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: 0 0 auto;
    color: var(--accent);
}

.search-icon-img {
    filter: drop-shadow(0 0 8px rgba(109, 93, 252, 0.4));
}

.search-input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    color: var(--ink);
    background: transparent;
    font-size: 0.94rem;
    font-weight: 820;
}

.search-input::placeholder {
    color: var(--ink-faint);
}

.search-submit {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 16px;
    color: var(--white);
    background: var(--purple-gradient);
    box-shadow: 0 12px 30px rgba(109, 93, 252, 0.24);
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.search-submit:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #8e77ff 0%, #6d5dfc 50%, #a891ff 100%);
    box-shadow: 0 18px 40px rgba(109, 93, 252, 0.34);
}

/* 分类 */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding: 2px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.category-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 16px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 950;
    background: rgba(18, 18, 32, 0.76);
    border: 1px solid rgba(109, 93, 252, 0.24);
    box-shadow: 0 10px 28px rgba(0,0,0,0.2);
    transition: transform 0.22s var(--ease), color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.category-tab:hover,
.category-tab.active {
    color: var(--white);
    background: var(--purple-gradient);
    border-color: rgba(168, 145, 255, 0.68);
    box-shadow: 0 16px 38px rgba(109, 93, 252, 0.28);
    transform: translateY(-2px);
}

/* 游戏区域 */
.games-section {
    position: relative;
    overflow: hidden;
    padding: 12px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(109, 93, 252, 0.12), transparent 22rem),
        rgba(18, 18, 32, 0.72);
    border: 1px solid rgba(109, 93, 252, 0.22);
    box-shadow: var(--shadow);
}

.section-header {
    position: relative;
    z-index: 1;
    display: block;
    gap: 16px;
    margin-bottom: 12px;
}

.section-title {
    color: var(--ink);
    font-size: 1.42rem;
    font-weight: 950;
    letter-spacing: 0;
}

.section-subtitle {
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 740;
}

.games-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.game-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(28, 28, 44, 0.92);
    border: 1px solid rgba(109, 93, 252, 0.22);
    box-shadow:
        0 14px 40px rgba(0,0,0,0.3),
        0 0 18px rgba(109, 93, 252, 0.08);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)) scale(var(--scale, 1));
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
    will-change: transform;
    content-visibility: auto;
    contain-intrinsic-size: 150px;
}

.game-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 38%, rgba(168,145,255,0.08));
    mix-blend-mode: screen;
    opacity: 0.72;
}

.game-card:hover {
    --lift: -5px;
    --scale: 1.012;
    background: rgba(36, 36, 58, 0.96);
    border-color: rgba(168, 145, 255, 0.52);
    box-shadow:
        0 26px 64px rgba(0,0,0,0.42),
        0 0 26px rgba(109, 93, 252, 0.22);
}

.game-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(109, 93, 252, 0.18), rgba(18, 18, 32, 0.86)),
        #171728;
}

.game-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s var(--ease), filter 0.42s var(--ease);
}

.game-card:hover .game-poster {
    transform: scale(1.06);
    filter: contrast(1.05) saturate(1.06);
}

.game-badge {
    position: absolute;
    left: 5px;
    top: 5px;
    max-width: calc(100% - 10px);
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.82), rgba(109, 93, 252, 0.82));
    backdrop-filter: blur(16px) saturate(1.6);
    -webkit-backdrop-filter: blur(16px) saturate(1.6);
    font-size: 0.58rem;
    font-weight: 950;
    z-index: 2;
}

.game-info {
    position: relative;
    z-index: 1;
    padding: 7px;
}

.game-title {
    height: 2rem;
    color: var(--ink);
    font-size: 0.72rem;
    line-height: 1.32;
    font-weight: 950;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.game-meta {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 9px 0;
    font-size: 0.75rem;
}

.game-type {
    min-width: 0;
    padding: 3px 8px;
    border: 1px solid rgba(168, 145, 255, 0.28);
    border-radius: var(--radius);
    color: var(--ink-soft);
    background: rgba(109, 93, 252, 0.12);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-rating {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-weight: 950;
}

.rating-star {
    color: var(--accent);
}

.play-button {
    width: 100%;
    min-height: 30px;
    margin-top: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    border-radius: 12px;
    color: var(--white);
    background: var(--purple-gradient);
    font-size: 0.66rem;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(109, 93, 252, 0.24);
    transition: transform 0.22s var(--ease), background 0.22s var(--ease), opacity 0.22s ease, box-shadow 0.22s var(--ease);
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: "";
    position: absolute;
    inset: 0;
    left: -110%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left 0.5s var(--ease);
}

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

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

.play-button.loading,
.play-button:disabled {
    opacity: 0.56;
    cursor: wait;
}

.play-icon {
    width: 15px;
    height: 15px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* 分页 */
.pagination {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 22px 0 0;
}

.pagination a,
.pagination span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid rgba(109, 93, 252, 0.26);
    border-radius: 14px;
    color: var(--ink-soft);
    background: rgba(18, 18, 32, 0.76);
    box-shadow: 0 10px 28px rgba(0,0,0,0.22);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 950;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: all 0.22s var(--ease);
}

.pagination a:hover,
.pagination .active {
    color: var(--white);
    background: var(--purple-gradient);
    border-color: rgba(168, 145, 255, 0.64);
    box-shadow: 0 16px 36px rgba(109, 93, 252, 0.28);
}

.pagination .disabled {
    opacity: 0.46;
}

/* 底部 */
.app-footer {
    margin-top: 16px;
    margin-bottom: 24px;
    padding: 20px 20px 24px;
    color: var(--ink-soft);
    text-align: center;
    font-size: 0.86rem;
    font-weight: 740;
    background: rgba(18, 18, 32, 0.76);
    border: 1px solid rgba(109, 93, 252, 0.22);
}

/* 游戏 iframe 弹窗 */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: #000;
}

.game-modal.active {
    display: block;
}

.game-stage,
.game-modal-content {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #000;
}

.game-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.game-modal-header,
.game-title-bar,
.game-modal-controls,
.fullscreen-btn,
.close-btn {
    display: none;
}

.game-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%);
    min-width: 180px;
    padding: 16px 20px;
    border: 1px solid rgba(168, 145, 255, 0.32);
    border-radius: var(--radius);
    color: var(--white);
    background: rgba(12, 12, 22, 0.72);
    box-shadow: 0 24px 80px rgba(0,0,0,0.48), 0 0 24px rgba(109, 93, 252, 0.2);
    backdrop-filter: blur(22px) saturate(1.55);
    -webkit-backdrop-filter: blur(22px) saturate(1.55);
    text-align: center;
    font-weight: 950;
}

/* 游戏控制菜单 */
.game-control-shell {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left));
    top: calc(12px + env(safe-area-inset-top));
    z-index: 10002;
}

.game-menu-toggle {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(168, 145, 255, 0.32);
    border-radius: var(--radius);
    background: rgba(18, 18, 32, 0.78);
    box-shadow: 0 18px 48px rgba(0,0,0,0.34), 0 0 20px rgba(109, 93, 252, 0.18);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    cursor: pointer;
    transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

.game-menu-toggle:hover {
    transform: translateY(-2px);
    background: rgba(35, 35, 56, 0.9);
}

.game-menu-toggle img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.game-action-menu {
    position: absolute;
    left: 0;
    top: 58px;
    width: 160px;
    display: grid;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(168, 145, 255, 0.32);
    border-radius: var(--radius);
    background: rgba(18, 18, 32, 0.84);
    box-shadow: 0 20px 54px rgba(0,0,0,0.42), 0 0 20px rgba(109, 93, 252, 0.18);
    backdrop-filter: blur(26px) saturate(1.8);
    -webkit-backdrop-filter: blur(26px) saturate(1.8);
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    pointer-events: none;
    transform-origin: top left;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.game-action-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.game-action-btn {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius);
    padding: 0 12px;
    color: var(--ink);
    background: rgba(255,255,255,0.06);
    font-size: 0.9rem;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}

.game-action-btn:hover {
    background: rgba(109, 93, 252, 0.22);
    transform: translateX(2px);
}

.game-action-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* CQ9 选择弹窗 */
.cq9-choice-modal {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
}

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

.cq9-choice-panel {
    width: min(94vw, 420px);
    padding: 18px;
    border: 1px solid rgba(168, 145, 255, 0.38);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(40, 40, 62, 0.94), rgba(18, 18, 32, 0.96));
    box-shadow: var(--shadow), 0 0 28px rgba(109, 93, 252, 0.2);
    animation: panelIn 0.24s var(--ease);
}

.cq9-choice-title {
    color: var(--ink);
    font-size: 1.18rem;
    margin-bottom: 6px;
    font-weight: 950;
}

.cq9-choice-name {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-bottom: 14px;
    font-weight: 740;
}

.cq9-choice-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cq9-choice-btn,
.cq9-choice-cancel {
    min-height: 44px;
    border: none;
    border-radius: var(--radius);
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.cq9-choice-btn {
    color: var(--white);
    background: var(--purple-gradient);
    box-shadow: 0 12px 30px rgba(109, 93, 252, 0.26);
}

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

.cq9-choice-cancel {
    width: 100%;
    margin-top: 8px;
    color: var(--ink-soft);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(168, 145, 255, 0.22);
}

.cq9-choice-btn:hover,
.cq9-choice-cancel:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(109, 93, 252, 0.28);
}

.protection-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--white);
    background: rgba(0,0,0,0.9);
    text-align: center;
}

/* 动画 */
@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes noticeScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ── 滚动公告区域（替换搜索） ── */
.scroll-notice-section {
    position: relative;
    margin-bottom: 16px;
}

.scroll-notice-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, rgb(61 58 82), rgb(12 12 13));
border: 1px solid #2b1f54;
    padding: 6px 0;
    box-shadow: 0 4px 20px rgba(34,197,94,0.08);
}

.scroll-notice-viewport {
    overflow: hidden;
    height: 36px;
    position: relative;
    mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.scroll-notice-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.scroll-notice-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 36px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 650;
    white-space: nowrap;
    flex-shrink: 0;
}

.sn-text {
    color: var(--ink-soft);
}

.sn-username,
.sn-platform {
    font-weight: 750;
}

.sn-score {
    font-weight: 850;
    font-size: 0.92rem;
}

@keyframes scrollNoticeVertical {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* ── 客服浮动按钮 ── */
.service-float-area {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.service-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6d5dfc, #8e77ff);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 22px rgba(109, 93, 252, 0.45);
    transition: all 0.3s;
    position: relative;
    pointer-events: auto;
}

.service-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(109, 93, 252, 0.6);
}

.service-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239,68,68,0.5);
}

.service-panel {
    pointer-events: auto;
    background: linear-gradient(160deg, #1a1a2e, #141428);
    border-radius: 16px;
    border: 1px solid rgba(109, 93, 252, 0.3);
    box-shadow: 0 15px 40px rgba(109, 93, 252, 0.2);
    padding: 16px;
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
}

.service-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.service-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(109, 93, 252, 0.2);
    margin-bottom: 12px;
}

.service-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.service-panel-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a8a4c4;
    font-size: 14px;
    transition: all 0.2s;
}

.service-panel-close:hover {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.25s;
}

.service-item:hover {
    background: rgba(109, 93, 252, 0.1);
}

.service-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(109, 93, 252, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 18px;
    flex-shrink: 0;
}

.service-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-item-info {
    flex: 1;
    min-width: 0;
}

.service-item-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
}

.service-item-account {
    font-size: 11px;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.service-copy-btn,
.service-add-btn {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.service-copy-btn {
    background: linear-gradient(135deg, #6d5dfc, #8e77ff);
    color: #fff;
}

.service-copy-btn:hover {
    box-shadow: 0 4px 12px rgba(109, 93, 252, 0.4);
    transform: translateY(-1px);
}

.service-add-btn {
    background: rgba(255,255,255,0.08);
    color: var(--ink-soft);
    border: 1px solid rgba(255,255,255,0.15);
}

.service-add-btn:hover {
    background: rgba(109, 93, 252, 0.2);
    color: #fff;
}

.service-empty {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-size: 13px;
}

/* ── 弹窗公告 ── */
.popup-notice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    padding: 20px;
}

.popup-notice-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-notice-modal {
    position: relative;
    background: linear-gradient(160deg, #1a1028, #0f0a1a);
    border: 1px solid rgba(109, 93, 252, 0.3);
    border-radius: 16px;
    padding: 28px 24px 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 0 50px rgba(109, 93, 252, 0.2);
    transform: translateY(20px);
    transition: transform 0.35s ease;
}

.popup-notice-overlay.active .popup-notice-modal {
    transform: translateY(0);
}

.popup-notice-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #a8a4c4;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.popup-notice-close:hover {
    background: rgba(239,68,68,0.2);
    color: #ef4444;
}

.popup-notice-fire {
    font-size: 36px;
    margin-bottom: 10px;
}

.popup-notice-title {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 14px;
    line-height: 1.3;
}

.popup-notice-content {
    font-size: 14px;
    line-height: 1.8;
    color: #d1d5db;
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}

.popup-notice-btn {
    display: inline-block;
    padding: 10px 48px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(34,197,94,0.3);
}

.popup-notice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(34,197,94,0.45);
}

/* 响应式 */
@media (min-width: 480px) {
    .games-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 390px) {
    .app-container {
        padding: 10px;
    }

    .main-nav {
        padding: 20px 15px;
        border-radius: 24px;
    }

    .main-nav::before,
    .games-section::before,
    .notice-shell::before {
        border-radius: 23px;
    }

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

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

    .brand-grid {
        gap: 10px;
    }

    .brand-logo-wrap {
        width: auto;
        height: auto;
        border-radius: 0;
    }

    .brand-logo {
        width: 58px;
        height: 58px;
        max-width: none;
        max-height: none;
        border-radius: 16px;
    }

    .brand-name {
        font-size: 0.78rem;
    }

    .games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .game-title {
        font-size: 0.68rem;
    }

    .play-button {
        font-size: 0.62rem;
    }
}

/* 大屏兼容 */
@media (min-width: 768px) {
    .app-container {
        max-width: 760px;
        padding: 18px;
    }

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

    .nav-subtitle {
        max-width: 520px;
        font-size: 0.98rem;
    }

    .games-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
    }

    .brand-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

    .play-button {
        min-height: 34px;
        font-size: 0.72rem;
    }
}

@media (min-width: 1180px) {
    .app-container {
        max-width: 1120px;
        padding: 22px;
    }

    .main-nav {
        padding: 30px 24px;
    }

    .nav-title {
        font-size: 3.45rem;
        line-height: 0.98;
    }

    .nav-subtitle {
        max-width: 760px;
        font-size: 1.02rem;
    }

    .carousel-section {
        width: min(760px, 100%);
        margin-left: auto;
        margin-right: auto;
    }

    .carousel-shell {
        aspect-ratio: 16 / 5.2;
        min-height: 112px;
        max-height: 238px;
        overflow: hidden;
        transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    }

    .carousel-track,
    .carousel-slide {
        position: absolute;
        inset: 0;
    }

    .carousel-slide {
        display: grid;
        place-items: center;
        opacity: 0;
        transform: scale(1.018);
    }

    .carousel-slide.active {
        display: grid;
        opacity: 1;
        transform: scale(1);
    }

    .carousel-image {
        width: 100%;
        height: 80px;
        object-fit: contain;
    }

    .games-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 12px;
    }

    .brand-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
    }

    .games-section {
        padding: 18px;
    }

    .section-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

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

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

    .game-info {
        padding: 10px;
    }

    .game-title {
        height: 2.55rem;
        font-size: 0.92rem;
        line-height: 1.28;
    }

    .game-meta {
        display: flex;
    }

    .play-button {
        min-height: 40px;
        margin-top: 0;
        font-size: 0.86rem;
        gap: 7px;
    }

    .play-icon {
        width: 20px;
        height: 20px;
    }

    .game-badge {
        left: 8px;
        top: 8px;
        max-width: calc(100% - 16px);
        padding: 4px 8px;
        font-size: 0.68rem;
    }
}