﻿/* === ХЛЕБНЫЕ КРОШКИ === */
.breadcrumbs {
    background: #1a1a1a;
    padding: 15px 0;
    border-bottom: 1px solid #333;
}

.breadcrumbs a {
    color: #4ecdc4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #45b7b8;
}

.breadcrumbs span {
    color: #666;
    margin: 0 10px;
}

.breadcrumbs span:last-child {
    color: #ccc;
}

/* === HERO СЕКЦИЯ ИГРЫ === */
.game-hero {
    background: #0f0f0f;
    padding: 40px 0 60px 0;
}

.game-hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* === МЕДИА СЕКЦИЯ === */
.game-media {
    display: flex;
    flex-direction: column;
}

.main-screenshot {
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.screenshot-placeholder {
    background: #000;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: default;
    transition: all 0.3s ease;
}

.screenshot-placeholder:hover {
    background: #000;
}

/* Главное изображение */
.screenshot-placeholder img#main-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* заполняем кадр, возможна обрезка */
    display: block;
    background: #000;
}

.screenshot-thumbnails {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    border: 3px solid transparent; /* фиксированная толщина, меняем только цвет */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail:hover, .thumbnail.active {
    border-color: #4ecdc4;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* Стрелки навигации в галерее */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #444;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: grid;
    place-items: center; /* гарантированное центрирование по вертикали и горизонтали */
    line-height: 1; /* убираем влияние базовой линии шрифта */
    padding: 0; /* чтобы ничего не смещало текст */
    font-size: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-nav:hover {
    border-color: #4ecdc4;
    background: rgba(0,0,0,0.7);
}

.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

/* Адаптивная сетка миниатюр */
@media (max-width: 1200px) {
    .screenshot-thumbnails {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .screenshot-thumbnails {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .screenshot-thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

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

/* === ИНФОРМАЦИОННАЯ БОКОВАЯ ПАНЕЛЬ === */
.game-info-sidebar {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #333;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 2.2em;
    font-weight: 800;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-subtitle {
    color: #ccc;
    font-size: 1.1em;
}

.game-rating-large {
    margin-bottom: 20px;
}

.stars-large {
    color: #ffd700;
    font-size: 1.5em;
    margin-bottom: 8px;
}

.rating-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-score {
    font-size: 1.2em;
    font-weight: 600;
    color: #4ecdc4;
}

.rating-count {
    color: #aaa;
    font-size: 0.9em;
}

.game-tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px solid #333; /* разделительная линия сверху */
}

.tag-large {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #4ecdc4;
    font-size: 0.95em;
    font-weight: 600;
    font-family: "Montserrat Local", "Montserrat", sans-serif;
}

.tag-large::before {
    content: '#';
    margin-right: 4px;
    color: #4ecdc4;
}

/* === ЦЕНЫ === */
.game-price-section {
    margin-bottom: 25px;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.discount {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1em;
}

.price-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.old-price {
    color: #999;
    text-decoration: line-through;
    font-size: 1em;
}

.current-price {
    color: #4ecdc4;
    font-size: 1.4em;
    font-weight: 700;
}

/* === КНОПКИ ПОКУПКИ === */
.purchase-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

/* Делаем кнопки магазинов соответствующими стилю на контактах */
.purchase-buttons .btn-store {
  min-width: 220px;
  max-width: 260px;
  height: 48px;
  min-height: 48px;
  padding: 12px 20px;
}

@media (max-width: 768px) {
  .purchase-buttons .btn-store {
    height: 44px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
    min-width: 200px;
    max-width: 240px;
  }
}

.btn-large {
    padding: 15px 20px;
    font-size: 1em;
    font-weight: 600;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === СТАТИСТИКА ИГРЫ === */
.game-stats {
    border-top: 1px solid #333;
    padding-top: 20px;
}

.stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.stat-label {
    color: #aaa;
}

.stat-value {
    color: #fff;
    font-weight: 500;
}

/* === ОПИСАНИЕ ИГРЫ === */
.game-description {
    /*background: #1a1a1a;*/
    /*padding: 60px 0;*/
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

.description-content p {
    font-size: 1.1em;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 20px;
}

.description-content p:last-child {
    margin-bottom: 0;
}

/* === ОСОБЕННОСТИ ИГРЫ === */
.game-features {
    /*background: #0f0f0f;*/
    /*padding: 60px 0;*/
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 40px;
    align-items: stretch;
}

.feature-card {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

/* Изображение в карточке фичи 16:9 */
.feature-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    background: linear-gradient(45deg, #333, #444);
}

.feature-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: #4ecdc4;
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

/* Текст фичи под картинкой — обычный абзац */
.feature-card h3 { display: none; }
.feature-card .feature-text {
  margin: 12px 0 0 0;
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
}

/* === СИСТЕМНЫЕ ТРЕБОВАНИЯ === */
.system-requirements {
    background: #1a1a1a;
    padding: 60px 0;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.requirements-column {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
}

.requirements-column h3 {
    color: #4ecdc4;
    margin-bottom: 25px;
    font-size: 1.2em;
}

.requirement-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.req-label {
    color: #aaa;
    min-width: 140px;
    font-weight: 500;
}

.req-value {
    color: #fff;
    flex: 1;
}

/* === ОТЗЫВЫ ИГРОКОВ === */
.player-reviews {
    background: #0f0f0f;
    padding: 60px 0;
}

.reviews-summary {
    margin-bottom: 50px;
}

.overall-rating {
    display: flex;
    gap: 50px;
    align-items: center;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
}

.rating-circle {
    text-align: center;
    min-width: 120px;
}

.rating-number {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-max {
    color: #666;
    font-size: 1.5em;
}

.rating-breakdown {
    flex: 1;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.rating-bar span:first-child {
    color: #ffd700;
    min-width: 25px;
}

.rating-bar span:last-child {
    color: #aaa;
    min-width: 30px;
}

.bar {
    flex: 1;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* === СПИСОК ОТЗЫВОВ === */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.review-card {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #333;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    color: #4ecdc4;
    font-weight: 600;
}

.review-date {
    color: #777;
    font-size: 0.9em;
}

.review-rating {
    color: #ffd700;
    font-size: 1.1em;
}

.review-text p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-helpful {
    margin-top: 15px;
}

.helpful-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.helpful-btn:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.more-reviews {
    text-align: center;
}

/* === ПОХОЖИЕ ИГРЫ === */
.similar-games {
    padding: 60px 0;
}

.similar-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.similar-game-card {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.similar-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: #4ecdc4;
}

.similar-game-image {
    height: 120px;
    background: linear-gradient(45deg, #333, #444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
}

.similar-game-info {
    padding: 15px;
}

.similar-game-info h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 1em;
}

.similar-game-price {
    color: #4ecdc4;
    font-weight: 600;
}

/* === АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ ИГРЫ === */
@media (max-width: 968px) {
    .game-hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .game-info-sidebar {
        position: static;
    }

    .overall-rating {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .screenshot-placeholder {
        height: 250px;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }

    .game-title {
        font-size: 1.8em;
    }

    .purchase-buttons .btn-large {
        padding: 12px 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .requirements-grid {
        grid-template-columns: 1fr;
    }

    .requirements-column {
        padding: 20px;
    }

    .req-label {
        min-width: 120px;
    }

    .req-value {
        font-size: 0.9em;
    }

    .similar-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .game-hero {
        padding: 20px 0 40px 0;
    }

    .game-info-sidebar {
        padding: 20px;
    }

    .features-grid, .requirements-grid {
        margin-top: 20px;
    }

    .section {
        padding: 40px 0;
    }

    .overall-rating {
        padding: 20px;
    }

    .rating-bar {
        gap: 10px;
    }

    .req-label {
        min-width: 100px;
        font-size: 0.9em;
    }

    .req-value {
        font-size: 0.9em;
    }
}/* === СБРОС СТИЛЕЙ ДЛЯ ЧИСТОГО СТАРТА === */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth; /* Плавная прокрутка */
}

/* Глобальные улучшения адаптивности */
*, *::before, *::after {
    box-sizing: border-box;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

main {
    flex: 1 1 auto; /* гарантируем прижатие футера к низу при малом контенте */
}

/* === ОБЩИЙ СТИЛЬ ДЛЯ ВСЕГО САЙТА === */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    background-color: #0f0f0f; /* Более глубокий чёрный */
    color: #f0f0f0;

    font-family: "Montserrat Local", "Montserrat", sans-serif;
    font-size-adjust: 0.5;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6; /* Лучшая читаемость */
    font-synthesis: none; /* запрет синтетического bold/italic для единообразия веса */
}

/* Global page reveal for pages that set data-ready */
body[data-ready="false"] {
  opacity: 0;
}
/* Removed transitions per request */

/* === КОНТЕЙНЕР ДЛЯ ЦЕНТРИРОВАНИЯ === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === ШАПКА === */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%); /* Градиент */
    border-bottom: 2px solid #333;
    backdrop-filter: blur(10px); /* Современный эффект */
    position: sticky; /* Закрепляем шапку */
    top: 0;
    z-index: 100;
}

header .logo {
    height: 50px;
    transition: transform 0.3s ease; /* Анимация при наведении */
}

header .logo:hover {
    transform: scale(1.05); /* Небольшое увеличение */
}

header h1 {
    margin: 0;
    font-size: 1.5em;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4); /* Градиентный текст */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container h1 {
    margin-left: 15px;
}

/* === НАВИГАЦИЯ === */
nav a {
    color: #f0f0f0;
    text-decoration: none;
    margin-left: 25px;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

/* Подчёркивание при наведении */
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #4ecdc4;
}

/* === ГАМБУРГЕР === */
.menu-toggle {
    display: none;
    font-size: 1.8em;
    cursor: pointer;
    color: #f0f0f0;
    transition: color 0.3s ease;
}

.menu-toggle:hover {
    color: #4ecdc4;
}

/* === КНОПКИ === */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Основная кнопка */
.btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Вторичная кнопка */
.btn-secondary {
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6), 0 0 24px rgba(78, 205, 196, 0.5);
}

/* Обводка кнопки */
.btn-outline {
    background: transparent;
    color: #4ecdc4;
    border: 2px solid #4ecdc4;
}

.btn-outline:hover {
    background: #4ecdc4;
    color: #0f0f0f;
    transform: translateY(-2px);
}

/* Маленькая кнопка */
.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* === БРЕНДОВЫЕ КНОПКИ ДЛЯ МАГАЗИНОВ И СОЦСЕТЕЙ === */
.btn-store, .btn-social, .btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  color: #fff;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.btn-store .icon-svg, .btn-social .icon-svg, .btn-brand .icon-svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex-shrink: 0;
  object-fit: contain; /* for <img> raster icons */
}

/* Обновленные стили для кнопок брендов */
.btn-brand {
  justify-content: flex-start;
  position: relative;
  min-height: 44px;
  background: #2a2a2a !important;
  color: #ffffff !important;
}

.btn-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  background: #3a3a3a !important;
}

.btn-brand .icon-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  margin: 0;
}

.btn-brand .icon-svg svg {
  width: 100%;
  height: 100%;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
}

/* Ensure raster icons in brand buttons also size 30px */
.btn-brand img.icon-svg {
  width: 30px;
  height: 30px;
}

.btn-brand span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  text-align: center;
  margin: 0;
}

/* Stores */
.btn-store.is-steam { background: #171a21; }
.btn-store.is-steam:hover { filter: brightness(1.12); }

.btn-store.is-vkplay { background: #07f; }
.btn-store.is-vkplay:hover { filter: brightness(1.12); }

.btn-store.is-yandex { background: #ffd633; color: #000; }
.btn-store.is-yandex:hover { filter: brightness(0.95); }

.btn-store.is-rustore { background: #1a73e8; }
.btn-store.is-rustore:hover { filter: brightness(1.12); }

.btn-store.is-googleplay { background: linear-gradient(45deg,#34a853,#4285f4); }
.btn-store.is-googleplay:hover { filter: brightness(1.12); }

/* Socials */
.btn-social.is-telegram { background: #229ED9; }
.btn-social.is-telegram:hover { filter: brightness(1.12); }

.btn-social.is-youtube { background: #FF0000; }
.btn-social.is-youtube:hover { filter: brightness(1.12); }

.btn-social.is-vk { background: #0077FF; }
.btn-social.is-vk:hover { filter: brightness(1.12); }

.btn-social.is-vkplay { background: #07f; }
.btn-social.is-vkplay:hover { filter: brightness(1.12); }

.btn-social.is-discord { background: #5865F2; }
.btn-social.is-discord:hover { filter: brightness(1.12); }

.btn-social.is-x { background: #000; }
.btn-social.is-x:hover { filter: brightness(1.12); }

.btn-social.is-artstation { background: #13AFF0; }
.btn-social.is-artstation:hover { filter: brightness(1.12); }

.btn-social.is-boosty { background: #FF4D00; }
.btn-social.is-boosty:hover { filter: brightness(1.12); }

/* Contacts layout */
.contacts-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  justify-items: center;
  margin-top: 24px;
}

.contacts-buttons .btn-brand {
  min-width: 200px;
  max-width: 250px;
  height: 48px;
  min-height: 48px;
  padding: 12px 20px;
}

/* Responsive adjustments for contacts */
@media (max-width: 768px) {
  .contacts-buttons {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }
  
  .contacts-buttons .btn-brand {
    height: 44px;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 13px;
    min-width: 160px;
    max-width: 200px;
  }
  
  .contacts-buttons .btn-brand .icon-svg {
    left: 10px;
    width: 24px;
    height: 24px;
  }
  
  .contacts-buttons .btn-brand .icon-svg svg {
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
  }

/* Mobile raster icons size */
.contacts-buttons .btn-brand img.icon-svg {
  width: 24px;
  height: 24px;
}
}

@media (max-width: 480px) {
  .contacts-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .contacts-buttons .btn-brand {
    min-width: 250px;
    max-width: 280px;
  }
}

/* === HERO СЕКЦИЯ === */
.hero {
    display: flex;
    align-items: center;
    min-height: 79vh;
    background: linear-gradient(45deg, #ff6b6b21, #4ecdc424, #45b7b824);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23fff" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.02;
    background-repeat: repeat;
    background-size: 800px 800px; /* крупная сетка */
}

.hero-content {
    flex: 1;
    padding: 0 40px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5em;
    font-weight: 800;
    margin: 0 0 20px 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2em;
    color: #ccc;
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Анимация кубиков */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.cube-animation {
    position: relative;
    width: 400px;
    height: 400px;
}

.cube {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    animation: float 3s ease-in-out infinite;
}

.cube:nth-child(1) {
    top: 0;
    left: 40%;
    transform: translateX(-50%);
    animation-delay: 0s;
    background: linear-gradient(135deg, #df3944, #d4624a);
}

.cube:nth-child(2) {
    bottom: 0;
    left: 0;
    animation-delay: -1s;
    background: linear-gradient(135deg, #686fdf, #273db3);
}

.cube:nth-child(3) {
    bottom: 0;
    right: 0;
    animation-delay: -2s;
    background: linear-gradient(135deg, #59d252, #29af1f);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

/* === ОБЩИЕ СТИЛИ СЕКЦИЙ === */
section {
    padding: 60px 0;
}

section h3 {
    font-size: 2.5em;
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #4ecdc4;
    position: relative;
}

/* Подчёркивание заголовков */
section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
}

/* === О СТУДИИ === */
.about {
    background: #1a1a1a;
}

.about p {
    text-align: center;
    font-size: 1.1em;
    color: #ccc;
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

.feature h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #4ecdc4;
}

.feature p {
    color: #aaa;
    font-size: 1em;
}

/* === ИГРЫ === */
.featured-games {
    background: linear-gradient(45deg, #ff6b6b21, #4ecdc424, #45b7b824);
    position: relative;
    overflow: hidden;
}

.featured-games::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23fff" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.02;
    pointer-events: none;
    background-repeat: repeat;
    background-size: 800px 800px; /* крупная сетка */
}

.featured-games .container {
    position: relative;
    z-index: 1;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
    align-items: stretch; /* растягиваем карточки по высоте строки */
}

/* Более компактная сетка внутри блока похожих игр (на детальной странице) */
.similar-games .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.game-card {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    z-index: 0; /* создаём контекст для корректной отрисовки псевдоэлемента поверх */
    border: none; /* убрали аппаратную границу во избежание пикселизации */
    display: flex;            /* фиксируем нижний блок с кнопкой */
    flex-direction: column;   
    height: 100%;             /* заполняем высоту ячейки грида */
}

/* Псевдо-обводка с идеальной сглаженностью через mask-composite */
.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px; /* толщина обводки */
    background: linear-gradient(#2f2f2f, #2f2f2f) border-box; /* базовая обводка */
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    z-index: 2; /* поверх содержимого карточки */
    pointer-events: none;
    transition: background 0.2s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 0 24px rgba(78, 205, 196, 0.5),   /* свечение */
        0 20px 40px rgba(0, 0, 0, 0.4);     /* тень */
}

.game-card:hover::before {
    background: linear-gradient(45deg, rgba(78, 205, 196, 0.6), rgba(78, 205, 196, 0.6)) border-box;
}

.game-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9; /* поддержка 16:9 для обложек */
    z-index: 1; /* ниже псевдо-обводки карточки */
}

.game-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: linear-gradient(45deg, #333, #444);
    color: #777;
}

/* Изображение обложки в карточке 16:9 */
.game-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-placeholder span {
    font-size: 3em;
    margin-bottom: 10px;
}

.game-info {
    /* Возвращаем визуальный размер карточки, но уменьшаем верхний отступ,
       компенсируя нижним, чтобы сократить зазор между обложкой и заголовком */
    padding: 16px 25px 34px;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.game-info h4 {
    font-size: 1.3em;
    margin: 5px 0 8px 0; /* небольшой отступ сверху, чтобы отодвинуть от обложки */
    color: #fff;
}

.game-info p {
    color: #aaa;
    margin-top: 0;       /* убираем верхний отступ у абзаца */
    margin-bottom: 20px; /* привычный нижний отступ описания */
    line-height: 1.6;
    text-align: left;    /* выравнивание по левому краю */
}

/* Кнопка — в правом нижнем углу блока информации (а блок инфо снизу карточки) */
.game-info .btn {
    margin-top: auto;          /* прижимает кнопку вниз */
    align-self: flex-start;    /* влево */
}

/* === НОВОСТИ === */
.latest-news {
    background: #1a1a1a;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.news-card {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 24px rgba(255, 107, 107, 0.5),   /* красное свечение */
        0 20px 40px rgba(0, 0, 0, 0.4);     /* тень */
    border-color: #ff6b6b;
}

.news-date {
    color: #4ecdc4;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-card h4 {
    font-size: 1.2em;
    margin-bottom: 2px;
    color: #fff;
}

.news-card p {
    color: #aaa;
    line-height: 1.6;
}

.news-link {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: #ff8e8e;
}

/* Информация о фильтре по тегу на странице новостей */
.tag-filter-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 0 0 20px 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    color: #ccc;
}

.tag-filter-info .clear-filter {
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 600;
}

.tag-filter-info .clear-filter:hover {
    color: #ff8e8e;
    text-decoration: underline;
}

/* Цвет имени тега в строке фильтра */
.tag-filter-info .tag-name {
    color: #4ecdc4;
    font-family: "Montserrat Local", "Montserrat", sans-serif;
}

/* Изображение в карточке новости 16:9 */
.news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(45deg, #333, #444);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Фиксируем ссылку внизу карточки */
.news-card .news-link {
    align-self: flex-start;
}

/* Теги в карточках новостей — без овального фона и без подчёркивания */
.news-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-card-tags .tag {
    color: #4ecdc4;
    text-decoration: none;
    border: none;
    background: transparent;
    padding: 0;
    font-family: "Montserrat Local", "Montserrat", sans-serif;
}

.news-card-tags .tag:hover {
    color: #45b7b8;
    text-decoration: underline;
}

/* Нижняя зона карточки: теги + кнопка всегда у нижнего края слева */
.news-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.news-card-footer .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Специальное оформление страницы одной новости */
body.page-news-post .page-hero {
    text-align: center;
}

body.page-news-post #news-title,
body.page-news-post #news-date,
body.page-news-post #news-meta,
body.page-news-post #news-tags {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.news-meta {
    color: #aaa;
    margin-top: 6px;
}

.news-tags {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.news-tags .tag {
    padding: 6px 12px;
    background: #333;
    color: #4ecdc4;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    font-family: "Montserrat Local", "Montserrat", sans-serif;
    border: 1px solid #444;
}

body.page-news-post .latest-news {
    background: transparent;
    padding-top: 40px;
}

body.page-news-post #news-content-wrapper.news-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

body.page-news-post #news-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Центрирование и читабельная ширина тела новости */
body.page-news-post #news-content {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Заголовки внутри контента новости по центру */
body.page-news-post #news-content h1,
body.page-news-post #news-content h2,
body.page-news-post #news-content h3,
body.page-news-post #news-content h4 {
    text-align: center;
}

/* Картинки внутри контента — адаптивные и центрированные */
body.page-news-post #news-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0px auto;
    border-radius: 10px;
}

/* Кнопки действий в детальной новости */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    justify-content: center;
}

/* CTA кнопки используют класс btn-brand, поэтому дополнительные стили не нужны */

/* === ЦЕНТРИРОВАНИЕ КНОПОК === */
.section-footer {
    text-align: center;
}

/* === ФУТЕР === */
footer {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #aaa;
    padding: 20px;
    text-align: center;
    border-top: 2px solid #333;
}

/* === АКТИВНАЯ ССЫЛКА В НАВИГАЦИИ === */
nav a.active {
    color: #4ecdc4;
}

nav a.active::after {
    width: 100%;
}

/* === HERO СЕКЦИЯ ДЛЯ СТРАНИЦ === */
.page-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23fff" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.05;
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-hero h2 {
    font-size: 3em;
    font-weight: 800;
    margin: 0 0 20px 0;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    font-size: 1.2em;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
}

/* === СТАТИСТИКА СТУДИИ === */
.studio-stats {
    background: #0f0f0f;
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    padding: 30px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 15px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: #4ecdc4;
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.2);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    color: #ccc;
    font-size: 1em;
    font-weight: 500;
}

/* === ФИЛЬТРЫ ИГР === */
.games-filters {
    background: #1a1a1a;
    padding: 40px 0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-btn {
    padding: 12px 24px;
    background: transparent;
    color: #ccc;
    border: 2px solid #444;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    color: white;
    border-color: #4ecdc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

/* === ДЕТАЛЬНЫЕ КАРТОЧКИ ИГР === */
.all-games {
    background: #0f0f0f;
    padding: 00px 0 80px 0;
}

.games-grid-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

.game-card-detailed {
    display: grid;
    grid-template-columns: 380px 1fr; /* слегка компактнее, чтобы меньше пустого места */
    grid-template-rows: auto auto;    /* две строки: контент и действия */
    grid-template-areas:
        'media info'
        'actions actions';
    gap: 24px 32px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card-detailed:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: #4ecdc4;
}

.game-card-detailed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
}

/* === ИЗОБРАЖЕНИЯ ИГР === */
.game-image-large {
    grid-area: media;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 220px; /* ниже, чтобы уменьшить пустоты под изображением */
}

.game-placeholder-large {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: linear-gradient(45deg, #333, #444);
    color: #777;
}
.game-placeholder-large > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
 }


.game-status {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
}

.game-status--left {
    left: 15px;
    right: auto;
}

.status-released {
    background: linear-gradient(45deg, #4ecdc4, #45b7b8);
    color: white;
}

.status-development {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
}

/* === ИНФОРМАЦИЯ ОБ ИГРАХ === */
.game-info-detailed {
    grid-area: info;
    display: flex;
    flex-direction: column;
}

.game-header {
    display: flex;
    justify-content: flex-start; /* выравнивание по левому краю */
    align-items: flex-start; /* вертикальное выравнивание по верхнему краю */
    margin-bottom: 20px;
}

.game-header h3 {
    text-align: left; /* явно указываем выравнивание текста */
    font-size: 2em;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.game-rating {
    text-align: right;
}

.stars {
    color: #ffd700;
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.rating-number {
    color: #ccc;
    font-size: 0.9em;
}

.development-progress {
    color: #ff6b6b;
    font-weight: 600;
}

/* === ТЕГИ ИГР === */
.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    padding: 6px 12px;
    background: #333;
    color: #4ecdc4;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
    font-family: "Montserrat Local", "Montserrat", sans-serif;
    border: 1px solid #444;
}

/* === ОПИСАНИЕ И ОСОБЕННОСТИ === */
.game-description {
    color: #ccc;
    line-height: 1.7;
    margin-bottom: 25px;
    flex-grow: 1;
}

.game-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.feature-item {
    color: #aaa;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === ДЕЙСТВИЯ С ИГРАМИ === */
.game-actions {
    grid-area: actions;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center; /* center buttons as requested */
}

/* Keep a reasonable minimum width without forcing flex grow/shrink */
.game-actions .btn-brand, .game-actions .btn-outline, .game-actions .btn-primary, .game-actions .btn-secondary {
    min-width: 220px;
}

/* Add border and glow on hover similar to filter buttons, scoped to game actions */
.game-actions .btn-brand {
    background: #2a2a2a; /* keep neutral dark */
    border: 2px solid #444;
}

.game-actions .btn-brand:hover {
    border-color: #4ecdc4;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.platform-icon {
    font-size: 1.1em;
    margin-right: 5px;
}

/* === КОНТАКТЫ === */
.contacts-list > li > strong {
    color: #4ecdc4
}
.contacts-list > li > a {
    color: #ffffff
}

/* === АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ ИГР === */
@media (max-width: 968px) {
    .game-card-detailed {
        grid-template-columns: 1fr;
        grid-template-areas:
            'media'
            'info'
            'actions';
        gap: 20px;
    }

    .game-image-large {
        height: 200px;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
    }

    .game-rating {
        text-align: left;
    }
}

/* Keep two-column layout on tablets to avoid overly wide media, then stack on smaller screens */
@media (max-width: 968px) and (min-width: 640px) {
  .game-card-detailed {
    grid-template-columns: 320px 1fr;
    grid-template-areas:
      'media info'
      'actions actions';
  }
  .game-image-large {
    height: 200px;
  }
}

/* On very narrow screens, keep media centered with a sensible max width */
@media (max-width: 640px) {
  .game-image-large {
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
    .filter-buttons {
        justify-content: center;
    }

    .filter-btn {
        flex: 1;
        min-width: 120px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-item {
        padding: 20px;
    }

    .stat-number {
        font-size: 2em;
    }

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

    .game-actions .btn {
        text-align: center;
        width: 100%;
        max-width: none; /* override global 250px cap for mobile */
    }
}

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

    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 250px;
    }

    .page-hero h2 {
        font-size: 2.2em;
    }
}
@media (max-width: 768px) {
    /* Гамбургер меню */
    header {
        flex-wrap: wrap;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
        padding: 10px 0;
    }

    nav.active {
        display: flex;
    }

    nav a {
        margin: 10px 0;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero секция */
    .hero {
        flex-direction: column;
        text-align: center;
        min-height: 70vh;
        padding: 40px 20px;
    }

    .hero-content {
        padding: 0;
        margin-bottom: 40px;
    }

    .hero-title {
        font-size: 2.5em;
    }

    .hero-buttons {
        justify-content: center;
    }

    .cube-animation {
        width: 150px;
        height: 150px;
    }

    .cube {
        width: 40px;
        height: 40px;
    }

    /* Сетки */
    .games-grid, .news-grid {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: 1fr;
    }

    section {
        padding: 60px 0;
    }

    section h3 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2em;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    /* Ensure platform buttons span full width in game cards on small screens */
    .game-actions .btn {
        width: 100%;
        max-width: none;
    }
}

/* Center header and tags on mobile in game cards */
@media (max-width: 768px) {
  .game-card-detailed .game-header {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .game-card-detailed .game-header h3 {
    text-align: center;
  }
  .game-card-detailed .game-tags {
    justify-content: center;
  }
}

/* Center header and tags on tablet widths as well (covers ~768–970px) */
@media (max-width: 992px) {
  .game-card-detailed .game-header {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .game-card-detailed .game-header h3 {
    text-align: center;
  }
  .game-card-detailed .game-tags {
    justify-content: center;
  }
}

/* Icon styles */
.icon-svg {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-right: 0.5em;
  flex-shrink: 0; /* Предотвращает сжатие иконок */
  /* Центрируем содержимое SVG */
  text-align: center;
  /* Принудительно ограничиваем размеры */
  max-width: 1.2em;
  max-height: 1.2em;
  overflow: hidden;
}

.icon-svg svg {
  width: 100%;
  height: 100%;
  /* Убираем fill: currentColor, чтобы иконки сохранили оригинальные цвета */
  /* fill: currentColor; */
  /* Центрируем SVG внутри контейнера */
  display: block;
  margin: 0 auto;
  /* Принудительно ограничиваем размеры SVG */
  overflow: visible;
  /* Принудительно ограничиваем размеры независимо от viewBox */
  transform-origin: center;
}

/* Allow raster icons to fit nicely inside generic icon container */
.icon-svg:is(img) {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
}

/* Принудительно ограничиваем размеры всех SVG иконок */
.icon-svg svg,
.icon-svg svg * {
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Специальные правила для проблемных иконок */
.icon-svg svg[aria-label*="youtube"],
.icon-svg svg[aria-label*="x"],
.icon-svg svg[aria-label*="vkplay"] {
  /* Принудительно ограничиваем размеры проблемных иконок */
  max-width: 100% !important;
  width: 100% !important;
  max-height: 100% !important;
  height: 100% !important;
  transform: scale(1);
  transform-origin: center;
}

/* Специальные правила для иконок с проблемами отображения */
.icon-svg svg[aria-label*="yandex"] {
  /* Принудительно устанавливаем правильный цвет для Яндекс Игр */
  fill: #FFCC00 !important;
}

.icon-svg svg[aria-label*="x"] {
  /* Принудительно ограничиваем размер X иконки */
  max-width: 100% !important;
  width: 100% !important;
  max-height: 100% !important;
  height: 100% !important;
  /* Убираем любые трансформации */
  transform: none !important;
}

.icon-svg svg[aria-label*="boosty"] {
  /* Принудительно устанавливаем правильный цвет для Boosty */
  fill: #FF5310 !important;
}

.icon-svg svg[aria-label*="artstation"] {
  /* Принудительно устанавливаем правильный цвет для ArtStation */
  fill: #13AFF0 !important;
}

.icon-svg svg[aria-label*="youtube"] path,
.icon-svg svg[aria-label*="x"] path,
.icon-svg svg[aria-label*="vkplay"] path {
  /* Ограничиваем размеры внутренних элементов */
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Дополнительные стили для проблемных иконок */
.icon-svg svg[viewBox*="0 0 24 24"],
.icon-svg svg[viewBox*="0 0 32 32"],
.icon-svg svg[viewBox*="0 0 36 36"],
.icon-svg svg[viewBox*="0 0 48 48"],
.icon-svg svg[viewBox*="0 0 300 300"] {
  /* Для иконок с большим viewBox принудительно ограничиваем размер */
  max-width: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  transform: scale(1);
  transform-origin: center;
}

/* Contacts page styles */
.contacts-section {
  padding: 60px 0;
}

.contacts-block {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.contacts-block h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Специальные правила для проблемных иконок в кнопках */
.btn-brand .icon-svg svg[aria-label*="yandex"] {
  /* Принудительно устанавливаем правильный цвет для Яндекс Игр */
  fill: #FFCC00 !important;
}

.btn-brand .icon-svg svg[aria-label*="x"] {
  /* Принудительно ограничиваем размер X иконки */
  max-width: 30px !important;
  width: 30px !important;
  max-height: 30px !important;
  height: 30px !important;
  /* Убираем любые трансформации */
  transform: none !important;
}

.btn-brand .icon-svg svg[aria-label*="boosty"] {
  /* Принудительно устанавливаем правильный цвет для Boosty */
  fill: #FF5310 !important;
}

.btn-brand .icon-svg svg[aria-label*="artstation"] {
  /* Принудительно устанавливаем правильный цвет для ArtStation */
  fill: #13AFF0 !important;
}

/* Мобильные версии для проблемных иконок */
@media (max-width: 768px) {
  .btn-brand .icon-svg svg[aria-label*="x"] {
    max-width: 24px !important;
    width: 24px !important;
    max-height: 24px !important;
    height: 24px !important;
  }
}

/* Loading indicator for news content */
.news-card[data-loading="true"] {
  position: relative;
  min-height: 200px;
}

.news-card[data-loading="true"]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4ecdc4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.news-card[data-loading="true"] .news-image,
.news-card[data-loading="true"] .news-content {
  opacity: 0.3;
}

/* Error message styling */
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #ff6b6b;
}

.error-message h3 {
  margin: 0 0 15px 0;
  font-size: 1.5em;
}

.error-message p {
  margin: 0;
  font-size: 1.1em;
  opacity: 0.8;
}

/* Отключаем анимацию hover для карточки новости на странице отдельной новости */
body.page-news-post #news-content-wrapper.news-card:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* Отключаем transition для карточки новости на странице отдельной новости */
body.page-news-post #news-content-wrapper.news-card {
    transition: none;
}

/* Специальные стили для CTA кнопок в новостях - делаем их шире */
.cta-buttons .btn.btn-brand {
    min-width: 200px;
    max-width: 280px;
    height: 48px; /* фиксируем высоту как на контактах */
}

/* Гарантируем блочный рендер иконки, чтобы центрирование по top:50% работало корректно */
.cta-buttons .btn.btn-brand .icon-svg {
    display: block;
}

/* Отключаем подъём карточек игр при наведении только на странице игр */
body.page-games .game-card:hover,
body.page-games .game-card-detailed:hover {
  transform: none;
}

/* --- Overrides for game detail page buttons layout --- */
body.page-game .contacts-buttons {
  display: grid;
  grid-template-columns: 1fr; /* по умолчанию одна колонка */
  gap: 12px;
  justify-items: stretch; /* растягиваем элементы на всю ширину */
}

body.page-game .contacts-buttons .btn-brand {
  width: 100%;
  max-width: none;
  min-width: 0; /* позволяем ужиматься по сетке */
}

@media (min-width: 768px) {
  body.page-game .contacts-buttons {
    grid-template-columns: 1fr; /* на планшетах — одна колонка */
  }
}

@media (min-width: 1200px) {
  body.page-game .contacts-buttons {
    grid-template-columns: 1fr; /* на десктопах — одна колонка */
  }
}

/* Убираем вертикальные отступы секций на странице игры */
body.page-game .game-hero {
  padding: 60px 0 40px 0 !important;
}
body.page-game .game-description {
  padding: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 40px !important;
}
body.page-game .game-features {
  padding: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Внутренние элементы, которые добавляли отступ сверху */
body.page-game .features-grid {
  margin-top: 0 !important;
}

body.page-game .similar-games {
    padding: 40px 0 0 0 !important;
  }

/* Отключаем любые трансформации сайдбара на странице игры */
body.page-game .game-info-sidebar {
  position: static !important;
  top: auto !important;
  transform: none !important; /* страховка от любых трансформаций */
}

/* Грид ключевых особенностей: 1 колонка мобайл, 2 планшет, 3 десктоп */
.features-grid {
  display: grid;
  grid-template-columns: 1fr; /* по умолчанию одна колонка */
  gap: 24px;
  margin-top: 24px;
}
@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Прячем иконку фичи */
.feature-icon { display: none; }

/* Оформление изображений/гифов в описании игры */
body.page-game .description-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 16px 0; /* вертикальные отступы, без автоцентрирования */
}

/* Абзацы описания: сохраняем переносы строк из \n */
body.page-game .description-content p {
  white-space: pre-line;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-link .logo { margin-right: 15px; }



