/* =========================================================================
   NS/WP — Стили для Игры и Галереи
   ========================================================================= */

/* --- Вкладка "Игра" --- */
.game-panel {
    width: 100%;
    max-width: 820px;
    padding: 2rem;
    background: var(--gradient-left);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    color: var(--text-secondary);
}

.game-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-badge-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.game-badge {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
}

.game-badge.live {
    border-color: rgba(221, 51, 51, 0.6);
    color: #ff5252;
    box-shadow: 0 0 10px rgba(221, 51, 51, 0.2);
}

.game-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

.game-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 0;
    text-align: justify;
}

.game-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: nowrap;
    width: 100%;
    margin-top: 0.5rem;
}

.game-btn {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem 0.6rem;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-smooth);
    white-space: nowrap;
    border: 1px solid var(--border-dim);
    background: rgba(18, 18, 18, 0.9);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.game-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-btn i {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.game-btn.game-btn-play {
    background: rgba(24, 10, 10, 0.95);
    border-color: rgba(221, 51, 51, 0.6);
    color: #fff;
    box-shadow: 0 0 15px rgba(221, 51, 51, 0.25);
}

.game-btn.game-btn-play:hover {
    background: #250808;
    border-color: #ff4444;
    letter-spacing: 0.16em;
    box-shadow: 0 0 25px rgba(221, 51, 51, 0.5);
    color: #fff;
}

.game-btn:hover {
    border-color: var(--border-active);
    background: #141414;
    letter-spacing: 0.16em;
    color: #fff;
}

.game-changelog {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-dim);
    padding-top: 1.5rem;
}

.game-changelog-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.game-changelog ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-changelog li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.4rem;
}

.game-changelog li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Полноэкранный Game Frame Overlay */
.game-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #080808;
    display: none;
    flex-direction: column;
}

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

.game-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: #110808;
    border-bottom: 1px solid #3a1010;
}

.game-modal-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ff5252;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.game-modal-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.game-control-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    padding: 0.4rem 0.8rem;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.game-control-btn:hover {
    color: #fff;
    border-color: #ff5252;
    background: rgba(221, 51, 51, 0.15);
}

.game-iframe-wrap {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* --- Модальное окно выбора платформы для скачивания игры --- */
.game-dl-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.game-dl-modal.active {
    display: flex;
    opacity: 1;
}

.game-dl-card {
    background: #100808;
    border: 1px solid rgba(221, 51, 51, 0.5);
    box-shadow: 0 0 45px rgba(221, 51, 51, 0.35), 0 20px 40px rgba(0, 0, 0, 0.85);
    width: 100%;
    max-width: 540px;
    padding: 2.2rem 2.4rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
    from {
        transform: scale(0.93) translateY(12px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.game-dl-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.4rem;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.game-dl-close:hover {
    color: #ff5252;
    transform: rotate(90deg);
}

.game-dl-badge {
    align-self: flex-start;
    font-family: 'Oswald', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    background: rgba(221, 51, 51, 0.15);
    border: 1px solid rgba(221, 51, 51, 0.5);
    color: #ff5252;
}

.game-dl-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    text-shadow: 0 0 15px rgba(221, 51, 51, 0.3);
}

.game-dl-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    margin-top: -0.4rem;
}

.game-dl-options {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.game-dl-option {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: rgba(24, 12, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.1rem 1.3rem;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
}

.game-dl-option:hover {
    border-color: #ff4444;
    background: #240a0a;
    box-shadow: 0 0 20px rgba(221, 51, 51, 0.35);
    transform: translateY(-2px);
}

.game-dl-option-icon {
    font-size: 2rem;
    color: #ff5252;
    width: 2.6rem;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.25s;
}

.game-dl-option:hover .game-dl-option-icon {
    transform: scale(1.15);
}

.game-dl-option-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-dl-option-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
}

.game-dl-option-desc {
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.4;
}

.game-dl-option-arrow {
    font-size: 1.1rem;
    color: #666;
    transition: color 0.25s, transform 0.25s;
    flex-shrink: 0;
}

.game-dl-option:hover .game-dl-option-arrow {
    color: #ff5252;
    transform: translateY(2px);
}

@media (max-width: 480px) {
    .game-dl-card {
        padding: 1.5rem 1.2rem;
    }
    .game-dl-option {
        padding: 0.95rem 1rem;
        gap: 0.9rem;
    }
    .game-dl-option-icon {
        font-size: 1.5rem;
        width: 1.8rem;
    }
    .game-dl-title {
        font-size: 1.3rem;
    }
}

/* --- Вкладка "Галерея" --- */
.gallery-panel {
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    background: var(--gradient-left);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
}

.gallery-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 1.2rem;
}

.gallery-filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.gallery-chip {
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dim);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.gallery-chip:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.08);
}

.gallery-chip.active {
    color: var(--text-primary);
    border-color: var(--border-active);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.gallery-stats {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #080808;
    border: 1px solid var(--border-dim);
    cursor: pointer;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(25%) contrast(1.05);
    transition: filter var(--transition-smooth), transform var(--transition-smooth);
    display: block;
}

.gallery-item:hover img {
    filter: grayscale(0%) contrast(1.1);
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.8rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    font-size: 0.75rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Roboto', sans-serif;
}

.gallery-date {
    font-size: 0.68rem;
    color: #aaa;
    font-family: 'Roboto Mono', monospace;
}

.gallery-load-more {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
}

.gallery-btn-more {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.8rem 2.2rem;
    background: rgba(18, 18, 18, 0.9);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.gallery-btn-more:hover {
    border-color: var(--border-active);
    background: #000;
    letter-spacing: 0.22em;
}

@media (max-width: 650px) {
    .game-panel, .gallery-panel {
        padding: 1.2rem;
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    .game-title {
        font-size: 1.4rem;
    }
    .game-actions {
        gap: 0.45rem;
    }
    .game-btn {
        padding: 0.85rem 0.35rem;
        font-size: 0.85rem;
        letter-spacing: 0.08em;
    }
}

@media (max-width: 480px) {
    .game-actions {
        gap: 0.4rem;
    }
    .game-btn {
        padding: 0.95rem 0.2rem;
        gap: 0;
    }
    .game-btn span {
        display: none;
    }
    .game-btn i {
        font-size: 1.15rem;
        margin: 0;
    }
}

/* --- Хэштег-фильтры в ленте бэкапов / галереи --- */
.feed-tags {
    display: none;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-dim);
}

.feed-tags.active {
    display: flex;
}

.feed-tag-chip {
    font-family: 'Oswald', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dim);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    user-select: none;
}

.feed-tag-chip:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}

.feed-tag-chip.active {
    color: #fff;
    border-color: rgba(221, 51, 51, 0.8);
    background: rgba(221, 51, 51, 0.2);
    box-shadow: 0 0 10px rgba(221, 51, 51, 0.3);
}

.feed-tag-chip .tag-count {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    opacity: 0.65;
    margin-left: 0.35rem;
}

.post-text .tg-hashtag {
    color: #dd3333;
    cursor: pointer;
    transition: color 0.15s ease, text-shadow 0.15s ease;
}

.post-text .tg-hashtag:hover {
    color: #ff5252;
    text-shadow: 0 0 8px rgba(221, 51, 51, 0.4);
    text-decoration: underline;
}

@media (max-width: 650px) {
    .feed-tags {
        gap: 0.35rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .feed-tags::-webkit-scrollbar {
        display: none;
    }
    .feed-tag-chip {
        padding: 0.25rem 0.55rem;
        font-size: 0.72rem;
        flex-shrink: 0;
    }
}

