/* Стили для секции игр */
.games-section {
    background: rgba(30, 30, 40, 0.7);
    border-radius: 18px;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 2.5rem;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

.games-section h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Контейнер для игр */
#games-container {
    position: relative;
    z-index: 2;
    margin: 84px auto;
    max-width: 1600px;
    padding: 2rem 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(30, 30, 40, 0.35);
    border-radius: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    backdrop-filter: blur(2px);
}

/* Сетка игр */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    justify-items: center;
}

.games-catalog-scroll-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem 2rem;
}

.games-catalog-scroll-ui[hidden] {
    display: none !important;
}

.games-catalog-scroll-meta {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}

.games-catalog-load-more {
    appearance: none;
    border: 1px solid rgba(255, 215, 0, 0.45);
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
    border-radius: 999px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.games-catalog-load-more:hover {
    background: rgba(255, 215, 0, 0.22);
    transform: translateY(-1px);
}

.games-catalog-load-more:disabled {
    opacity: 0.45;
    cursor: default;
    transform: none;
}

.games-catalog-scroll-sentinel {
    width: 100%;
    height: 1px;
}

/* Карточка игры */
.game-card {
    background: rgba(30, 30, 40, 0.7) !important;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    border: 1.5px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: background 0.2s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Обложка игры */
.game-header {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #181a1f;
}

.game-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: none;
}

/* Информация об игре */
.game-info {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    background: linear-gradient(0deg, rgba(20,20,30,0.65) 70%, rgba(20,20,31,0.1) 100%);
    padding: 1rem 1.2rem 0.7rem 1.2rem;
}

.game-title, .game-info h3 {
    color: #fff !important;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.2em 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

a.game-title-link {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
    display: inline-block;
}

a.game-title-link:hover {
    color: #fde68a !important;
}

.game-public-links {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

a.game-link-btn {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    transition: background 0.2s, border-color 0.2s;
}

a.game-link-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.35);
}

a.game-link-book {
    background: rgba(109, 40, 217, 0.55);
    border-color: rgba(167, 139, 250, 0.45);
}

a.game-link-book:hover {
    background: rgba(124, 58, 237, 0.72);
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7em;
    font-size: 0.98em;
    color: #ffd700;
    font-weight: 500;
}

.game-meta .genre {
    color: #ffd700;
    font-weight: 500;
}

.game-meta .rating {
    color: #fff;
    background: #ffd700;
    border-radius: 0.7em;
    padding: 0.1em 0.7em;
    font-size: 0.95em;
    margin-left: 0.5em;
}

.game-description {
    color: #eaeaea;
    font-size: 1em;
    padding: 1.1em 1.2em 0.5em 1.2em;
    flex: 1 1 auto;
}

/* Кнопки и интерактивные элементы */
.game-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.game-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.game-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Медиа контент */
.game-media {
    margin-top: 1rem;
}

.screenshots-slider {
    display: flex;
    gap: 0.7em;
    padding: 0.7em 1.2em 0 1.2em;
    overflow-x: auto;
}

.screenshot img {
    width: 110px;
    height: 70px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.13);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: transform 0.2s;
    background: #222;
}

.screenshot img:hover {
    transform: scale(1.07);
    border-color: #ffd700;
}

.video-container {
    padding: 0.7em 1.2em 1em 1.2em;
}

.video-container iframe {
    width: 100%;
    min-height: 180px;
    border-radius: 10px;
    border: none;
    background: #181a1f;
}

/* Модальное окно для скриншотов */
.screenshot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.screenshot-modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* Социальные элементы */
.game-social {
    display: flex;
    align-items: center;
    gap: 1.2em;
    padding: 0.7em 1.2em 1em 1.2em;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 1em;
}

.game-social .rating {
    color: #ffd700;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-size: 1.1em;
}

.game-social .popularity,
.game-social .admin-recommendation {
    display: none !important;
}

.game-social .platform-label {
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-left: 1.5em;
}
.game-social .platform-label i {
    font-size: 1.2em;
    color: #fff;
}

.platform-label-corner {
    position: absolute;
    top: 0.7em;
    right: 0.9em;
    z-index: 2;
    background: rgba(30, 30, 40, 0.7);
    border-radius: 0 0 0 1.2em;
    padding: 0.45em 1.1em 0.35em 1.1em;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.13);
    pointer-events: none;
}
.platform-label-corner i {
    font-size: 1.2em;
    color: #fff;
}

.platform-label-corner i + i {
    margin-left: 0.3em;
}

.game-media-row {
    display: flex;
    gap: 16px;
    margin: 16px 0 20px 0;
    justify-content: center;
    align-items: center;
}
.media-thumb {
    position: relative;
    width: 120px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: box-shadow 0.2s;
}
.media-thumb:hover {
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.18);
}
.media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.play-icon, .gallery-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.7));
}
.media-modal {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}
.media-modal-content {
    background: #181818;
    border-radius: 12px;
    padding: 24px 24px 16px 24px;
    position: relative;
    min-width: 320px;
    min-height: 180px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.media-modal-close {
    position: absolute;
    right: 18px;
    top: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.18s;
}
.media-modal-close:hover {
    transform: scale(1.15);
}
.media-modal-video iframe {
    width: 60vw;
    height: 34vw;
    max-width: 800px;
    max-height: 450px;
    border-radius: 8px;
    background: #000;
}
.game-video-player-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}
.game-video-stage {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}
.game-video-hosted {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    background: #000;
}
.game-video-brand {
    pointer-events: none;
}
.game-video-brand-logo {
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.55));
}
.game-video-brand--top-left,
.game-video-brand--bottom-left {
    max-width: calc(100% - 48px);
}
.game-video-brand--top-right,
.game-video-brand--bottom-right {
    max-width: calc(100% - 48px);
}
.game-video-hosted::-webkit-media-controls-fullscreen-button,
.game-detail-video::-webkit-media-controls-fullscreen-button {
    display: none;
}
.game-video-fs-btn {
    position: absolute;
    right: 8px;
    bottom: 48px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.85;
    transition: opacity 0.15s ease, background 0.15s ease;
}
.game-video-fs-btn:hover,
.game-video-fs-btn:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
    outline: none;
}
.game-video-fs-btn.is-active {
    background: rgba(255, 255, 255, 0.2);
}
.game-video-player-wrap:fullscreen .game-video-fs-btn,
.game-video-player-wrap:-webkit-full-screen .game-video-fs-btn,
.game-detail-video-wrap:fullscreen .game-video-fs-btn,
.game-detail-video-wrap:-webkit-full-screen .game-video-fs-btn {
    right: 16px;
    bottom: 56px;
}
.game-detail-breadcrumbs {
    margin: 0 0 16px;
    font-size: 0.9rem;
}
.game-detail-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
}
.game-detail-breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.45);
}
.game-detail-breadcrumbs a {
    color: #c4b5fd;
    text-decoration: none;
}
.game-detail-breadcrumbs a:hover {
    text-decoration: underline;
}
.game-detail-videos-title,
.game-detail-shots-title {
    margin: 24px 0 12px;
    font-size: 1.15rem;
    color: #fff;
}
.game-detail-videos {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.game-detail-video {
    max-width: 100%;
    width: 100%;
    max-height: 420px;
    border-radius: 8px;
    background: #000;
    display: block;
}
.game-detail-video-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
}
.game-video-player-wrap:fullscreen,
.game-video-player-wrap:-webkit-full-screen,
.game-detail-video-wrap:fullscreen,
.game-detail-video-wrap:-webkit-full-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: none;
    background: #000;
    border-radius: 0;
    overflow: hidden;
}
.game-video-player-wrap:fullscreen .game-video-stage,
.game-video-player-wrap:-webkit-full-screen .game-video-stage,
.game-detail-video-wrap:fullscreen .game-video-stage,
.game-detail-video-wrap:-webkit-full-screen .game-video-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}
.game-video-player-wrap:fullscreen .game-video-hosted,
.game-video-player-wrap:-webkit-full-screen .game-video-hosted,
.game-video-player-wrap:fullscreen .game-detail-video,
.game-video-player-wrap:-webkit-full-screen .game-detail-video,
.game-detail-video-wrap:fullscreen .game-video-hosted,
.game-detail-video-wrap:-webkit-full-screen .game-video-hosted,
.game-detail-video-wrap:fullscreen .game-detail-video,
.game-detail-video-wrap:-webkit-full-screen .game-detail-video {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    border-radius: 0;
}
.game-video-player-wrap:fullscreen .game-video-brand,
.game-video-player-wrap:-webkit-full-screen .game-video-brand,
.game-detail-video-wrap:fullscreen .game-detail-video-brand,
.game-detail-video-wrap:-webkit-full-screen .game-detail-video-brand {
    z-index: 2147483646;
}
.game-detail-video-brand-note {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.game-detail-video-caption {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}
.game-detail-video-link {
    color: #c4b5fd;
}
.media-modal-gallery {
    display: flex;
    align-items: center;
    gap: 18px;
}
.media-modal-img {
    max-width: 60vw;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 2px 16px #000;
}
.media-modal-prev, .media-modal-next {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s;
}
.media-modal-prev:hover, .media-modal-next:hover {
    transform: scale(1.15);
    background: transparent;
}
.media-modal-prev svg, .media-modal-next svg {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-rating-top {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, #FFD700 60%, #FFB300 100%);
    color: #222;
    font-weight: bold;
    font-size: 1.25rem;
    padding: 6px 16px 6px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-header {
    position: relative;
}

.game-rating-square {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 44px;
    height: 44px;
    background: #6c3;
    color: #fff;
    font-weight: bold;
    font-size: 1.35rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.5px;
}

.game-rating-circle {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 56px;
    height: 44px;
    background: rgba(40,32,24,0.82);
    color: #fff;
    font-weight: bold;
    font-size: 1.35rem;
    border-radius: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.5px;
    padding: 0 14px;
}

.gallery-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.7));
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .game-header {
        height: 130px;
    }

    .video-container iframe {
        min-height: 120px;
    }

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

    .game-description {
        font-size: 0.9rem;
    }

    .games-section {
        max-width: 98vw;
        padding: 1.2rem 0.5rem;
    }

    .game-features {
        padding-left: 1.2em;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-actions {
        flex-direction: column;
    }

    .game-button {
        width: 100%;
    }

    .games-section, #games-container {
        max-width: 100vw;
        padding: 0;
    }

    .game-header {
        height: 110px;
        min-height: 110px;
    }

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

    .game-description {
        font-size: 0.95em;
    }

    .game-social {
        font-size: 0.95em;
    }

    .game-info {
        padding-left: 90px;
    }
}

@media (max-width: 600px) {
    .games-controls {
        margin-top: 32px;
    }
    .search-box {
        max-width: 98vw;
        padding: 0 2vw;
        flex-direction: column;
        align-items: stretch;
    }
    .search-input-wrap {
        max-width: 100%;
    }
    .search-input {
        font-size: 1em;
        padding: 0.55em 2.5em 0.55em 1em;
        border-radius: 10px;
    }
    .search-count {
        font-size: 0.98em;
        margin-left: 0;
        min-width: 60px;
        margin-top: 0.5em;
        text-align: center;
        display: block;
    }
    .search-meta {
        margin-left: 0;
        margin-top: 0.5em;
        align-items: center;
        max-width: 100%;
    }
    .genre-filter-summary {
        text-align: center;
        max-width: 100%;
        font-size: 0.98em;
    }
    .filters-block {
        width: 100%;
        padding: 0 2vw;
        box-sizing: border-box;
    }
    .genre-filter-panel {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeIn 0.5s ease-out;
}

/* Стили для фильтров и сортировки */
.games-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filters, .platform-switchers, .age-filters {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filters-block {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    align-self: center;
    max-width: 100%;
}

.filters-block .filters {
    justify-content: center;
}

.genre-filter-summary {
    color: #fff;
    font-size: 1.08em;
    font-weight: 500;
    opacity: 0.95;
    text-align: center;
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
    margin-bottom: 0.35rem;
    padding: 0 4px;
    box-sizing: border-box;
}

.genre-filter-summary[hidden] {
    display: none !important;
}

.filter-option, .platform-switcher, .age-filter {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-weight: 500;
    margin: 0 4px 8px 0;
    outline: none;
}

.filter-option i, .platform-switcher i, .age-filter i {
    font-size: 2.2rem;
    margin-right: 0.7rem;
}

.filter-option.active, .platform-switcher.active, .age-filter.active {
    background: linear-gradient(90deg, #FFD700 60%, #FFB300 100%);
    color: #222;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.filter-option:not(.active):hover, .platform-switcher:not(.active):hover, .age-filter:not(.active):hover {
    background: rgba(255, 214, 0, 0.18);
    color: #111;
}

.age-filter {
    min-width: 90px;
    font-weight: bold;
}

/* Фильтр жанров (dropdown) */
.genre-filter-dropdown {
    position: relative;
    display: inline-block;
}

.genre-filter-toggle {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-weight: 500;
    margin: 0 4px 8px 0;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.genre-filter-toggle.active {
    background: linear-gradient(90deg, #FFD700 60%, #FFB300 100%);
    color: #222;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.genre-filter-toggle:not(.active):hover {
    background: rgba(255, 214, 0, 0.18);
    color: #111;
}

.genre-filter-chevron {
    font-size: 0.75em;
    transition: transform 0.2s;
}

.genre-filter-dropdown.is-open .genre-filter-chevron {
    transform: rotate(180deg);
}

.genre-filter-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 50;
    min-width: 260px;
    max-width: min(92vw, 360px);
    max-height: 320px;
    overflow: auto;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(18, 18, 24, 0.97);
    border: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.genre-filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.genre-filter-action {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.genre-filter-action:hover {
    background: rgba(255, 214, 0, 0.22);
    color: #ffd700;
}

.genre-filter-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 6px 4px;
    color: #fff;
    font-size: 0.98rem;
    cursor: pointer;
    line-height: 1.35;
}

.genre-filter-option:hover {
    color: #ffd700;
}

.genre-filter-option input {
    margin-top: 0.2em;
    flex-shrink: 0;
    accent-color: #ffd700;
    cursor: pointer;
}

.search-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 38px;
    min-width: 80px;
    gap: 0.15rem;
}

.search-meta .search-count {
    margin-left: 0;
}

/* Убрать фильтры рекомендуемые, по рейтингу, по популярности, по новизне */
.filter-select option[value="recommended"],
.filter-select option[value="rating"],
.filter-select option[value="popularity"],
.filter-select option[value="new"] {
    display: none !important;
}

/* Стили для загрузки */
.loading {
    text-align: center;
    padding: 2rem;
    color: #fff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Особенности игры --- */
.game-features {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    padding: 0.5em 1.2em;
    font-size: 1em;
}
.feature {
    color: #fff !important;
    background: rgba(255,255,255,0.07);
    border-radius: 1em;
    padding: 0.35em 0.9em 0.35em 0.75em;
    font-weight: 500;
    font-size: 1em;
    display: flex;
    align-items: flex-start;
    gap: 0.65em;
    line-height: 1.35;
}
.feature i {
    color: #ffd700;
    font-size: 1.1em;
    flex-shrink: 0;
    width: 1.15em;
    margin-top: 0.12em;
    text-align: center;
}
.feature span {
    min-width: 0;
}

.search-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.2rem;
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-input-wrap {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    max-width: 100%;
    padding: 0.7em 3.5em 0.7em 1.2em;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #FFD700 60%, #FFB300 100%);
    color: #222;
    font-size: 1.15rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.13);
    transition: box-shadow 0.2s, background 0.2s, color 0.2s;
    outline: none;
}

.search-input:focus {
    background: linear-gradient(90deg, #FFB300 60%, #FFD700 100%);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.22);
    color: #111;
}

.search-input::placeholder {
    color: #fff;
    opacity: 0.95;
    font-weight: 400;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 0.2em;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
    height: 1.5em;
    width: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.clear-search-btn:hover {
    opacity: 1;
}

.search-count {
    display: inline-block;
    min-width: 80px;
    margin-left: 38px;
    color: #fff;
    font-size: 1.08em;
    font-weight: 500;
    vertical-align: middle;
    text-align: left;
    white-space: nowrap;
    opacity: 0.95;
}

/* Карточка: превью описания (3 строки) */
.game-description-preview .game-desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.game-desc-more {
    background: none;
    border: none;
    color: #a78bfa;
    cursor: pointer;
    padding: 4px 0 0;
    font-size: 0.875rem;
    text-decoration: underline;
}
.game-cover-link {
    display: block;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    width: 100%;
}
.game-cover-link img {
    width: 100%;
}

/* Страница / модалка описания игры */
body.public-subpage .public-page,
.public-page { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
body.public-subpage .public-back a,
.public-back a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-weight: 600; }
body.public-subpage .game-detail-title,
#game-modal-body .game-detail-title { color: #fff; }
body.public-subpage .game-detail-desc,
#game-modal-body .game-detail-desc,
#game-modal-body .game-detail-body { color: rgba(255, 255, 255, 0.82); }
.game-detail-hero { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
@media (max-width: 768px) { .game-detail-hero { grid-template-columns: 1fr; } }
.game-detail-cover { width: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.game-detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.game-detail-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,0.12); color: #e9d5ff; font-size: .875rem; border: 1px solid rgba(255,255,255,0.12); }
.game-detail-badge-warn { background: rgba(251, 191, 36, 0.18); color: #fde68a; }
.game-detail-badge-room { background: rgba(52, 211, 153, 0.15); color: #a7f3d0; }
.game-detail-badge-platform { background: rgba(96, 165, 250, 0.16); color: #bfdbfe; }
.game-detail-badge-genre { background: rgba(244, 114, 182, 0.14); color: #fbcfe8; }
.game-detail-cover-wrap--empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}
.game-detail-cover-placeholder {
    padding: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
}
.game-detail-shot {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}
.game-detail-shot:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}
.game-detail-shots .game-detail-shot img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
}
.game-detail-cta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.game-detail-btn { padding: 12px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; display: inline-block; transition: filter 0.2s, background 0.2s; }
.game-detail-btn-primary { background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%); color: #fff; }
.game-detail-btn-primary:hover { filter: brightness(1.08); }
.game-detail-btn-secondary { border: 1px solid rgba(255,255,255,0.22); color: #fff; background: rgba(255,255,255,0.08); }
.game-detail-btn-secondary:hover { background: rgba(255,255,255,0.14); }
.game-detail-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.game-detail-shots img { width: 100%; border-radius: 8px; aspect-ratio: 16/10; object-fit: cover; }
.game-detail-shots-title { margin-top: 32px; color: #fff; }

.game-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 16px;
}
.game-modal-overlay.is-open {
    display: flex;
}
.game-modal-overlay[hidden] {
    display: none !important;
}
.game-modal-panel {
    position: relative;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    max-width: 960px;
    width: 100%;
    min-height: 120px;
    padding: 24px;
    margin: auto;
    box-shadow: 0 24px 48px rgba(0,0,0,.45);
    color: #eaeaea;
}
#game-modal-body {
    min-height: 48px;
}
.game-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #fff;
}
.game-modal-close:hover { background: rgba(255, 255, 255, 0.18); }
body.game-modal-open { overflow: hidden; }
 