.modal-window {
    position: fixed;
    bottom: 60px;
    right: 32px;

    width: 450px;
    height: 350px;
    min-width: 280px;
    min-height: 150px;

    background: var(--bg-main);
    border: 2px solid var(--color-main);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    resize: both;
    z-index: 10005;
}

.modal-header {
    background: var(--color-main);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;

    /* CRT lines effect */
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
}

.modal-title {
    color: #333333;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-main);
    text-transform: none;
}

.modal-close {
    background: none;
    border: none;
    color: #990099;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    font-weight: bold;
    padding: 0;
}

.modal-content {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    background: var(--bg-main);
    scrollbar-width: thin;
    scrollbar-color: var(--color-main) transparent;
}

.modal-text {
    color: #cccccc;
    font-size: 13px;

    font-family: var(--font-main);
}

.modal-text p {
    margin: 0 0 8px 0;
    padding: 0;
}


.modal-text p:first-child {
    color: var(--color-main);
    font-weight: bold;
    margin-bottom: 12px;
}

.modal-content::-webkit-scrollbar {
    width: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--color-main);
    border-radius: 0px;
}

.modal-window.is-dragging {
    cursor: grabbing;
    border-color: #CC00CC;
    animation: neon-drag-glow 1.5s infinite alternate;
    transition: border-color 0.2s ease;
    transition: box-shadow 0.8s linear;
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 12px var(--color-main);
    }

    100% {
        box-shadow: 0 0 12px var(--color-main);
    }
}

.modal-window.is-dragging {
    animation: neon-pulse 1.5s infinite alternate;
}

@media (max-width: 768px) {
    .modal-window {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 90% !important;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;

        border-radius: 2px 2px 0 0;
        border: 2px solid var(--color-main);
        border-bottom: none;
    }

    .modal-header {
        padding: 16px;
        cursor: default;
    }

    .modal-window.mobile-active {
        transform: translateY(0);
    }

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

    .modal-close {
        font-size: 32px;
        padding: 5px 10px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-text {
        font-size: 14px;
        line-height: 1.6;
    }

    .modal-window.is-dragging {
        animation: none;
        box-shadow: none;
    }
}