.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--surface-color);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.close-button {
    color: #aaa;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    padding: 15px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-body::-webkit-scrollbar {
    display: none;
}

.modal-body h3 {
    margin-top: 0;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

.modal-body p {
    line-height: 1.6;
    text-align: center;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background-color: var(--background-color);
}

.carousel-slide {
    display: flex;
    transition: transform 0.4s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    flex-shrink: 0;
    object-fit: cover;
    aspect-ratio: 16 / 9;
}

.carousel-prev,
.carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: rgba(0, 0, 0, 0.4);
    border: none;
}

.carousel-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(0,0,0,0.7);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh;
        padding: 15px;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 1rem;
        padding: 10px;
    }
}