.modal {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 90dvw;
    height: 85dvh;
    background: #000000;
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    flex-direction: column;
    animation: fadeIn 0.2s ease-in-out;
    overflow: hidden;
    z-index: 999;
}

#modal-overlay {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
}

#modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #00ab00;
    color: white;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 2px solid #00ff00;
}

#modal-title {
    color: #ffffff;
    background: none;
}

.close-btn {
    background: none;
    border: 1px solid #ffffff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#modal-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px;
    gap: 10px;
    overflow-y: auto;
}

.tile {
    width: 200px;
    text-align: center;
    border: 1px solid #00ff00;
    padding: 10px;
    background: black;
    transition: transform 0.2s ease-in-out;
    box-sizing: border-box;
}

.tile:hover {
    transform: scale(1.05);
}

.tile img {
    width: 100%;
    height: auto;
}

.modal-page-content {
    padding: 10px;
    color: white;
    text-align: left;
    overflow-y: auto;
}

.back-btn {
    margin-top: 10px;
    background: #00ab00;
    color: white;
    padding: 5px 10px;
    border: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 8%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
