.modal-overlay {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(3px);
    padding-top: 50px;
}

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

.modal-window {
    background: linear-gradient(145deg, #2d2d2d 0%, #1d1d1d 100%);
    color: white;
    border-radius: 12px;
    padding: 22px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0px rgba(255, 255, 255, 0.1);
    text-align: center;
    transform: translateY(-20px) scale(0.98);
    transition: all 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    margin-top: 0;
}

.modal-overlay.active .modal-window {
    transform: translateY(0) scale(1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 1px 0px rgba(255, 255, 255, 0.1);
}

.modal-content {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.modal-buttons {
    display: flex;
    justify-content: center;
}

.modal-btn {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-btn:hover {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.07) 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.modal-btn:active {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    transform: translateY(1px);
}

.modal-btn-ok {
    min-width: 100px;
}

.modal-btn-cancel {
    margin-right: 10px;
    opacity: 0.8;
}

.modal-separator {
    height: 1px;
    background: linear-gradient(to right,
    rgba(255, 255, 255, 0.01) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.01) 100%);
    margin: 18px 0;
}

.modal-window.success {
    border-left: 4px solid #4CAF50;
}

.modal-window.error {
    border-left: 4px solid #FF5252;
}

.modal-window.success .modal-content::before,
.modal-window.error .modal-content::before {
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
}

.modal-window.success .modal-content::before {
    content: "✓";
    color: #4CAF50;
}

.modal-window.error .modal-content::before {
    content: "✕";
    color: #FF5252;
}
