/* Кнопка входа в навигации */
.btn-login {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: #1a1a1a;
    color: white;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.btn-login:hover {
    transform: translateY(-2px);
    background: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-login svg {
    transition: transform 0.3s ease;
}

.btn-login:hover svg {
    transform: scale(1.1);
}

/* Модальное окно */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

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

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

.auth-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

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

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
    line-height: 1;
}

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

.auth-modal-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: #718096;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 8px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: white;
    color: #1a1a1a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.auth-tab:hover:not(.active) {
    color: #4a5568;
}

.auth-form-group {
    margin-bottom: 16px;
}

.auth-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 6px;
}

.auth-form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.auth-form-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.auth-form-input.error {
    border-color: #fc8181;
}

.auth-error-message {
    color: #fc8181;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.auth-error-message.show {
    display: block;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #333;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #cbd5e0;
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 10px;
    color: #a0aec0;
}

.auth-footer-text {
    text-align: center;
    font-size: 13px;
    color: #718096;
    margin-top: 16px;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .btn-login {
        padding: 8px 10px;
        font-size: 13px;
        margin-left: auto;
        margin-right: 10px;
        gap: 0;
        order: 2;
    }

    .btn-login svg {
        width: 18px;
        height: 18px;
        margin-right: 0;
        flex-shrink: 0;
    }

    .btn-login span {
        display: none;
    }

    .auth-modal {
        padding: 24px;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }

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

@media (max-width: 480px) {
    .btn-login {
        padding: 8px;
        margin-left: auto;
        margin-right: 10px;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        justify-content: center;
        align-items: center;
        order: 2;
    }

    .btn-login svg {
        width: 20px;
        height: 20px;
        margin: 0 !important;
    }
}
