/* ===== ОБЩИЕ НАСТРОЙКИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Фон */
    background-image: url('images/back.jpg');
    background-size: cover;
    background-attachment: fixed; /* фон не двигается при прокрутке */
    background-position: center;
    
    /* Шрифт по умолчанию */
    font-family: 'Nunito Sans', sans-serif;
    color: #f0f0f0; /* светлый текст */
    
    /* Затемняем фон, чтобы текст читался */
    background-color: #0a0f1e; /* запасной цвет */
    min-height: 100vh;
}

/* Добавляем полупрозрачную подложку поверх фона, чтобы текст был виден лучше */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* черная полупрозрачная пленка */
    z-index: -1;
}

/* ===== ШАПКА ===== */
header {
    background-color: rgba(10, 20, 30, 0.8); /* темно-синий полупрозрачный */
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #00aaff; /* синяя полоска */
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #00aaff; /* синее свечение */
}

/* Меню */
nav a {
    color: #f0f0f0;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.2rem;
    transition: 0.3s;
}

nav a:hover {
    color: #00aaff;
    text-shadow: 0 0 8px #00aaff;
}

/* ===== ОСНОВНАЯ ЧАСТЬ ===== */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00aaff;
}

/* ===== ФИЛЬТРЫ ===== */
.filters {
    margin: 30px 0;
    text-align: center;
}

.filters h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid #00aaff;
    color: #f0f0f0;
    padding: 8px 20px;
    margin: 5px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Nunito Sans', sans-serif;
}

.filter-btn:hover {
    background-color: #00aaff;
    color: #000;
    box-shadow: 0 0 15px #00aaff;
}

.filter-btn.active {
    background-color: #00aaff;
    color: #000;
}

/* ===== КОНТЕЙНЕР ДЛЯ КАРТОЧЕК ===== */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* ===== ПОДВАЛ ===== */
footer {
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    border-top: 1px solid #00aaff;
}
/* ===== ПОИСК ===== */
.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
    margin: 10px 0 30px 0;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #00aaff;
    border-radius: 30px;
    color: #f0f0f0;
    font-size: 1rem;
    font-family: 'Nunito Sans', sans-serif;
    transition: 0.3s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px #00aaff;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}
/* ===== КАРТОЧКИ ИГР ===== */
.game-card {
    background: rgba(20, 30, 40, 0.7);
    border: 2px solid #00aaff;
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    transition: all 0.4s ease; /* плавность */
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: scale(1.05); /* увеличение */
    box-shadow: 0 0 25px #00aaff; /* синее свечение */
    border-color: #fff; /* белая обводка при наведении */
}

/* Контейнер для картинок */
.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

/* Обычная картинка */
.normal-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
}

/* Картинка при наведении (изначально скрыта) */
.hover-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* При наведении на карточку меняем картинки */
.game-card:hover .normal-img {
    opacity: 0;
}

.game-card:hover .hover-img {
    opacity: 1;
}

/* Название игры */
.game-title {
    font-family: 'Nunito Sans', sans-serif;
    text-align: center;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.3);
    margin: 0;
}
.no-results {
    text-align: center;
    font-size: 1.5rem;
    color: #f0f0f0;
    grid-column: 1 / -1; /* чтобы растянуть на всю ширину сетки */
    padding: 50px;
    background: rgba(0, 170, 255, 0.1);
    border-radius: 15px;
    border: 2px dashed #00aaff;
}
/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none; /* по умолчанию скрыто */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* затемнение */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    border: 3px solid #00aaff;
    box-shadow: 0 0 30px #00aaff;
    transform: scale(0.7);
    transition: all 0.4s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Затемнение поверх фоновой картинки, чтобы текст читался */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.6), rgba(0, 0, 0, 0.6));
    border-radius: 20px;
    z-index: 1;
}

#modal-content-inner {
    position: relative;
    z-index: 2;
    padding: 40px;
    color: #f0f0f0;
}

/* Кнопка закрытия */
.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 40px;
    color: #f0f0f0;
    cursor: pointer;
    z-index: 3;
    transition: 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

.close-modal:hover {
    color: #00aaff;
    transform: rotate(90deg);
    text-shadow: 0 0 15px #00aaff;
}

/* Стили для контента внутри модалки */
.game-modal-title {
    font-family: 'Pacifico', cursive;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 0 10px #00aaff;
}

.game-modal-genre {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #00aaff;
    font-weight: 700;
}

.game-modal-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #00aaff;
}

.game-modal-link {
    display: inline-block;
    background: #00aaff;
    color: #000;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: 0.3s;
    border: 2px solid #00aaff;
}

.game-modal-link:hover {
    background: transparent;
    color: #00aaff;
    box-shadow: 0 0 20px #00aaff;
}
/* ===== ВКЛАДКИ ===== */
.modal-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid #00aaff;
    color: #f0f0f0;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    flex: 1;
    min-width: 120px;
}

.tab-btn:hover {
    background: #00aaff;
    color: #000;
    box-shadow: 0 0 15px #00aaff;
}

.tab-btn.active {
    background: #00aaff;
    color: #000;
    font-weight: 700;
}

.tab-pane {
    display: none;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin: 20px 0;
}

.tab-pane.active {
    display: block;
}

/* ===== РЕЙТИНГ ===== */
.rating-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.rating-label {
    width: 100px;
    font-weight: 700;
    color: #00aaff;
}

.rating-stars {
    flex: 1;
    font-size: 1.5rem;
    color: #ffaa00;
    letter-spacing: 5px;
}

.rating-value {
    width: 50px;
    color: #f0f0f0;
}

/* ===== ТРЕБОВАНИЯ ===== */
.requirements-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.requirement-item {
    display: flex;
    align-items: baseline;
    gap: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.requirement-label {
    width: 120px;
    font-weight: 700;
    color: #00aaff;
}

.requirement-value {
    flex: 1;
    color: #f0f0f0;
}

/* Обновляем стиль для футера модалки */
.modal-footer {
    margin-top: 20px;
    text-align: center;
}
.rating-missing {
    flex: 1;
    color: #ffaa00;
    font-style: italic;
    padding: 5px 0;
    opacity: 0.8;
}
/* ===== КАРТОЧКИ ЖАНРОВ ===== */
.genre-card {
    background: rgba(20, 30, 40, 0.8);
    border: 2px solid #00aaff;
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    grid-column: span 1;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.genre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px #00aaff;
    border-color: #fff;
}

.genre-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: #00aaff;
    margin-bottom: 15px;
    text-shadow: 0 0 5px #00aaff;
}

.genre-description {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #f0f0f0;
}

/* Обновляем стиль для активной ссылки в меню */
.nav-link {
    color: #f0f0f0;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.2rem;
    transition: 0.3s;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: #00aaff;
    text-shadow: 0 0 8px #00aaff;
}

.nav-link.active {
    color: #00aaff;
    border-bottom: 2px solid #00aaff;
}
