
.fg-container {
    width: 100%;
    box-sizing: border-box;
}

.fg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.fg-card {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
}

.fg-thumbnail,
.fg-icon {
    width: 100%;
    height: 140px;
    border-radius: 6px;
    box-sizing: border-box;
}

.fg-thumbnail {
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    background: #f3f4f6;
}

.fg-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 55px;
    background: #f8fafc;
}

.fg-name {
    margin: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    overflow-wrap: anywhere;
}

.fg-delete {
    width: 100%;
    padding: 8px;
    border: 1px solid #dc3545;
    border-radius: 5px;
    background: #fff;
    color: #dc3545;
    cursor: pointer;
}

.fg-delete:hover {
    background: #dc3545;
    color: #fff;
}

.fg-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.85);
    box-sizing: border-box;
}

.fg-modal {
    position: relative;
    width: 100%;
    max-width: 1100px;
    padding: 15px;
    border-radius: 8px;
    /*background: #111827;*/
    box-sizing: border-box;
}

.fg-large-image {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.fg-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 35px;
    height: 35px;
    border: 0;
    border-radius: 50%;
    background: white;
    color: #111827;
    font-size: 25px;
    cursor: pointer;
}

.fg-image-name {
    margin-top: 10px;
    color: white;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .fg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .fg-thumbnail,
    .fg-icon {
        height: 105px;
    }
}
