:root {
    --page: #f4f5fb;
    --ink: #101628;
    --ink-soft: rgba(16, 22, 40, 0.68);
    --ink-faint: rgba(16, 22, 40, 0.46);
    --glass: rgba(255, 255, 255, 0.72);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --line: rgba(16, 22, 40, 0.08);
    --white-line: rgba(255, 255, 255, 0.9);
    --white: #ffffff;
    --black: #101628;
    --accent: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #d946ef;
    --accent-cyan: #22d3ee;
    --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #d946ef 100%);
    --grad-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(217, 70, 239, 0.13));
    --shadow: 0 24px 60px rgba(30, 41, 99, 0.16);
    --shadow-soft: 0 10px 30px rgba(30, 41, 99, 0.09);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 22px;
    --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);
    scroll-behavior: smooth;
}

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(58rem 40rem at 88% -12%, rgba(139, 92, 246, 0.16), transparent 60%),
        radial-gradient(50rem 34rem at -12% 18%, rgba(34, 211, 238, 0.14), transparent 55%),
        radial-gradient(42rem 30rem at 62% 112%, rgba(236, 72, 153, 0.12), transparent 60%),
        linear-gradient(160deg, #f6f7ff 0%, #eef1fb 50%, #f7f5ff 100%);
    line-height: 1.5;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(16, 22, 40, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 22, 40, 0.024) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 78%);
}

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

button,
input {
    font: inherit;
}

button {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

img {
    display: block;
}

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

.app-container {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    margin: 0 auto;
    padding: 20px 18px 40px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

/* ============ 顶部品牌区 ============ */
.main-nav {
    position: relative;
    overflow: hidden;
    padding: 44px 26px 38px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55)),
        var(--grad-soft);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
}

.main-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), transparent 42%, rgba(255, 255, 255, 0.3));
    pointer-events: none;
}

.main-nav::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -140px;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    background: var(--grad);
    opacity: 0.16;
    filter: blur(80px);
    pointer-events: none;
}

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

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

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

.nav-title {
    color: var(--ink);
    font-size: 3.4rem;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.01em;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
}

.nav-subtitle {
    margin: 14px auto 0;
    color: var(--ink-soft);
    font-size: 1.04rem;
    max-width: 760px;
    font-weight: 720;
}

/* ============ 轮播区 ============ */
.carousel-section {
    width: min(880px, 100%);
    margin: 0 auto 16px;
}

.carousel-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 5.4;
    max-height: 320px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-soft);
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

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

.carousel-slide {
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.58s var(--ease), transform 0.58s var(--ease);
}

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

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.carousel-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 18px 48px rgba(30, 41, 99, 0.14);
    object-fit: contain;
}

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

.carousel-dot {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 999px;
    background: rgba(16, 22, 40, 0.26);
    cursor: pointer;
    transition: width 0.22s var(--ease), background 0.22s var(--ease);
}

.carousel-dot.active {
    width: 24px;
    background: var(--accent);
}

/* ============ 快捷导航 ============ */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.nav-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: rgba(255, 255, 255, 0.66);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(30, 41, 99, 0.08);
    transition: transform 0.26s var(--ease), background 0.26s var(--ease), box-shadow 0.26s var(--ease), color 0.26s var(--ease);
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: var(--white);
    color: var(--accent);
    box-shadow: 0 16px 38px rgba(99, 102, 241, 0.2);
}

/* ============ 公告栏 ============ */
.notice-section {
    margin-bottom: 16px;
}

.notice-shell {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.notice-label {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.35);
}

.notice-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: 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: 36px;
    white-space: nowrap;
    line-height: 1;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 860;
    animation: noticeScroll 16s linear infinite;
}

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

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

/* ============ 品牌/广告区 ============ */
.brand-section {
    position: relative;
    margin-bottom: 16px;
}

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

.brand-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 128px;
    padding: 16px 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    color: var(--ink);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.52)),
        rgba(255, 255, 255, 0.6);
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(30, 41, 99, 0.1);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
    transition: transform 0.28s var(--ease), background 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.brand-card:hover {
    --lift: -4px;
    background: var(--white);
    box-shadow: 0 20px 44px rgba(99, 102, 241, 0.18);
}

.brand-logo-wrap {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 12px 24px rgba(30, 41, 99, 0.1);
}

.brand-logo {
    max-width: 68px;
    max-height: 68px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-name {
    min-width: 0;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    color: rgba(16, 22, 40, 0.8);
    font-size: 0.9rem;
    font-weight: 920;
}

/* ============ 搜索区 ============ */
.search-section {
    position: sticky;
    top: 10px;
    z-index: 50;
    margin-bottom: 14px;
    padding: 8px;
    background: linear-gradient(to bottom, rgba(244, 245, 251, 0.92), rgba(244, 245, 251, 0.6), transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.search-form {
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}

.search-box:focus-within {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.2);
}

.search-icon,
.search-icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex: 0 0 auto;
    margin-left: 6px;
}

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

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

.search-submit {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    color: var(--white);
    background: var(--grad);
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.32);
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
}

.search-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.4);
}

/* ============ 分类标签 ============ */
.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 2px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.category-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 950;
    border: 1px solid transparent;
    border-radius: 999px;
    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 {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.72);
}

.category-tab.active {
    color: var(--white);
    background: var(--grad);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.34);
    transform: translateY(-2px);
}

/* ============ 游戏列表 ============ */
.games-section {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px) saturate(1.35);
    -webkit-backdrop-filter: blur(20px) saturate(1.35);
}

.games-section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), transparent 38%, rgba(255, 255, 255, 0.28));
    pointer-events: none;
}

.section-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

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

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

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

.game-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 12px 34px rgba(30, 41, 99, 0.1);
    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: 220px;
}

.game-card:hover {
    --lift: -5px;
    --scale: 1.012;
    background: var(--white);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 24px 58px rgba(99, 102, 241, 0.24);
}

.game-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eef1fb;
}

.game-media.color-1 { background: linear-gradient(145deg, #eef2ff, #e0e7ff); }
.game-media.color-2 { background: linear-gradient(145deg, #fdf4ff, #fae8ff); }
.game-media.color-3 { background: linear-gradient(145deg, #ecfeff, #cffafe); }
.game-media.color-4 { background: linear-gradient(145deg, #fef9c3, #fef08a); }
.game-media.color-5 { background: linear-gradient(145deg, #fce7f3, #fbcfe8); }
.game-media.color-6 { background: linear-gradient(145deg, #dbeafe, #bfdbfe); }

.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.07);
    filter: contrast(1.05) saturate(1.06);
}

.game-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    max-width: calc(100% - 16px);
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    color: var(--white);
    background: rgba(16, 22, 40, 0.55);
    backdrop-filter: blur(14px) saturate(1.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    font-size: 0.68rem;
    font-weight: 950;
}

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

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

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

.game-type {
    min-width: 0;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.66);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.rating-star {
    color: #f59e0b;
}

.play-button {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    background: var(--grad);
    font-size: 0.88rem;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.32);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease), opacity 0.22s ease;
}

.play-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 16px 36px rgba(99, 102, 241, 0.42);
}

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

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

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

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 8px 22px rgba(30, 41, 99, 0.08);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 950;
    transition: transform 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pagination a:hover {
    color: var(--accent);
    background: var(--white);
    transform: translateY(-2px);
}

.pagination .active {
    color: var(--white);
    background: var(--grad);
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.34);
}

.pagination .disabled {
    opacity: 0.44;
}

/* ============ 页脚 ============ */
.app-footer {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.footer-text {
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 740;
}

/* ============ 游戏弹层（嵌入式打开） ============ */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: #05060f;
}

.game-modal.active {
    display: block;
    animation: modalIn 0.3s var(--ease);
}

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

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

.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%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 200px;
    padding: 22px 26px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: var(--white);
    background: rgba(8, 10, 26, 0.7);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    text-align: center;
    font-weight: 950;
}

.game-loading::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--accent-2);
    animation: spin 0.9s linear infinite;
}

.game-control-shell {
    position: fixed;
    left: calc(14px + env(safe-area-inset-left));
    top: calc(14px + 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(255, 255, 255, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    cursor: pointer;
    transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

.game-menu-toggle:hover {
    transform: translateY(-2px) scale(1.04);
    background: #ffffff;
}

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

.game-action-menu {
    position: absolute;
    left: 0;
    top: 58px;
    width: 168px;
    display: grid;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3);
    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: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: none;
    border-radius: 10px;
    padding: 0 12px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.66);
    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(255, 255, 255, 0.98);
    transform: translateX(3px);
}

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

.game-close-btn {
    position: fixed;
    right: calc(14px + env(safe-area-inset-right));
    top: calc(14px + env(safe-area-inset-top));
    z-index: 10002;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    cursor: pointer;
    transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

.game-close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: #ffffff;
}

/* ============ CQ9 模式选择 ============ */
.cq9-choice-modal {
    position: fixed;
    inset: 0;
    z-index: 10003;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(10, 12, 30, 0.5);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
}

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

.cq9-choice-panel {
    width: min(94vw, 420px);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
        var(--grad-soft);
    box-shadow: var(--shadow);
    animation: panelIn 0.24s var(--ease);
}

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

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

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

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

.cq9-choice-btn {
    color: var(--white);
    background: var(--grad);
    box-shadow: 0 10px 26px rgba(99, 102, 241, 0.32);
}

.cq9-choice-btn.feature {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.cq9-choice-cancel {
    width: 100%;
    margin-top: 10px;
    color: var(--ink-soft);
    background: rgba(16, 22, 40, 0.06);
}

.cq9-choice-btn:hover,
.cq9-choice-cancel:hover {
    transform: translateY(-2px);
}

/* ============ 保护提示 ============ */
.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(5, 6, 15, 0.92);
    text-align: center;
    font-weight: 950;
    font-size: 1.2rem;
}

/* ============ 动画 ============ */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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%);
    }
}

/* ============ 响应式：平板 ============ */
@media (max-width: 1100px) {
    .games-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .app-container {
        padding: 14px 12px 32px;
    }

    .main-nav {
        padding: 32px 20px 28px;
    }

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

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

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

    .carousel-shell {
        aspect-ratio: 16 / 6;
        max-height: 260px;
    }

    .search-section {
        position: relative;
        top: auto;
    }
}

/* ============ 响应式：手机 ============ */
@media (max-width: 620px) {
    .app-container {
        padding: 10px 10px 28px;
    }

    .main-nav {
        padding: 26px 16px 24px;
        margin-bottom: 12px;
        border-radius: 20px;
    }

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

    .nav-subtitle {
        font-size: 0.88rem;
        max-width: 320px;
    }

    .carousel-section {
        margin-bottom: 12px;
    }

    .carousel-shell {
        aspect-ratio: 16 / 8;
        max-height: none;
        border-radius: 18px;
    }

    .carousel-image {
        object-fit: contain;
    }

    .carousel-dots {
        bottom: 8px;
    }

    .quick-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 12px;
        padding: 8px;
        border-radius: 18px;
    }

    .nav-btn {
        min-height: 46px;
        padding: 10px 8px;
        font-size: 0.86rem;
        border-radius: 14px;
    }

    .notice-section {
        margin-bottom: 12px;
    }

    .notice-shell {
        height: 48px;
        padding: 6px 10px;
    }

    .notice-track {
        font-size: 0.84rem;
        animation-duration: 13s;
    }

    .brand-section {
        margin-bottom: 12px;
    }

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

    .brand-card {
        min-height: 100px;
        padding: 12px 8px 10px;
        gap: 8px;
        border-radius: 14px;
    }

    .brand-logo-wrap {
        width: 62px;
        height: 62px;
    }

    .brand-logo {
        max-width: 52px;
        max-height: 52px;
    }

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

    .search-section {
        margin-bottom: 12px;
    }

    .search-submit {
        width: 60px;
        padding: 0;
    }

    .category-tabs {
        margin-bottom: 12px;
    }

    .category-tab {
        min-height: 40px;
        padding: 0 15px;
        font-size: 0.84rem;
    }

    .games-section {
        padding: 12px;
        border-radius: 18px;
    }

    .section-header {
        display: block;
        margin-bottom: 12px;
    }

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

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

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

    .game-card {
        border-radius: 14px;
        contain-intrinsic-size: 150px;
    }

    .game-info {
        padding: 8px;
    }

    .game-title {
        height: 2.05rem;
        font-size: 0.78rem;
    }

    .game-meta {
        display: none;
    }

    .play-button {
        min-height: 32px;
        margin-top: 8px;
        font-size: 0.74rem;
        gap: 5px;
        border-radius: 10px;
    }

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

    .game-badge {
        left: 6px;
        top: 6px;
        max-width: calc(100% - 12px);
        padding: 3px 7px;
        font-size: 0.6rem;
    }

    .pagination a,
    .pagination span {
        min-width: 38px;
        height: 38px;
        padding: 0 12px;
        border-radius: 12px;
    }

    .game-menu-toggle,
    .game-close-btn {
        width: 44px;
        height: 44px;
    }

    .game-menu-toggle img {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 380px) {
    .games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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