.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none; /* Изменено с flex на none */
    opacity: 0;
    visibility: visible; /* Удалено свойство visibility */
    z-index: 9999;
}

.modal-overlay.active {
    display: flex; /* Добавлено */
    opacity: 1;
}

.modal {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    opacity: 0; /* Добавлено */
    transform: translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 1px solid rgba(46, 204, 113, 0.3);
    box-shadow: 0 0 40px rgba(46, 204, 113, 0.2);
}

.modal-overlay.active .modal {
    opacity: 1; /* Добавлено */
    transform: translateY(0);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #4CAF50;
}

.modal-icon.error {
    color: #f44336;
}

.modal-title {
    margin: 0 0 1rem;
    color: #2ecc71;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.modal-email {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-special);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(46, 204, 113, 0.3);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.1);
}

.modal-message {
    color: #666;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 0.5rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: #45a049;
}

/* Стиль для блокировки скролла */
body.modal-open {
    overflow: hidden;
    padding-right: 17px; /* Компенсация ширины скроллбара */
}
