.arx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    overflow: hidden;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 9990;
}

.arx-modal-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.arx-modal-window {
    position: relative;
    background: #0c1017;
    border: 1px solid #1c2a3a;
    border-radius: 6px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    animation: arx-modal-enter 0.22s ease-out;
}

.arx-modal-window.arx-modal-sm {
    max-width: 360px;
}

.arx-modal-window.arx-modal-lg {
    max-width: 720px;
}

@keyframes arx-modal-enter {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.arx-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #3d5568;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    font-family: inherit;
    padding: 0;
    z-index: 1;
}

.arx-modal-close:hover {
    color: #d4e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.arx-modal-header {
    padding: 1.25rem 1.5rem 0;
    margin-bottom: 0.5rem;
}

.arx-modal-header h2,
.arx-modal-header h3 {
    margin: 0;
    color: #d4e8f0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.arx-modal-body {
    padding: 0.5rem 1.5rem;
    color: #a8bfcc;
    font-size: 0.82rem;
    line-height: 1.7;
}

.arx-modal-body p {
    margin: 0 0 0.75rem;
}

.arx-modal-body p:last-child {
    margin-bottom: 0;
}

.arx-modal-footer {
    padding: 1rem 1.5rem 1.25rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    border-top: 1px solid #1c2a3a;
    margin-top: 0.25rem;
}

.arx-modal-btn {
    padding: 0.45rem 1.1rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid #2d4256;
    background: transparent;
    color: #6b8899;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.arx-modal-btn:hover {
    color: #a8bfcc;
    border-color: #3d5568;
}

.arx-modal-btn-primary {
    background: rgba(0, 200, 255, 0.1);
    border-color: rgba(0, 200, 255, 0.4);
    color: #00c8ff;
}

.arx-modal-btn-primary:hover {
    background: rgba(0, 200, 255, 0.22);
    border-color: #00c8ff;
}

.arx-modal-btn-danger {
    background: rgba(255, 77, 94, 0.1);
    border-color: rgba(255, 77, 94, 0.35);
    color: #ff4d5e;
}

.arx-modal-btn-danger:hover {
    background: rgba(255, 77, 94, 0.2);
    border-color: #ff4d5e;
}

@media (max-width: 640px) {
    .arx-modal-container {
        padding: 1rem;
        align-items: flex-end;
    }

    .arx-modal-window {
        max-width: 100%;
        border-radius: 6px 6px 0 0;
        max-height: 90vh;
    }

    .arx-modal-header {
        padding: 1rem 1.25rem 0;
    }

    .arx-modal-body {
        padding: 0.5rem 1.25rem;
    }

    .arx-modal-footer {
        padding: 1rem 1.25rem 1.25rem;
    }
}
