/**
 * 游戏大厅 /games — Neon Cabinet
 * 内容型长页：自然滚动，不走 viewport-shell
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=Noto+Sans+SC:wght@400;500;700&display=swap');

/* 大厅深色铺满内容区，避免白底露边 */
body:has(.gh-page) {
    background: #070b12 !important;
    color: #e8eefc;
}

#main-content:has(.gh-page) {
    background: #070b12;
    padding-bottom: 0;
}

.gh-page {
    --gh-bg: #070b12;
    --gh-panel: rgba(16, 22, 36, 0.88);
    --gh-line: rgba(255, 176, 32, 0.22);
    --gh-amber: #ffb020;
    --gh-amber-hot: #ff6b2d;
    --gh-mint: #2ee6a6;
    --gh-text: #e8eefc;
    --gh-muted: #8b97b0;
    --gh-rank-1: #ffd56a;
    --gh-rank-2: #c0d0e8;
    --gh-rank-3: #d4956a;
    position: relative;
    min-height: 60vh;
    color: var(--gh-text);
    font-family: 'Noto Sans SC', system-ui, sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 15% -10%, rgba(255, 176, 32, 0.16), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 10%, rgba(46, 230, 166, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 60% at 50% 100%, rgba(91, 140, 255, 0.08), transparent 55%),
        var(--gh-bg);
    overflow: hidden;
}

.gh-page::before {
    content: '';
    pointer-events: none;
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: 0.35;
    z-index: 0;
}

.gh-page::after {
    content: '';
    pointer-events: none;
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 0;
}

.gh-inner {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
}

.gh-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 2.25rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--gh-line);
}

.gh-kicker {
    font-family: Orbitron, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gh-mint);
    margin-bottom: 0.6rem;
}

.gh-title {
    font-family: Orbitron, sans-serif;
    font-weight: 800;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: 0.04em;
    margin: 0 0 0.75rem;
    background: linear-gradient(105deg, #fff 10%, var(--gh-amber) 55%, var(--gh-mint) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gh-sub {
    color: var(--gh-muted);
    font-size: 1.02rem;
    max-width: 36rem;
    line-height: 1.55;
    margin: 0;
}

.gh-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.gh-guest-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(46, 230, 166, 0.35);
    background: rgba(46, 230, 166, 0.08);
    color: var(--gh-mint);
    font-size: 0.82rem;
    font-weight: 500;
}

.gh-guest-chip i {
    opacity: 0.85;
}

.gh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--gh-line);
    background: linear-gradient(180deg, rgba(255, 176, 32, 0.16), rgba(255, 176, 32, 0.05));
    color: var(--gh-amber);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.gh-btn:hover {
    transform: translateY(-1px);
    border-color: var(--gh-amber);
    box-shadow: 0 8px 24px rgba(255, 176, 32, 0.18);
}

.gh-btn-ghost {
    background: transparent;
    color: var(--gh-text);
}

.gh-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.gh-panel {
    background: var(--gh-panel);
    border: 1px solid var(--gh-line);
    border-radius: 18px;
    padding: 1.15rem 1.2rem 1.3rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.gh-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.gh-panel-title {
    font-family: Orbitron, sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    margin: 0;
    color: var(--gh-text);
}

.gh-panel-title span {
    color: var(--gh-amber);
}

.gh-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 176, 32, 0.12);
    color: var(--gh-amber);
    border: 1px solid rgba(255, 176, 32, 0.25);
}

.gh-hot-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.gh-hot-item {
    display: grid;
    grid-template-columns: 2rem 2.75rem 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.55rem 0.45rem;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.gh-hot-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.gh-rank {
    font-family: Orbitron, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    color: var(--gh-muted);
}

.gh-hot-item:nth-child(1) .gh-rank { color: var(--gh-rank-1); text-shadow: 0 0 12px rgba(255, 213, 106, 0.45); }
.gh-hot-item:nth-child(2) .gh-rank { color: var(--gh-rank-2); }
.gh-hot-item:nth-child(3) .gh-rank { color: var(--gh-rank-3); }

.gh-hot-ico,
.gh-card-ico,
.gh-my-ico {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1320;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gh-hot-ico img,
.gh-card-ico img,
.gh-my-ico img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gh-hot-ico .fa,
.gh-card-ico .fa,
.gh-my-ico .fa {
    font-size: 1.25rem;
    color: var(--gh-amber);
}

.gh-hot-meta {
    min-width: 0;
}

.gh-hot-name {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-heat-bar {
    margin-top: 0.35rem;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.gh-heat-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gh-amber), var(--gh-mint));
    transform-origin: left center;
    animation: gh-heat-grow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gh-heat-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.gh-heat-num {
    font-family: Orbitron, sans-serif;
    font-size: 0.72rem;
    color: var(--gh-muted);
}

.gh-main-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.gh-my-strip {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x proximity;
}

.gh-my-strip::-webkit-scrollbar {
    height: 6px;
}

.gh-my-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 176, 32, 0.35);
    border-radius: 999px;
}

.gh-my-tile {
    flex: 0 0 auto;
    width: 148px;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    padding: 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.gh-my-tile:hover {
    border-color: rgba(46, 230, 166, 0.45);
    transform: translateY(-3px);
    background: rgba(46, 230, 166, 0.05);
}

.gh-my-tile.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.gh-my-ico {
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 0.65rem;
}

.gh-my-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.gh-my-desc {
    font-size: 0.72rem;
    color: var(--gh-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gh-empty {
    color: var(--gh-muted);
    font-size: 0.9rem;
    padding: 1rem 0.25rem;
}

.gh-section-head {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.gh-section-head h2 {
    font-family: Orbitron, sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    margin: 0;
}

.gh-section-head .gh-muted-label {
    color: var(--gh-muted);
    font-size: 0.8rem;
}

.gh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.gh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(160deg, rgba(255, 176, 32, 0.06), transparent 40%),
        rgba(10, 14, 23, 0.75);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
}

.gh-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 176, 32, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 176, 32, 0.08);
}

.gh-card.is-coming {
    opacity: 0.78;
}

.gh-card-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.gh-card-ico {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 12px;
}

.gh-card h3 {
    margin: 0 0 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.gh-status {
    display: inline-block;
    font-size: 0.68rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.gh-status-live {
    color: var(--gh-mint);
    border-color: rgba(46, 230, 166, 0.35);
    background: rgba(46, 230, 166, 0.08);
}

.gh-status-coming {
    color: var(--gh-muted);
    border-color: rgba(139, 151, 176, 0.35);
    background: rgba(139, 151, 176, 0.08);
}

.gh-card p {
    margin: 0 0 1rem;
    color: var(--gh-muted);
    font-size: 0.86rem;
    line-height: 1.45;
    flex: 1;
}

.gh-card-actions {
    display: flex;
    gap: 0.5rem;
}

.gh-play {
    flex: 1;
    text-align: center;
    text-decoration: none;
    min-height: 40px;
    line-height: 40px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    background: linear-gradient(135deg, var(--gh-amber), var(--gh-amber-hot));
    color: #1a1005;
    border: none;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.gh-play:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.gh-play.is-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--gh-muted);
    cursor: not-allowed;
    pointer-events: none;
}

.gh-fade {
    opacity: 0;
    transform: translateY(16px);
    animation: gh-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.gh-fade:nth-child(1) { animation-delay: 0.05s; }
.gh-fade:nth-child(2) { animation-delay: 0.12s; }
.gh-fade:nth-child(3) { animation-delay: 0.18s; }
.gh-fade:nth-child(4) { animation-delay: 0.24s; }

@keyframes gh-rise {
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .gh-fade,
    .gh-heat-fill {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* Settings modal */
.gh-mask {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(3, 6, 12, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gh-mask.show {
    display: flex;
}

.gh-modal {
    width: min(720px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    background: #0e1422;
    border: 1px solid var(--gh-line);
    border-radius: 16px;
    padding: 1.25rem 1.35rem 1.4rem;
    color: var(--gh-text);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.gh-modal h2 {
    font-family: Orbitron, sans-serif;
    font-size: 1.05rem;
    margin: 0 0 0.35rem;
}

.gh-modal-sub {
    color: var(--gh-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.gh-modal table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

.gh-modal th,
.gh-modal td {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.gh-modal th {
    color: var(--gh-muted);
    font-weight: 500;
    font-size: 0.75rem;
}

.gh-sort-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.gh-sort-lists h3 {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    color: var(--gh-amber);
}

.gh-sort-lists ul {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 80px;
    border: 1px dashed rgba(255, 176, 32, 0.25);
    border-radius: 10px;
    padding: 0.35rem;
}

.gh-sort-lists li {
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.3rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    cursor: grab;
    font-size: 0.85rem;
}

.gh-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.gh-login-hint {
    color: var(--gh-amber);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
    .gh-hero {
        grid-template-columns: 1fr;
    }
    .gh-hero-side {
        align-items: flex-start;
    }
    .gh-layout {
        grid-template-columns: 1fr;
    }
    .gh-sort-lists {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 639px) {
    .gh-inner {
        padding: 1.35rem 1rem 3rem;
    }
    .gh-hot-item {
        grid-template-columns: 1.6rem 2.4rem 1fr auto;
        gap: 0.45rem;
    }
    .gh-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .gh-card {
        display: grid;
        grid-template-columns: 3.2rem 1fr;
        grid-template-rows: auto auto;
        gap: 0.35rem 0.75rem;
        align-items: center;
        padding: 0.85rem 0.9rem;
    }
    .gh-card-top {
        display: contents;
    }
    .gh-card-ico {
        grid-row: 1 / span 2;
        width: 3.2rem;
        height: 3.2rem;
    }
    .gh-card p {
        grid-column: 2;
        margin: 0;
        font-size: 0.85rem;
    }
    .gh-card-actions {
        grid-column: 1 / -1;
        margin-top: 0.25rem;
    }
    .gh-my-strip {
        grid-template-columns: 1fr;
    }
}
