
.page-nav {
    padding: 30px 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.back-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.back-btn svg {
    width: 18px;
    height: 18px;
} 

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

/* КАРТОЧКА */
.game-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    padding: 25px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(99,102,241,0.2), transparent);
    opacity: 0;
    transition: 0.3s;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #6366f1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.icon {
    font-size: 32px;
    margin-bottom: 10px;
}

/* МОДАЛКА */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    width: 90vw;
    height: 90vh;
    max-width: 900px;
    max-height: 900px;
    background: #020617;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* КНОПКА ЗАКРЫТИЯ */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}