
/* Floating Settings Button */
#settingsButton {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background-color: #293ef8;
    color: white;
    font-size: 18px;
    padding: 5px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
/* Modal Styles */
.theme-modal, .color-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1031; /* Adjust as needed */
    overflow: hidden; /* Prevent content from spilling */
}

.theme-modal .modal-content, .color-modal .modal-content {
    background-color: #fff;
    position: absolute;
    top: 50%; /* Center modal vertically */
    left: 50%; /* Center modal horizontally */
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow-y: auto; /* Enable scrolling for long content */
}

/* Ensure vertical scrolling works on mobile */
#game-list, #color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-height: calc(100% - 100px); /* Adjust height based on content */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px;
    -webkit-overflow-scrolling: touch; /* Enable smooth scrolling on iOS */
}

/* Improve responsiveness on smaller devices */
@media (max-width: 480px) {
    .theme-modal .modal-content, .color-modal .modal-content {
        max-width: 95%;
        max-height: 90%;
    }
}


@media (min-width: 768px) {
    .theme-modal .modal-content {
        max-width: 800px;
    }
}

.theme-modal h4{
    color: #034261;
}

.theme-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.theme-modal #game-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-height: calc(100% - 100px); /* Adjust height based on other modal content */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px;
    margin: 0 auto;
}

.theme-card {
    width: 100%;
    max-width: 350px;
    background-color: #f9f9f9;
    border-radius: 10px;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 10px auto;
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.theme-card img {
    width: 100%;
    height: 200px;
}

.theme-card img:hover {
    transform: scale(1.05);
}

.theme-card h3 {
    padding: 15px 0;
    font-size: 1.2em;
    color: #34495e;
}

.theme-card h6 {
    padding: 10px 0;
    font-size: 1em;
    color: #34495e;
}

.theme-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px;
}

/* Initial style for the checkmark (hidden) */
.checkmark {
    display: none;
    color: green;
    font-size: 18px;
}

/* Show the checkmark when theme is selected */
.theme-card.selected .checkmark {
    display: inline;
}

@media (min-width: 768px) {
    .color-modal .modal-content {
        max-width: 800px;
    }
}

.color-modal h4 {
    color: #034261;
}

.color-modal .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.color-modal #color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-height: calc(100% - 100px); /* Adjust height based on other modal content */
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 10px;
    margin: 0 auto;
}

.color-card {
    width: 100%;
    max-width: 210px;
    height: 150px;
    background-color: #f9f9f9;
    border-radius: 10px;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 10px auto;
}

.color-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.color-card img {
    width: 100%;
    height: 80%; /* Adjust size for color images */
    border-radius: 8px 8px 0px 0px;
}

.color-card h6 {
    padding: 10px 0;
    font-size: 0.9em;
    color: #34495e;
}

/* Style for selected color */
.color-card.selected {
    border: 2px solid #8add88;
    box-shadow: 0 0 10px rgba(138, 221, 136, 0.8);
}

.color-card .checkmark {
    display: none;
    color: green;
    font-size: 18px;
}

/* Show the checkmark when color is selected */
.color-card.selected .checkmark {
    display: inline;
}

/* Hide theme modal when color modal is open */
.theme-modal.open .theme-modal {
    display: none;
}

