/* Auth Modal Styles */

.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.auth-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-modal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 28px;
    font-weight: 300;
    color: #999999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.auth-modal-close:hover {
    color: #000000;
}

.auth-modal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 12px 0;
    text-align: center;
}

.auth-modal-content > p {
    font-size: 16px;
    color: #666666;
    margin: 0 0 24px 0;
    text-align: center;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .auth-buttons {
        gap: 20px;
    }
}

.btn-google,
.btn-yandex,
.btn-mail {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    color: #000000;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-google:hover,
.btn-yandex:hover,
.btn-mail:hover {
    background: #f8f9fa;
    border-color: #cccccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google svg,
.btn-yandex svg,
.btn-mail svg {
    flex-shrink: 0;
}

.btn-yandex {
    border-color: #FC3F1D;
}

.btn-yandex:hover {
    background: #fff5f3;
    border-color: #FC3F1D;
}

.btn-mail {
    border-color: #005FF9;
}

.btn-mail:hover {
    background: #f0f5ff;
    border-color: #005FF9;
}

.btn-mail svg {
    color: #005FF9;
}

.auth-modal-hint {
    font-size: 14px;
    color: #999999;
    text-align: center;
    margin: 16px 0;
}

.auth-modal-content .btn-secondary {
    width: 100%;
    display: block;
    text-align: center;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #000000;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-modal-content .btn-secondary:hover {
    background: #e9ecef;
    border-color: #cccccc;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Модальное окно видно только когда есть класс .show */
    .auth-modal.show {
        display: flex !important;
    }

    .auth-modal-content {
        padding: 32px 24px;
        margin: 20px;
        max-width: calc(100% - 40px);
        width: calc(100% - 40px);
    }

    .auth-modal-content h2 {
        font-size: 20px;
    }

    .auth-modal-content > p {
        font-size: 14px;
    }
}

/* Дополнительные стили для Safari на iOS */
@supports (-webkit-touch-callout: none) {
    .auth-modal {
        -webkit-overflow-scrolling: touch;
        position: fixed;
    }
    
    .auth-modal-content {
        -webkit-transform: translateZ(0); /* Ускоряет рендеринг на iOS */
    }
}
