/* 本地服务弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 480px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 19px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #666;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tip-line {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    text-align: left;
    max-width: 400px;
}

.tip-line:nth-child(1) {
    color: #999;
    font-style: normal;
}

.tip-line:nth-child(2) {
    color: #666;
    font-style: italic;
}

.merged-tip {
    width: 300px;
    max-width: 100%;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
}

.service-link {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.2s;
}

.service-link:hover {
    color: #40a9ff;
    text-decoration: underline;
}

.port-input-container {
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    width: 300px;
    max-width: 100%;
}

.port-icon {
    margin-right: 12px;
}

.port-icon img {
    width: 20px;
    height: 20px;
}

.port-input {
    flex: 1;
    border: none;
    font-size: 14px;
    color: #333;
    outline: none;
    padding: 4px 8px;
}

.port-input:focus {
    background: white;
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.port-label {
    margin-left: 8px;
    font-size: 14px;
    color: #999;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 15px 19px;
    border-top: 1px solid #e8e8e8;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.btn-cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-cancel:hover {
    background: #e8e8e8;
    border-color: #bfbfbf;
}

.btn-confirm {
    background: #1890ff;
    color: white;
}

.btn-confirm:hover {
    background: #40a9ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 16px 20px;
    }
}
