/* Root Variables */
:root {
    --color-primary: #8B0000;
    --color-primary-dark: #5A0000;
    --color-primary-light: #B22222;
    --color-secondary: #1a1a2e;
    --color-accent: #16c79a;
    --color-bg: #0f0f1e;
    --color-bg-light: #1a1a2e;
    --color-text: #ffffff;
    --color-text-secondary: #a0a0a0;
    --color-border: #2a2a3e;
    --font-primary: 'Roboto', sans-serif;
    --font-display: 'Creepster', cursive;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* Header */
.header {
    background-color: var(--color-secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-bg) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(22, 199, 154, 0.05) 0%, transparent 50%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></svg>');
    animation: float 20s linear infinite;
}

@keyframes float {
    from { background-position: 0 0; }
    to { background-position: 100px 100px; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--color-text-secondary);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.feature-icon {
    font-size: 1.5rem;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-text);
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 0, 0, 0.4);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Games Section */
.games-section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.game-card {
    background-color: var(--color-secondary);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-secondary) 100%);
}

.game-content {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    font-weight: 700;
}


.game-description {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.game-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-text);
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.game-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--color-text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: relative;
    background-color: var(--color-secondary);
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: var(--color-text);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}


.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section-title {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.modal-section-content {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.modal-list {
    list-style: none;
    padding: 0;
}

.modal-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.modal-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.pros-cons-box {
    background-color: var(--color-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--color-accent);
}

.pros-cons-box.cons {
    border-left-color: var(--color-primary);
}

.pros-cons-box h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.modal-download-btn {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--color-accent) 0%, #0d9a6d 100%);
    color: var(--color-text);
    text-align: center;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 2rem;
    transition: var(--transition);
}

.modal-download-btn:hover {
    background: linear-gradient(135deg, #1ae0ae 0%, var(--color-accent) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(22, 199, 154, 0.3);
}

/* About Section */
.about-section {
    padding: 5rem 0;
    background-color: var(--color-bg-light);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.about-text li {
    margin-bottom: 0.8rem;
    position: relative;
}

.about-text li::marker {
    color: var(--color-primary);
}

/* Footer */
.footer {
    background-color: var(--color-secondary);
    padding: 3rem 0 1rem;
    margin-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    font-family: var(--font-display);
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.footer-links h4,
.footer-social h4 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-links ul,
.footer-social ul {
    list-style: none;
}

.footer-links li,
.footer-social li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-social a {
    color: var(--color-text-secondary);
    transition: var(--transition);
    cursor: pointer;
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-title {
        font-size: 2rem;
    }
    
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .game-card {
        border-radius: 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-light);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   НОВЫЕ СТИЛИ ДЛЯ ПЕРЕДЕЛАННОЙ СТРУКТУРЫ
   ======================================== */

/* Catalog Grid (главная страница) */
.catalog-section {
    padding: 5rem 0;
    background: var(--color-bg);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Game Card (обновлённые стили) */
.game-card {
    background: var(--color-bg-light);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.4), 0 0 20px rgba(139, 0, 0, 0.2);
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-secondary);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .card-image {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    font-weight: 600;
}

.card-description {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.meta-icon {
    font-size: 1.1rem;
}

.card-link-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 500;
    transition: gap 0.3s ease;
}

.card-link-text svg {
    transition: transform 0.3s ease;
}

.game-card:hover .card-link-text {
    gap: 0.75rem;
}

.game-card:hover .card-link-text svg {
    transform: translateX(3px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background: var(--color-bg-light);
}

.faq-list {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: var(--color-primary);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(139, 0, 0, 0.1);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   ДЕТАЛЬНЫЕ СТРАНИЦЫ ИГР
   ======================================== */

/* Detail Header (Sticky) */
.detail-header {
    position: sticky;
    top: 0;
    background: var(--color-bg-light);
    padding: 1.5rem 0;
    z-index: 100;
    border-bottom: 2px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-size: 1.1rem;
    font-weight: 500;
    transition: transform 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.back-btn:hover {
    transform: translateX(-5px);
    color: var(--color-primary-light);
}

/* Game Title Section */
.game-title-section {
    padding: 3rem 0 2rem;
    background: var(--color-bg);
}

.game-title-section .game-title {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Meta Badges */
.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.badge:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* Gallery */
.gallery-section {
    padding: 2rem 0;
    background: var(--color-bg);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--color-border);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.3);
    border-color: var(--color-primary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Content Section */
.content-section {
    padding: 3rem 0 5rem;
    background: var(--color-bg);
}

.content-block {
    margin-bottom: 3rem;
}

.content-block .content-title,
.content-block h2 {
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
}

.content-block p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.content-block p strong {
    color: var(--color-accent);
    font-weight: 600;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    padding: 0.75rem 0 0.75rem 2rem;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.features-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
    font-size: 1.2rem;
}

.features-list li:hover {
    padding-left: 2.5rem;
    color: var(--color-text);
}

.features-list li:last-child {
    border-bottom: none;
}

/* Pros/Cons Grid */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.pros-box,
.cons-box {
    background: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: 10px;
}

.pros-box {
    border-left: 4px solid var(--color-accent);
}

.cons-box {
    border-left: 4px solid var(--color-primary);
}

.pros-box h3,
.cons-box h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.pros-box ul,
.cons-box ul {
    list-style: none;
    padding: 0;
}

.pros-box li,
.cons-box li {
    padding: 0.5rem 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Download Button (для детальных страниц) */
.download-button,
.download-btn {
    display: block;
    width: 100%;
    padding: 1.75rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 3rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.download-button:hover,
.download-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 35px rgba(139, 0, 0, 0.6);
}

/* Modal для галереи */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease, transform 0.3s ease;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--color-primary);
    transform: rotate(90deg);
}

.modal-image,
#modalImage {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    background: rgba(139, 0, 0, 0.6);
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 5px;
    z-index: 2001;
}

.modal-prev:hover,
.modal-next:hover {
    background: var(--color-primary);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

.image-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    z-index: 2001;
}

/* Footer для детальных страниц */
.footer-popular {
    margin-top: 0;
}

.footer-popular h4 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-popular ul {
    list-style: none;
}

.footer-popular li {
    margin-bottom: 0.5rem;
}

.footer-popular a {
    color: var(--color-text-secondary);
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-popular a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

/* Responsive для новых элементов */
@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .game-title-section .game-title {
        font-size: 2.2rem;
    }
    
    .meta-badges {
        gap: 0.75rem;
    }
    
    .badge {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
    
    .modal-prev,
    .modal-next {
        font-size: 2rem;
        padding: 0.75rem 1rem;
    }
    
    .modal-prev {
        left: 0.5rem;
    }
    
    .modal-next {
        right: 0.5rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }
    
    .download-button,
    .download-button {
        font-size: 1.1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        gap: 1rem;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .game-title-section .game-title {
        font-size: 1.8rem;
    }
    
    .meta-badges {
        gap: 0.5rem;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}
