/* Основные стили модального окна */
.appModal {
    display: none; /* По умолчанию скрыто */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Класс для показа модального окна */
.appModal.active {
    display: flex;
}

/* Затемненный фон */
.appModal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Контент модального окна */
.appModal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(255, 255, 255, 0.1) inset,
        0 -2px 8px rgba(0, 0, 0, 0.1) inset;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1001;
    animation: modalFadeIn 0.3s ease-out;
}

/* Эффект границы матового стекла */
.appModal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* Заголовок модального окна */
.appModal-title {
    color: white;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Контент внутри модалки */
.appModal-body {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Кнопки в модальном окне */
.appModal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

.appModal-button {
    padding: 10px 25px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.appModal-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.appModal-button.primary {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.4);
}

.appModal-button.primary:hover {
    background: rgba(59, 130, 246, 0.4);
}

/* Кнопка закрытия */
.appModal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1002;
}

.appModal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Анимация появления */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .appModal-content {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
    }
    
    .appModal-title {
        font-size: 1.3rem;
    }
    
    .appModal-buttons {
        flex-direction: column;
    }
    
    .appModal-button {
        width: 100%;
    }
}

/* Для темной темы (дополнительно) */
@media (prefers-color-scheme: dark) {
    .appModal-content {
        background: rgba(30, 30, 40, 0.2);
    }
}

/* Для браузеров, которые не поддерживают backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .appModal-content {
        background: rgba(255, 255, 255, 0.9);
    }
    
    .appModal::before {
        background-color: rgba(0, 0, 0, 0.7);
    }
}