/* Стили для модальных окон */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 0, 104, 0.3);
    border: 1px solid rgba(255, 0, 104, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 24px 32px;
    background: linear-gradient(90deg, rgba(255, 0, 104, 0.1) 0%, rgba(255, 0, 104, 0.05) 100%);
    border-bottom: 1px solid rgba(255, 0, 104, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(255, 0, 104, 0.3);
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 0, 104, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(90vh - 100px);
    color: #e0e0e0;
    line-height: 1.8;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 104, 0.5);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 104, 0.7);
}

.modal-body h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 0, 104, 0.3);
}

.modal-body h2:first-child {
    margin-top: 0;
}

.modal-body p {
    margin: 12px 0;
    font-size: 15px;
}

.modal-body ul,
.modal-body ol {
    margin: 12px 0;
    padding-left: 24px;
}

.modal-body li {
    margin: 8px 0;
    font-size: 15px;
}

.modal-body strong {
    color: #ff0068;
    font-weight: 600;
}

.modal-body a {
    color: #ff0068;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 0, 104, 0.3);
    transition: all 0.3s ease;
}

.modal-body a:hover {
    color: #ff3388;
    border-bottom-color: #ff3388;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
    }

    .modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        padding: 20px 16px;
    }

    .modal-title {
        font-size: 20px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .modal-body {
        padding: 20px 16px;
        max-height: calc(100vh - 80px);
    }

    .modal-body h2 {
        font-size: 18px;
    }

    .modal-body p,
    .modal-body li {
        font-size: 14px;
    }
}