.custom-gallery-modal {
    display: none;
    position: absolute; 
    z-index: 9999;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
}

.custom-gallery-modal .modal-content {
    position: fixed;
    padding: 20px;
    background-color: #fefefe;
    margin: 5% auto;
    border: 1px solid #888;
    width: 100%;
    max-width: 1200px;
    max-height: 80vh; 
    overflow-y: auto; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.custom-gallery-modal .category-buttons-container {
    display: flex;
    overflow-x: auto; 
    margin-bottom: 10px;
    padding-bottom: 10px; 
}

.custom-gallery-modal .category-buttons-container button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 5px; 
    white-space: nowrap; 
}

.custom-gallery-modal .category-buttons-container button.all-button {
    background-color: #28a745; 
}

.custom-gallery-modal .category-buttons-container button.free-skins-button {
    background-color: #ffc107; 
}

.custom-gallery-modal .category-buttons-container button:hover {
    background-color: #0056b3;
}

.custom-gallery-modal .category-buttons-container button.active {
    background-color: #0056b3; 
}

.custom-gallery-modal #searchInput {
    width: calc(100% - 20px); 
    padding: 10px;
    margin-bottom: 10px;
    margin-top: 10px; 
    font-size: 16px; 
}

.custom-gallery-modal .button-container {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    text-align: center;
    padding: 10px 0;
    z-index: 10;
    box-shadow: none !important; 
    border: none !important; 
}

.custom-gallery-modal .remove-skin-button {
    padding: 10px 20px;
    background-color: #dc3545; 
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    left: 10px; 
    bottom: 10px; 
}

.custom-gallery-modal .remove-skin-button:hover {
    background-color: #c82333; 
}

.custom-gallery-modal .red-button {
    padding: 10px 20px;
    background-color: #dc3545; 
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    right: 10px; 
    bottom: 10px; 
}

.custom-gallery-modal .red-button:hover {
    background-color: #c82333; 
}

.custom-gallery-modal .nav-buttons {
    display: inline-block; 
}

.custom-gallery-modal .close {
    color: #aaa;
    position: absolute; 
    top: 10px;
    right: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.custom-gallery-modal .close:hover,
.custom-gallery-modal .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.custom-gallery-modal .skin {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
    width: 100px;
    cursor: pointer;
}

.custom-gallery-modal .skin img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}

.custom-gallery-modal .skin-image-container {
    width: 100px;
    height: 100px;
    border: 3px solid; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

.custom-gallery-modal .skin:hover img {
    transform: scale(1.1) rotate(360deg); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); 
}

.custom-gallery-modal .skinName {
    font-size: 12px; 
    color: #333; 
}

.custom-gallery-modal #skinsContainer {
    max-height: 400px; 
    overflow-y: auto; 
    margin-bottom: 20px; 
}

.custom-gallery-modal #prevButton,
.custom-gallery-modal #nextButton {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px; 
}

.custom-gallery-modal #prevButton:hover,
.custom-gallery-modal #nextButton:hover {
    background-color: #0056b3;
}

.skin-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid black;
    background-color: #ccc;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
  }

  .skin-button:hover {
    transform: scale(1.1);
  }

  .skin-button:active {
    transform: scale(0.95);
  }

  #overlays {
    display: flex;
    justify-content: center;
    align-items: center;
}