/* Игровой хаб: сетки, ленты, команда, 18+ */

:root {
    --gh-panel: #101010;
    --gh-panel-2: #141414;
    --gh-line: rgba(230, 57, 70, 0.18);
    --gh-line-soft: rgba(255, 255, 255, 0.07);
    --gh-muted: #8c8c8c;
    --gh-text: #e9e9e9;
    --gh-green: #28c840;
}

body {
    background: var(--bg-primary, #0a0a0a);
}

[hidden] {
    display: none !important;
}

.gh-hero {
    padding-top: 0.5rem;
    margin-bottom: 2.5rem;
}

.gh-kicker {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    color: var(--accent-text, #e63946);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.gh-hero h1 {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    color: var(--gh-text);
    margin: 0 0 0.7rem;
    padding-left: 1.1rem;
    border-left: 3px solid var(--accent, #e63946);
}

.gh-hero p {
    max-width: 760px;
    color: var(--gh-muted);
    line-height: 1.65;
    font-size: 0.92rem;
}

.gh-anchors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.4rem;
}

.gh-anchor,
.gh-anchors a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.75rem;
    border: 1px solid var(--gh-line);
    border-radius: 6px;
    color: var(--text-secondary, #b8b8b8);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.gh-anchor:hover,
.gh-anchor:focus-visible,
.gh-anchors a:hover,
.gh-anchors a:focus-visible {
    border-color: var(--accent-text, #e63946);
    color: var(--accent-text, #e63946);
    background: rgba(230, 57, 70, 0.06);
    outline: none;
}

.gh-anchor--muted {
    color: var(--gh-muted);
}

.gh-section {
    margin-bottom: 2.6rem;
    scroll-margin-top: 92px;
}

.gh-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.gh-head h2 {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 1.12rem;
    color: var(--gh-text);
    margin: 0;
}

.gh-head h2 .gh-dollar {
    color: var(--accent-text, #e63946);
    margin-right: 0.25rem;
}

.gh-head__note {
    color: var(--gh-muted);
    font-size: 0.7rem;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
}

.gh-link {
    color: var(--accent-text, #e63946);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(230, 57, 70, 0.35);
}

.gh-link:hover {
    border-bottom-style: solid;
}

.gh-more-link {
    color: var(--accent-text, #e63946);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(230, 57, 70, 0.35);
}

.gh-more-link:hover {
    border-bottom-style: solid;
}

body.gh-modal-open {
    overflow: hidden;
}

.gh-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.2rem;
    border: 1px solid var(--gh-line-soft);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.02);
}

.gh-tab {
    appearance: none;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--gh-muted);
    padding: 0.35rem 0.7rem;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.7rem;
    cursor: pointer;
}

.gh-tab:hover {
    color: var(--gh-text);
}

.gh-tab[aria-selected="true"] {
    background: var(--accent, #e63946);
    color: #fff;
}

.gh-news-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.gh-news-grid .news-card {
    min-width: 0;
}

.gh-news-grid .news-card__title {
    font-size: 0.76rem;
}

.gh-deals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.gh-deals .game__deal-card {
    min-width: 0;
}

.gh-deals .game__deal-card.is-hidden {
    display: none;
}

.gh-deals .game__deal-card-name {
    font-size: 0.76rem;
}

.gh-more-row {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.gh-more {
    appearance: none;
    border: 1px solid var(--gh-line);
    border-radius: 6px;
    background: transparent;
    color: var(--gh-text);
    padding: 0.55rem 1.1rem;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.gh-more:hover {
    border-color: var(--accent-text, #e63946);
    color: var(--accent-text, #e63946);
    background: rgba(230, 57, 70, 0.06);
}

.gh-strip {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding: 0.05rem 0 0.65rem;
    scroll-snap-type: x mandatory;
    scrollbar-color: rgba(230, 57, 70, 0.4) transparent;
}

.gh-strip > * {
    flex: 0 0 228px;
    scroll-snap-align: start;
}

.gh-strip .game__deal-card-name {
    font-size: 0.74rem;
}

.gh-rank {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: rgba(10, 10, 10, 0.86);
    border: 1px solid var(--gh-line);
    color: var(--accent-text, #e63946);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.66rem;
}

.gh-card-wrap {
    position: relative;
}

.gh-soon-badge {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: var(--gh-text);
    font-size: 0.64rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.gh-freebies {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

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

.gh-type {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.58rem;
    color: #d6b46a;
    border: 1px solid rgba(214, 180, 106, 0.35);
    border-radius: 4px;
    padding: 1px 5px;
    margin-right: auto;
}

.gh-freebies .game__deal-card {
    min-width: 0;
}

.gh-freebies-note {
    color: var(--gh-muted);
    font-size: 0.68rem;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    margin-top: 0.5rem;
}

.gh-roster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 0.7rem;
}

#teamTopPanel,
#teamSharedPanel {
    margin-top: 1.2rem;
}

.gh-member {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--gh-line-soft);
    border-radius: 7px;
    background: var(--gh-panel);
    min-width: 0;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.gh-member:hover {
    border-color: var(--gh-line);
    background: var(--gh-panel-2);
}

.gh-member__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--gh-line);
    object-fit: cover;
    flex: 0 0 auto;
    background: #181818;
}

.gh-member__body {
    min-width: 0;
    flex: 1;
}

.gh-member__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--gh-text);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-member__status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #555;
    flex: 0 0 auto;
}

.gh-member__status.is-online {
    background: var(--gh-green);
    box-shadow: 0 0 8px rgba(40, 200, 64, 0.7);
}

.gh-member__now,
.gh-member__meta {
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.64rem;
    color: var(--gh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-member__now {
    color: var(--gh-green);
    margin-top: 0.15rem;
}

.gh-member__meta {
    margin-top: 0.15rem;
}

.gh-member__arrow {
    color: var(--gh-muted);
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.gh-note {
    margin-top: 0.8rem;
    color: var(--gh-muted);
    font-size: 0.68rem;
    line-height: 1.6;
}

.gh-age-note {
    margin-top: 0.7rem;
    color: var(--gh-muted);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.68rem;
}

.gh-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--gh-line);
    border-radius: 999px;
    background: transparent;
    color: var(--gh-muted);
    padding: 0.3rem 0.65rem 0.3rem 0.35rem;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.68rem;
    cursor: pointer;
}

.gh-switch:hover {
    color: var(--gh-text);
    border-color: var(--accent-text, #e63946);
}

.gh-switch__track {
    width: 26px;
    height: 15px;
    border-radius: 999px;
    background: #2a2a2a;
    position: relative;
    transition: background 0.2s;
}

.gh-switch__track::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #8a8a8a;
    transition: transform 0.2s, background 0.2s;
}

.gh-switch[aria-pressed="true"] {
    color: var(--accent-text, #e63946);
    border-color: var(--accent-text, #e63946);
}

.gh-switch[aria-pressed="true"] .gh-switch__track {
    background: rgba(230, 57, 70, 0.3);
}

.gh-switch[aria-pressed="true"] .gh-switch__track::after {
    transform: translateX(11px);
    background: var(--accent, #e63946);
}

.gh-adult-card {
    display: none;
}

html.gh-adult-ok .gh-adult-card {
    display: flex;
}

.gh-adult-cover {
    width: 100%;
    aspect-ratio: 460 / 215;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 30% 30%, rgba(230, 57, 70, 0.35), transparent 55%),
        repeating-linear-gradient(135deg, #151515 0 8px, #101010 8px 16px);
    color: var(--accent-text, #e63946);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.gh-empty {
    color: var(--gh-muted);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    padding: 0.8rem;
}

.gh-modal[hidden] {
    display: none;
}

.gh-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gh-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(3px);
}

.gh-modal__box {
    position: relative;
    width: min(100%, 390px);
    background: #111;
    border: 1px solid var(--gh-line);
    border-radius: 9px;
    padding: 1.2rem;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.65);
}

.gh-modal__kicker {
    color: var(--accent-text, #e63946);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.68rem;
    margin-bottom: 0.5rem;
}

.gh-modal__box h3 {
    color: var(--gh-text);
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 1.02rem;
    margin: 0 0 0.5rem;
}

.gh-modal__box p {
    color: var(--gh-muted);
    font-size: 0.78rem;
    line-height: 1.6;
    margin: 0 0 1rem;
}

.gh-modal__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gh-modal__btn {
    flex: 1;
    min-width: 120px;
    appearance: none;
    border: 1px solid var(--gh-line);
    border-radius: 6px;
    background: transparent;
    color: var(--gh-text);
    padding: 0.55rem 0.7rem;
    font-family: var(--font-mono, "JetBrains Mono", monospace);
    font-size: 0.72rem;
    cursor: pointer;
}

.gh-modal__btn--yes {
    background: var(--accent, #e63946);
    border-color: var(--accent, #e63946);
    color: #fff;
}

.gh-modal__btn:hover {
    filter: brightness(1.1);
}

@media (max-width: 1100px) {
    .gh-news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

@media (max-width: 760px) {
    .game.module {
        padding-top: calc(60px + 1.25rem);
    }

    .gh-news-grid,
    .gh-deals,
    .gh-freebies,
    .gh-freebies--page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gh-head {
        align-items: flex-start;
    }

    .gh-tabs {
        width: 100%;
    }

    .gh-tab {
        flex: 1;
    }

    .gh-strip > * {
        flex-basis: 72vw;
    }
}

@media (max-width: 460px) {
    .gh-hero h1 {
        font-size: 1.9rem;
    }

    .gh-roster {
        grid-template-columns: 1fr;
    }
}
