:root {
    --page: #f6f6f4;
    --ink: #080808;
    --ink-soft: rgba(8, 8, 8, 0.66);
    --ink-faint: rgba(8, 8, 8, 0.46);
    --glass: rgba(255, 255, 255, 0.64);
    --glass-strong: rgba(255, 255, 255, 0.84);
    --line: rgba(0, 0, 0, 0.1);
    --white-line: rgba(255, 255, 255, 0.82);
    --white: #ffffff;
    --black: #090909;
    --shadow: 0 26px 90px rgba(18, 18, 18, 0.15);
    --shadow-soft: 0 14px 42px rgba(18, 18, 18, 0.1);
    --radius: 8px;
    --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(255, 255, 255, 0.98), transparent 30rem),
        radial-gradient(circle at 82% 10%, rgba(216, 216, 214, 0.68), transparent 32rem),
        linear-gradient(135deg, #fafaf8 0%, #ececea 46%, #ffffff 100%);
    line-height: 1.5;
    overflow-x: hidden;
}

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

body::before {
    background-image:
        linear-gradient(rgba(0,0,0,0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.026) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent 76%);
}

body::after {
    background:
        linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.45) 32%, transparent 58%),
        radial-gradient(circle at var(--mx, 50%) var(--my, 18%), rgba(255,255,255,0.86), transparent 18rem);
    opacity: 0.72;
}

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: min(1120px, 100%);
    margin: 0 auto;
    padding: 18px;
    opacity: 0;
    transform: translateY(12px);
    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(--white-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;
    padding: 28px 22px;
    margin-bottom: 12px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.48)),
        linear-gradient(135deg, rgba(0,0,0,0.035), transparent);
    box-shadow: var(--shadow);
}

.main-nav::before,
.carousel-shell::before,
.games-section::before,
.brand-section::before,
.notice-shell::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(var(--radius) - 1px);
    background: linear-gradient(135deg, rgba(255,255,255,0.82), transparent 36%, rgba(255,255,255,0.28));
    pointer-events: none;
}

.main-nav::after {
    content: "";
    position: absolute;
    right: -88px;
    top: -118px;
    width: 350px;
    height: 350px;
    border-radius: 999px;
    background: rgba(0,0,0,0.075);
    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: 3.45rem;
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: 0;
}

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

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

.carousel-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 5.2;
    min-height: 112px;
    max-height: 238px;
    border: none;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    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,
.carousel-slide {
    position: absolute;
    inset: 0;
}

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

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

.carousel-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 1px solid rgba(255,255,255,0.84);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.46);
    box-shadow: 0 16px 44px rgba(0,0,0,0.12);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    object-fit: contain;
}

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

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

.carousel-dot.active {
    width: 22px;
    background: var(--black);
}

.quick-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px;
    background: rgba(255,255,255,0.56);
}

.nav-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: var(--radius);
    color: var(--ink);
    background: rgba(255,255,255,0.58);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 930;
    box-shadow: 0 10px 28px rgba(0,0,0,0.07);
    transition: transform 0.26s var(--ease), background 0.26s var(--ease), box-shadow 0.26s var(--ease);
}

.nav-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 18px 42px rgba(0,0,0,0.11);
}

.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: 12px;
}

.notice-shell {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.58);
}

.notice-label {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.72);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 10px 24px rgba(0,0,0,0.1);
}

.notice-icon {
    width: 23px;
    height: 23px;
    object-fit: contain;
}

.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: 34px;
    white-space: nowrap;
    line-height: 1;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 880;
    animation: noticeScroll 14s 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;
    overflow: hidden;
    margin-bottom: 12px;
    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(5, minmax(0, 1fr));
    gap: 9px;
}

.brand-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 122px;
    padding: 14px 10px 13px;
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: var(--radius);
    color: var(--ink);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.76), rgba(255,255,255,0.46)),
        rgba(255,255,255,0.62);
    text-decoration: none;
    box-shadow: 0 14px 36px rgba(0,0,0,0.1);
    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: -3px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 22px 50px rgba(0,0,0,0.12);
}

.brand-logo-wrap {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.8);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.94), 0 14px 28px rgba(0,0,0,0.1);
}

.brand-logo {
    max-width: 66px;
    max-height: 66px;
    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(8,8,8,0.78);
    font-size: 0.9rem;
    font-weight: 930;
}

.search-section {
    position: sticky;
    top: 0;
    z-index: 50;
    margin-bottom: 12px;
    padding: 8px 0;
    background: linear-gradient(to bottom, rgba(246,246,244,0.94), rgba(246,246,244,0.58), transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.search-form {
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

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

.search-input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    color: var(--ink);
    background: transparent;
    font-size: 1rem;
    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: var(--radius);
    color: var(--white);
    background: var(--black);
    box-shadow: 0 12px 30px rgba(0,0,0,0.16);
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.22s var(--ease), background 0.22s var(--ease);
}

.search-submit:hover {
    transform: translateY(-1px);
    background: #242424;
}

.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    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: 42px;
    padding: 0 16px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 950;
    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: rgba(10,10,10,0.92);
    box-shadow: 0 16px 38px rgba(0,0,0,0.16);
    transform: translateY(-2px);
}

.games-section {
    position: relative;
    overflow: hidden;
    padding: 18px;
    background: rgba(255,255,255,0.54);
    box-shadow: var(--shadow);
}

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

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

.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: 12px;
}

.game-card {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,0.62);
    box-shadow: 0 14px 40px rgba(0,0,0,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: 230px;
}

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

.game-card:hover {
    --lift: -5px;
    --scale: 1.012;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 26px 64px rgba(0,0,0,0.15);
}

.game-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.92), rgba(230,230,228,0.72)),
        #f1f1ef;
}

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

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

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

.game-title {
    height: 2.55rem;
    color: var(--ink);
    font-size: 0.92rem;
    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: 9px 0;
    font-size: 0.75rem;
}

.game-type {
    min-width: 0;
    padding: 3px 8px;
    border: 1px solid rgba(255,255,255,0.68);
    border-radius: var(--radius);
    color: var(--ink-soft);
    background: rgba(255,255,255,0.58);
    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(--black);
}

.play-button {
    width: 100%;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    background: var(--black);
    font-size: 0.86rem;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(0,0,0,0.14);
    transition: transform 0.22s var(--ease), background 0.22s var(--ease), opacity 0.22s ease, box-shadow 0.22s var(--ease);
}

.play-button:hover {
    transform: translateY(-2px);
    background: #242424;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.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: 22px 0 0;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: var(--radius);
    color: var(--ink-soft);
    background: rgba(255,255,255,0.58);
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 950;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.pagination a:hover,
.pagination .active {
    color: var(--white);
    background: var(--black);
}

.pagination .disabled {
    opacity: 0.46;
}

.app-footer {
    margin-top: 16px;
    padding: 20px;
    color: var(--ink-soft);
    text-align: center;
    font-size: 0.86rem;
    font-weight: 740;
}

.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(255,255,255,0.26);
    border-radius: var(--radius);
    color: var(--white);
    background: rgba(0,0,0,0.58);
    box-shadow: 0 24px 80px rgba(0,0,0,0.28);
    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(255,255,255,0.42);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.68);
    box-shadow: 0 18px 48px rgba(0,0,0,0.22);
    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(255,255,255,0.86);
}

.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(255,255,255,0.42);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.72);
    box-shadow: 0 20px 54px rgba(0,0,0,0.24);
    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.58);
    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.92);
    transform: translateX(2px);
}

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

.cq9-choice-modal {
    position: fixed;
    inset: 0;
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(245,245,243,0.28);
    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(255,255,255,0.82);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.72);
    box-shadow: var(--shadow);
    animation: panelIn 0.24s var(--ease);
}

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

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

.cq9-choice-btn {
    color: var(--white);
    background: var(--black);
}

.cq9-choice-btn.feature {
    color: var(--ink);
    background: rgba(255,255,255,0.74);
}

.cq9-choice-cancel {
    width: 100%;
    margin-top: 8px;
    color: var(--ink-soft);
    background: rgba(255,255,255,0.56);
}

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

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

@media (max-width: 1180px) {
    .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;
    }

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

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

    .carousel-shell {
        aspect-ratio: 16 / 5.8;
        min-height: 128px;
    }
}

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

    .main-nav {
        padding: 22px 16px;
    }

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

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

    .carousel-shell {
        min-height: 116px;
        aspect-ratio: 16 / 7.2;
    }

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

    .nav-btn {
        min-height: 44px;
        padding: 8px 6px;
        font-size: 0.78rem;
    }

    .notice-label {
        width: 38px;
        height: 38px;
    }

    .notice-icon {
        width: 24px;
        height: 24px;
    }

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

    .brand-card {
        min-height: 104px;
        padding: 12px 8px 10px;
    }

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

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

    .games-section {
        padding: 10px;
    }

    .section-header {
        display: block;
    }

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

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

    .game-info {
        padding: 8px;
    }

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

    .game-meta {
        display: none;
    }

    .play-button {
        min-height: 34px;
        margin-top: 8px;
        font-size: 0.76rem;
    }

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

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

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

body {
    display: flex;
    justify-content: center;
}

.app-container {
    width: 100%;
    max-width: 560px;
    min-height: 100vh;
    padding: 12px 14px 28px;
}

.main-nav {
    margin-bottom: 12px;
    padding: 22px 18px;
    border-radius: 28px;
}

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

.nav-title {
    font-size: 2.18rem;
    line-height: 1.04;
}

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

.carousel-section {
    width: 100%;
    margin: 0 0 12px;
}

.carousel-shell {
    width: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    overflow: visible;
    border-radius: 28px;
    transform: none;
}

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

.carousel-slide {
    position: relative;
    inset: auto;
    display: none;
    place-items: unset;
    opacity: 1;
    transform: none;
}

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

.carousel-image {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.6);
    box-shadow: 0 14px 36px rgba(0,0,0,0.1);
}

.carousel-dots {
    bottom: 8px;
    padding: 5px;
}

.carousel-dot {
    width: 7px;
    height: 7px;
}

.carousel-dot.active {
    width: 20px;
}

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

.nav-btn {
    min-height: 48px;
    border-radius: 19px;
    font-size: 0.92rem;
}

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

.notice-shell {
    height: 50px;
    padding: 7px 12px;
    border-radius: 999px;
}

.notice-label {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #111;
}

.notice-icon {
    width: 21px;
    height: 21px;
    filter: invert(1);
}

.notice-track {
    gap: 30px;
    font-size: 0.9rem;
    animation-duration: 12s;
}

.notice-track span {
    height: 36px;
}

.brand-section {
    margin: 18px 2px 16px;
}

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

.brand-card {
    min-height: auto;
    padding: 0;
    gap: 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.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;
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.brand-name {
    font-size: 0.84rem;
    line-height: 1.22;
    color: rgba(8,8,8,0.82);
}

.search-section {
    position: relative;
    top: auto;
    margin-bottom: 12px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.search-box {
    border-radius: 20px;
    padding: 8px;
}

.search-icon,
.search-icon-img {
    width: 28px;
    height: 28px;
}

.search-input {
    font-size: 0.94rem;
}

.search-submit {
    height: 42px;
    border-radius: 16px;
}

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

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

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

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

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

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

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

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

.game-info {
    padding: 7px;
}

.game-title {
    height: 2rem;
    font-size: 0.72rem;
    line-height: 1.32;
}

.game-meta {
    display: none;
}

.play-button {
    min-height: 30px;
    margin-top: 7px;
    border-radius: 12px;
    font-size: 0.66rem;
    gap: 4px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

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

.game-badge {
    left: 5px;
    top: 5px;
    max-width: calc(100% - 10px);
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 0.58rem;
}

.pagination a,
.pagination span {
    min-width: 36px;
    height: 36px;
    border-radius: 14px;
}

@media (min-width: 480px) {
    .quick-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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